OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16383
FORMULA
From Antti Karttunen, Nov 06 2018: (Start)
Multiplicative with a(2^e) = A059482(e), a(p^e) = 1 for odd primes p.
(End)
G.f.: Sum_{k>=0} 10^k * x^(2^k) / (1 + x^(2^k)). - Ilya Gutkovskiy, Dec 14 2020
EXAMPLE
1-0 = 1, 10-1 = 9, 11-10 = 1, 100-11 = 89, ...
MATHEMATICA
Differences[Table[FromDigits[IntegerDigits[n, 2]], {n, 0, 90}]] (* Harvey P. Dale, Feb 26 2012 *)
PROG
(PARI)
(PARI)
A059482(n) = ((10^n)*(1000/1125) + (1/9));
A138342(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i, 1], A059482(f[i, 2]), 1)); }; \\ Antti Karttunen, Nov 06 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Jaume Simon Gispert (jaume(AT)nuem.com), May 17 2008
EXTENSIONS
Offset corrected and keyword:mult added by Antti Karttunen, Nov 06 2018
STATUS
approved