login

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”).

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