login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297158 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. 2
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
This is an analogous sequence to A065358, but involving Ludic numbers (A003309) instead of primes. Compare the scatter-plots.
LINKS
FORMULA
a(n) = Sum_{k=1..n} (-1)^(A192512(k)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A297158 n) (if (zero? n) n (+ (expt -1 (+ -1 (A192512 n))) (A297158 (- n 1)))))
CROSSREFS
Differs from A065358 for the first time at n=19, where a(19) = 3, while A065358(19) = 5.
Sequence in context: A053646 A080776 A360659 * A065358 A062329 A022958
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 22 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)