[go: up one dir, main page]

login
A138342
First differences of A007088.
2
1, 9, 1, 89, 1, 9, 1, 889, 1, 9, 1, 89, 1, 9, 1, 8889, 1, 9, 1, 89, 1, 9, 1, 889, 1, 9, 1, 89, 1, 9, 1, 88889, 1, 9, 1, 89, 1, 9, 1, 889, 1, 9, 1, 89, 1, 9, 1, 8889, 1, 9, 1, 89, 1, 9, 1, 889, 1, 9, 1, 89, 1, 9, 1, 888889, 1, 9, 1, 89, 1, 9, 1, 889, 1, 9, 1, 89, 1, 9, 1, 8889, 1, 9, 1, 89, 1, 9
OFFSET
1,2
LINKS
FORMULA
a(n) = A059482(A007814(n)).
From Antti Karttunen, Nov 06 2018: (Start)
a(n) = A007088(n) - A007088(n-1).
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)
A007088(n) = fromdigits(binary(n), 10); \\ From A007088.
A138342(n) = (A007088(n) - A007088(n-1)); \\ Antti Karttunen, Nov 06 2018
(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