|
|
A268643
|
|
Number of 1's in decimal representation of n.
|
|
23
|
|
|
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,12
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(floor(n/10)) + 1 if n == 1 (mod 10), otherwise a(n) = a(floor(n/10)).
G.f. g(x) satisfies g(x) = x/(1-x^10) + (1-x^10)*g(x^10)/(1-x).
|
|
MAPLE
|
f:= n -> numboccur(1, convert(n, base, 10)):
map(f, [$0..100]);
|
|
MATHEMATICA
|
|
|
PROG
|
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|