login
A101564
a(n) = Sum_{k=0..n} (-1)^A010060(n-k)*[(n+1) mod (k+1) = 0]*10^k, where [] denotes the Iverson bracket.
0
1, 9, 99, 991, 9999, 100091, 1000001, 9999009, 100000099, 1000009991, 10000000001, 100000099109, 1000000000001, 9999999000009, 100000000010099, 999999990000991, 9999999999999999, 100000000100100091
OFFSET
0,2
PROG
(PARI) tm(n) = hammingweight(n)%2;
a(n) = sum(k=0, n, if (((n+1) % (k+1))==0, (-1)^tm(n-k)*10^k)); \\ Michel Marcus, Oct 01 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Dec 07 2004
STATUS
approved