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 A293520 #18 Mar 14 2025 06:21:42 %S A293520 0,0,0,0,1,2,2,1,2,3,3,4,9,6,13,11,21,32,40,52,60,64,90,129,169,242, %T A293520 321,434,549,808,1026,1395,1929,2551,3405,4578,6131,8275,11196,14814, %U A293520 20198,26823,36295,48840,65337,87634,118138,158324,212870,287014 %N A293520 Number of dying nodes (withering branches) at generation n in the binary tree of persistently squarefree numbers (A293230). %C A293520 Provided that A293441 is strictly growing, then certainly a(n) < A293441(n), because only even nodes may die and A293441(n-1) gives the number of even nodes at level n. %F A293520 a(n) = Sum_{k=(2^n)..(2^(1+n)-1)} abs(A293233(k))*[0 == A008966(2*k)+A008966(1+2*k)]. %e A293520 a(4) = 1 because in the binary tree illustrated in A293230, it is the only node 22 at the level 4 that does not generate any new buds as both 2*22 = 44 and 1+(2*22) = 45 are nonsquarefree numbers. %o A293520 (PARI) %o A293520 \\ Compute sequences A293230, A293520, A293521, A293522 at the same time: %o A293520 allocatemem(2^30); %o A293520 next_living_bud_or_zero(n) = if(issquarefree(n),n,0); %o A293520 nextA293230generation(tops) = { my(new_tops = vecsort(vector(2*#tops,i,next_living_bud_or_zero((2*tops[(i+1)\2])+((i+1)%2))),,8)); if(0==new_tops[1], vector(#new_tops-1,i,new_tops[1+i]), new_tops); } %o A293520 write_counts(n,tops) = { my(w=0, s=0, b=0, k); for(i=1,#tops,if((tops[i]%2), if(issquarefree(1+(2*tops[i])), b++, s++), if(issquarefree(1+(2*tops[i])), s++, w++)); ); write("b293520.txt", n, " ", w); write("b293521.txt", n, " ", s); write("b293522.txt", n, " ", b); write("b293230.txt", n, " ", k=length(tops)); print1(k, ", ");} %o A293520 tops_of_tree = [1]; %o A293520 write("b293230.txt", 0, " ", 1); %o A293520 write("b293520.txt", 0, " ", 0); %o A293520 write("b293521.txt", 0, " ", 0); %o A293520 write("b293522.txt", 0, " ", 1); %o A293520 print1(1, ", "); %o A293520 for(n=1,52,tops_of_tree = nextA293230generation(tops_of_tree); write_counts(n,tops_of_tree);); %Y A293520 Cf. A293230, A293441, A293521, A293522. %K A293520 nonn %O A293520 0,6 %A A293520 _Antti Karttunen_, Oct 12 2017