OFFSET
2,5
LINKS
Seiichi Manyama, Table of n, a(n) for n = 2..1000
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
KEYWORD
sign,base
AUTHOR
Seiichi Manyama, Aug 06 2019
STATUS
approved