A293520 Number of dying nodes (withering branches) at generation n in the binary tree of persistently squarefree numbers (A293230).
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, 321, 434, 549, 808, 1026, 1395, 1929, 2551, 3405, 4578, 6131, 8275, 11196, 14814, 20198, 26823, 36295, 48840, 65337, 87634, 118138, 158324, 212870, 287014
Offset: 0
Keywords
Examples
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.
Programs
-
PARI
\\ Compute sequences A293230, A293520, A293521, A293522 at the same time: allocatemem(2^30); next_living_bud_or_zero(n) = if(issquarefree(n),n,0); 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); } 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, ", ");} tops_of_tree = [1]; write("b293230.txt", 0, " ", 1); write("b293520.txt", 0, " ", 0); write("b293521.txt", 0, " ", 0); write("b293522.txt", 0, " ", 1); print1(1, ", "); for(n=1,52,tops_of_tree = nextA293230generation(tops_of_tree); write_counts(n,tops_of_tree););
Comments