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!)
A309531 a(n) = Sum_{k=2..n} (-1)^k * A240236(n, k). 3
1, 1, 0, 0, 2, 2, -3, 1, 5, 5, -2, -2, 4, 10, -6, -6, 1, 1, -8, 0, 10, 10, -16, -8, 4, 18, 7, 7, 13, 13, -19, -7, 9, 19, -11, -11, 7, 21, -15, -15, -5, -5, -20, 10, 32, 32, -36, -24, -1, 17, 0, 0, 18, 32, -14, 6, 34, 34, -23, -23, 7, 45, -29, -13, 5, 5, -16, 8, 30, 30, -66 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,5
LINKS
FORMULA
a(n) = a(n-1) if and only if n is an odd prime.
EXAMPLE
a(2) = 1.
a(3) = 2 - 1 = 1.
a(4) = 1 - 2 + 1 = 0.
a(5) = 2 - 3 + 2 - 1 = 0.
a(6) = 2 - 2 + 3 - 2 + 1 = 2.
PROG
(PARI) {a(n) = sum(k=2, n, (-1)^k*sumdigits(n, k))}
CROSSREFS
Sequence in context: A028507 A096226 A155980 * A215222 A219865 A016539
KEYWORD
sign,base
AUTHOR
Seiichi Manyama, Aug 06 2019
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 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)