OFFSET
0,6
COMMENTS
EXAMPLE
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.
PROG
(PARI)
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); );
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 12 2017
STATUS
approved