[CS-FSLUG] OT: Math question

Frank Bax fbax at sympatico.ca
Tue Dec 6 09:10:27 CST 2005

In family research, it is common to print an Ahnentafel report of 
ancestors.  In this report, the primary person is #1.  After that, Males 
are even numbers, Females are odd; for each person ("child"), the father is 
"2*child" and mother is "husband+1" or "(2*child)+1".  To go from parent 
back to child, divide by 2 and toss out remainder.  I have a program that 
produces an ahnentafel report in html format, results shown here:
The Ahnentafel "code number" is in first column of the html table.  Over 
the weekend, I manually added the html code to colourise the rows because 
it was hard to tell where each generation changed.  The pink rows show my 
wife's ancestors, the blue ones are mine.

After 6 generations, there are no more ancestors for my wife's family, so I 
switched to alternate shades of blue to better show change in 
generations.  This should be easy to code based on generation number being 
odd or even.  The yellow lines were changes/additions that I made yesterday 
- there hadn't been any changes in 5 years before this past week.

Does anyone know how I can "calculate" the colour for a row (first 6 


More information about the Christiansource mailing list