cp's OEIS Frontend

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.

A252745 Number of ones on each row of irregular tables A252743 and A252744.

This page as a plain text file.
%I A252745 #8 Jan 04 2015 22:56:21
%S A252745 0,0,1,3,6,15,26,57,118,237,486,989,1992,3997,8038,16133,32331,64777,
%T A252745 129810,260191,521325,1043924,2089305,4180716
%N A252745 Number of ones on each row of irregular tables A252743 and A252744.
%C A252745 Also, number of nodes on level n (the root 1 occurs at level 0) of binary tree depicted in A005940 where the left hand child is larger than the right hand child of the node.
%C A252745 E.g. on the level 2, containing nodes 3 and 4, the children of 3 are 5 < 6, and the children of 4 are 9 > 8, thus a(2) = 1.
%F A252745 a(0) = 1; for n>1: a(n) = Sum_{k=A000079(n-1) .. A000225(n)} A252743(k) = Sum_{k=2^(n-1) .. (2^n)-1} A252744(k).
%F A252745 Other identities. For n >= 1:
%F A252745 a(n) = 2^(n-1) - A252746(n).
%o A252745 (PARI)
%o A252745 allocatemem(234567890);
%o A252745 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of _Michel Marcus_
%o A252745 A252745print(up_to_n) = { my(s, i=0, n=0); for(n=0, up_to_n, if(0 == n, s = 0; lev = vector(1); lev[1] = 2, oldlev = lev; lev = vector(2*length(oldlev)); s = 0; for(i = 0, (2^n)-1, lev[i+1] = if(!(i%2),A003961(oldlev[(i\2)+1]),2*oldlev[(i\2)+1]); s += if((i%2),(lev[i+1] < lev[i]),0))); write("b252745.txt", n, " ", s)); };
%o A252745 A252745print(23); \\ The terms a(0) .. a(23) were computed with this program.
%o A252745 (Scheme)
%o A252745 (define (A252745 n) (if (zero? n) 0 (add A252744 (A000079 (- n 1)) (A000225 n))))
%o A252745 (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
%Y A252745 Cf. A000079, A000225, A252737, A252743, A252744, A252746.
%K A252745 nonn
%O A252745 0,4
%A A252745 _Antti Karttunen_, Dec 21 2014