Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Jan 02 2023 12:30:54
%S 0,1,0,1,2,1,0,1,2,3,4,3,2,3,4,5,6,5,4,3,2,1,0,1,2,1,0,-1,-2,-1,0,1,2,
%T 3,4,5,6,5,4,3,2,3,4,3,2,1,0,1,2,3,4,5,6,5,4,3,2,1,0,-1,-2,-1,0,1,2,3,
%U 4,3,2,1,0,1,2,3,4,5,6,5,4,3,2,1,0,1,2,3,4,5,6,5,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1
%N Ludic ladder sequence: a(n) = Sum_{k=1..n} (-1)^LudicPi(k), where LudicPi(n) = A192512(n)-1 gives the number of Ludic numbers > 1 and <= n.
%C This is an analogous sequence to A065358, but involving Ludic numbers (A003309) instead of primes. Compare the scatter-plots.
%H Antti Karttunen, <a href="/A297158/b297158.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="http://list.seqfan.eu/oldermail/seqfan/2018-February/018338.html">Discussion of SeqFan-list</a>, February 2018.
%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>
%F a(n) = Sum_{k=1..n} (-1)^(A192512(k)-1).
%o (Scheme, with memoization-macro definec)
%o (definec (A297158 n) (if (zero? n) n (+ (expt -1 (+ -1 (A192512 n))) (A297158 (- n 1)))))
%Y Cf. A003309, A192512.
%Y Differs from A065358 for the first time at n=19, where a(19) = 3, while A065358(19) = 5.
%K sign
%O 0,5
%A _Antti Karttunen_, Feb 22 2018