The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136714 At step n the sequence lists the number of occurrences of digit (n mod k), with k>0, in all the numbers from 1 to n. Case k=10. 8
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 6, 3, 3, 3, 3, 3, 3, 3, 3, 14, 14, 8, 4, 4, 4, 4, 4, 4, 4, 15, 15, 15, 10, 5, 5, 5, 5, 5, 5, 16, 16, 16, 16, 12, 6, 6, 6, 6, 6, 17, 17, 17, 17, 17, 14, 7, 7, 7, 7, 18, 18, 18, 18, 18, 18, 16, 8, 8, 8, 19, 19, 19, 19, 19, 19, 19, 18, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
LINKS
EXAMPLE
For n=11 we have 4 because the digit (11 mod 10)=1 is present 4 times: 1, 10, 11.
For n=22 we have 6 because the digit (22 mod 10)=2 is present 6 times: 2, 12, 20, 21, 22.
MAPLE
P:=proc(n, m) local a, b, c, d, i, v; v:=array(1..m); for i from 1 to m-1 do v[i]:=1; print(1); od; if m=10 then v[m]:=1; print(1); else v[m]:=0; print(0); fi; for i from m+1 by 1 to n do a:=(i mod m); for b from i-m+1 by 1 to i do d:=b; while d>0 do c:=d-(trunc(d/10)*10); d:=trunc(d/10); if c=a then if a=0 then v[m]:=v[m]+1; else v[a]:=v[a]+1; fi; fi; od; od; if a=0 then print(v[m]); else print(v[a]); fi; od; end: P(101, 10);
CROSSREFS
Sequence in context: A136709 A254969 A137239 * A280135 A297825 A338150
KEYWORD
easy,base,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 00:54 EDT 2024. Contains 372758 sequences. (Running on oeis4.)