cp's OEIS Frontend

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.

A293518 Number of surviving even nodes at generation n in the binary tree of persistently squarefree numbers (see A293230).

This page as a plain text file.
%I A293518 #15 Mar 14 2025 06:15:26
%S A293518 0,1,1,2,2,2,3,6,6,8,12,16,20,31,34,56,63,88,112,150,208,287,379,511,
%T A293518 690,908,1239,1637,2252,2945,4052,5348,7203,9681,12974,17432,23470,
%U A293518 31419,42254,57026,76182,102845,137764,185271,249065,334864,449586,604164,811709,1089661,1465433,1968592
%N A293518 Number of surviving even nodes at generation n in the binary tree of persistently squarefree numbers (see A293230).
%F A293518 a(n) = Sum_{k=(2^n)..(2^(1+n)-1)} abs(A293233(k)) * [0==A008966(2*k)] * [1==A008966(1+2*k)].
%F A293518 a(n) + A293519(n) = A293521(n).
%F A293518 a(n) - A293519(n) = A293517(n).
%e A293518 a(3) = 2 because in the binary tree illustrated in A293230, there are two even nodes at the level 3 (namely, the nodes 10 and 14) that spawn just one offspring each.
%o A293518 (PARI)
%o A293518 \\ Compute the sequences A293441, A293518 and A293519 at the same time:
%o A293518 allocatemem(2^30);
%o A293518 next_living_bud_or_zero(n) = if(issquarefree(n),n,0);
%o A293518 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 A293518 writeA293441etc_counts(n,tops) = { my(os=0, es=0, k=0); for(i=1,#tops, if((tops[i]%2), k++; if(!issquarefree(1+(2*tops[i])), os++), if(issquarefree(1+(2*tops[i])), es++));); write("b293441.txt", n, " ", k); write("b293518.txt", n, " ", es); write("b293519.txt", n, " ", os); print1(k, ", ");}
%o A293518 tops_of_tree = [1];
%o A293518 write("b293441.txt", 0, " ", 1);
%o A293518 write("b293518.txt", 0, " ", 0);
%o A293518 write("b293519.txt", 0, " ", 0);
%o A293518 print1(1, ", ");
%o A293518 for(n=1,51,tops_of_tree = nextA293230generation(tops_of_tree); writeA293441etc_counts(n,tops_of_tree););
%o A293518 (Scheme)
%o A293518 (define (A293518 n) (add (lambda (k) (* (if (and (= 0 (A008966 (+ k k))) (= 1 (A008966 (+ 1 k k)))) 1 0) (abs (A293233 k)))) (A000079 n) (+ -1 (A000079 (+ 1 n)))))
%o A293518 ;; Implements sum_{i=lowlim..uplim} intfun(i)
%o A293518 (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
%Y A293518 Cf. A008966, A293230, A293233, A293517, A293519, A293521.
%K A293518 nonn
%O A293518 0,4
%A A293518 _Antti Karttunen_, Oct 16 2017