|
Search: id:A028897
|
|
|
| A028897 |
|
If n = Sum c_i 10^i then a(n) = Sum c_i 2^i. |
|
+0 5
|
|
| 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 14, 15, 16, 17, 18, 19, 20, 21, 22
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
COMMENT
|
For n<100, this is the same result as "If n = Sum c_i 10^i then a(n) = Sum c_i (i+1)". - Henry Bottomley (se16(AT)btinternet.com), Apr 20 2001
n_2 in the notation of A122618.
|
|
FORMULA
|
a(n) = 2*a([n/10])+(n mod 10) - Henry Bottomley (se16(AT)btinternet.com), Apr 20 2001
a(0) = 0, a(n) = 2*a(n/10) if n==0 (mod 10), a(n) = a(n-1)+1 otherwise - Benoit Cloitre (benoit7848c(AT)orange.fr), Dec 21 2002
|
|
PROGRAM
|
(PARI) a(n)=if(n<1, 0, if(n%10, a(n-1)+1, 2*a(n/10)))
|
|
CROSSREFS
|
Cf. A122618.
Sequence in context: A083960 A138795 A093017 this_sequence A156230 A081594 A038506
Adjacent sequences: A028894 A028895 A028896 this_sequence A028898 A028899 A028900
|
|
KEYWORD
|
nonn,base,easy,nice
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com).
|
|
EXTENSIONS
|
More terms from Erich Friedman (erich.friedman(AT)stetson.edu).
|
|
|
Search completed in 0.002 seconds
|