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 A262696 #8 Oct 04 2015 13:10:34 %S A262696 0,2,0,1,1,1,0,1,1,13,1,13,0,1,1,11,1,11,0,1,1,10,0,10,1,1,1,10,1,9,0, %T A262696 8,1,1,0,8,1,1,6,7,1,1,0,1,1,6,0,6,5,1,1,6,1,5,0,1,1,5,0,3,4,3,0,1,1, %U A262696 3,1,1,1,2,0,1,4,1,1,1,7,1,0,1,1,7,1,6,4,1,1,6,1,1,0,5,1,1,0,4,4,4,1,1,1,1,0,1,3,4,0,4,1,1,1,3,1,1,0,1,1,1,0,1,3,0,4,1 %N A262696 a(n)=0 if n is in A259934, otherwise number of terminal nodes (including n itself if it is a leaf) in that finite subtree whose root is n and whose edge-relation is defined by A049820(child) = parent. %H A262696 Antti Karttunen, <a href="/A262696/b262696.txt">Table of n, a(n) for n = 0..17724</a> %F A262696 If A262693(n) = 1 [when n is in A259934], %F A262696 then a(n) = 0, %F A262696 otherwise, if A060990(n) = 0 [when n is one of the leaves, A045765], %F A262696 then a(n) = 1, %F A262696 otherwise: %F A262696 a(n) = Sum_{k = A082284(n) .. A262686(n)} [A049820(k) = n] * a(k). %F A262696 (In the last clause [ ] stands for Iverson bracket, giving as its result 1 only when A049820(k) = n, and 0 otherwise). %F A262696 Other identities: %F A262696 For any n in A262511 but not in A259934, a(n) = a(A082284(n)). %e A262696 For n=1, its transitive closure (as defined by edge-relation A049820(child) = parent) is the union of {1} itself together with all its descendants: {1, 3, 4, 5, 7, 8}. We see that there are no other nodes in a subtree whose root is 1, because A049820(3) = 3 - d(3) = 1, A049820(4) = 1, A049820(5) = 3, A049820(7) = 5, A049820(8) = 4 and of these only 7 and 8 are terms of A045765. Thus a(1) = 2. %e A262696 For n=9, its transitive closure is {9, 11, 13, 15, 16, 17, 19, 21, 23, 24, 27, 29, 31, 33, 35, 36, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 79}, of which only thirteen members: {13, 19, 24, 33, 36, 37, 43, 55, 63, 64, 67, 75, 79} are leaves (in A045765), thus a(9) = 13. %o A262696 (Scheme with memoization-macro definec) %o A262696 (definec (A262696 n) (cond ((= 1 (A262693 n)) 0) ((= 0 (A060990 n)) 1) (else (let loop ((s 0) (k (A262686 n))) (cond ((<= k n) s) ((= n (A049820 k)) (loop (+ s (A262696 k)) (- k 1))) (else (loop s (- k 1)))))))) %Y A262696 Cf. A000005, A045765, A049820, A060990, A082284, A259934, A262686, A262693. %Y A262696 Cf. A262522, A262695, A262697. %Y A262696 Cf. also A213726. %K A262696 nonn %O A262696 0,2 %A A262696 _Antti Karttunen_, Oct 04 2015