login
A293519
Number of surviving (but not bifurcating) odd nodes at generation n in the binary tree of persistently squarefree numbers (see A293230).
6
0, 0, 0, 1, 1, 0, 2, 3, 2, 3, 3, 8, 10, 11, 17, 20, 31, 38, 46, 67, 90, 116, 160, 220, 280, 397, 509, 685, 927, 1280, 1663, 2248, 3056, 4050, 5383, 7339, 9714, 13029, 17714, 23738, 31791, 42793, 57473, 77175, 103839, 140100, 187495, 252068, 338257, 454325, 611101, 820924
OFFSET
0,7
FORMULA
a(n) = Sum_{k=(2^n)..(2^(1+n))-1)] abs(A293233(k)) * [1==(A008966(2k)] * [0==A008966(1+2k))].
A293518(n) + a(n) = A293521(n).
A293518(n) - a(n) = A293517(n).
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