This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A358504 #58 Mar 24 2025 04:11:10 %S A358504 1,5,25,137,793,4697,28057,168089,1008025,6047129,36280729,217680281, %T A358504 1306073497,7836424601,47018514841,282111023513,1692666010009, %U A358504 10155995797913,60935974263193,365615844530585,2193695065086361,13162170386323865,78973022309554585 %N A358504 Number of genetic relatives of a person M in a genealogical tree extending back n generations and where everyone has 3 children down to the generation of M. %C A358504 M has 2 parents, 4 grandparents, and so on up to 2^n ancestors at the top of the tree. %C A358504 The genetic relatives of M are all descendants of those ancestors. %C A358504 M is a genetic relative of himself or herself. %H A358504 Paolo Xausa, <a href="/A358504/b358504.txt">Table of n, a(n) for n = 0..1000</a> %H A358504 Hans Braxmeier, <a href="https://braxmeier.com/pages/numberOfRelatives/numberOfRelatives.html">Calculating the number of genetic relative people in a genealogical tree</a>. %H A358504 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (9,-20,12). %F A358504 a(n) = 2^n + 3*(6^n - 1)/5. %F A358504 a(n) = 2*(A154407(n) + 1)/5 - 1. - _Hugo Pfoertner_, Nov 22 2022 %e A358504 For n=2, the tree comprises a(2) = 25 people, %e A358504 G-------G G-------G G = 4 grandparents %e A358504 / | \ / | \ P = 2 parents %e A358504 U U P---P U U S = 2 siblings %e A358504 /|\ /|\ /|\ /|\ /|\ U = 4 uncles (or aunts) %e A358504 C C C C C C S M S C C C C C C C = 12 cousins %e A358504 The spouses of U are not shown and are not genetic relatives of M. %t A358504 A358504[n_] := 2^n + 3*(6^n-1)/5; Array[A358504, 25, 0] (* or *) %t A358504 LinearRecurrence[{9, -20, 12}, {1, 5, 25}, 25] (* _Paolo Xausa_, Feb 09 2024 *) %o A358504 (Python) for n in range(0,23): print(2**n+3*(6**n-1)//5) %o A358504 (PARI) a(n) = (3^(n+1)+5)<<n \ 5; \\ _Kevin Ryde_, Nov 23 2022 %Y A358504 Cf. A154407. %Y A358504 Other numbers of children: A076024 (2), A358598 (4), A358599 (5), A358600 (6), A358601 (7). %K A358504 easy,nonn %O A358504 0,2 %A A358504 _Hans Braxmeier_, Nov 19 2022