OFFSET
0,7
FORMULA
EXAMPLE
a(3) = 1 because in the binary tree illustrated in A293230, there is only one odd node at the level 3 (namely, the node 13) that spawns just one offspring.
PROG
(PARI)
\\ A naive algorithm (see A293518 for a better program):
up_to_level = 28;
up_to = (2^(1+up_to_level));
is_persistently_squarefree(n, base) = { while(n>1, if(!issquarefree(n), return(0)); n \= base); (1); };
{ countsA293441 = 1; countsA293519 = 0; k=1; n=3; while(n <= 1+up_to, if(!bitand(n-1, n-2), write("b293441.txt", k, " ", countsA293441); write("b293519.txt", k, " ", countsA293519); print1(countsA293519, ", "); countsA293441 = 0; countsA293519 = 0; k++); if(is_persistently_squarefree(n, 2), countsA293441++; if(!issquarefree(1+(2*n)), countsA293519++)); n += 2); }
(Scheme)
(define (A293519 n) (add (lambda (k) (* (if (and (= 1 (A008966 (+ k k))) (= 0 (A008966 (+ 1 k k)))) 1 0) (abs (A293233 k)))) (A000079 n) (+ -1 (A000079 (+ 1 n)))))
;; Implements sum_{i=lowlim..uplim} intfun(i)
(define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 16 2017
STATUS
approved