This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A136706 At step n the sequence lists the number of occurences of digit (n mod k), with k>0, in all the numbers from 1 to n. Case k=2. 9
 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 2, 13, 2, 13, 2, 13, 2, 13, 2, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 4, 15, 4, 15, 4, 15, 4, 15, 4, 15, 5, 16, 5, 16, 5, 16, 5, 16, 5, 16, 6, 17, 6, 17, 6, 17, 6, 17, 6, 17, 7, 18, 7, 18, 7, 18, 7, 18, 7, 18, 8, 19, 8, 19, 8, 19, 8, 19 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,11 LINKS Harvey P. Dale, Table of n, a(n) for n = 0..1000 EXAMPLE For n=11 we have 4 because the digit (11 mod 2)=1 is present 4 times: 1, 10, 11. For n=32 we have 3 because the digit (32 mod 2)=0 is present 3 times: 10, 20, 30. 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, 2); MATHEMATICA ans[n_]:=Module[{d=Mod[n, 2]}, Count[Flatten[IntegerDigits/@Range[n]], d]]; Array[ans, 90] (* Harvey P. Dale, Jan 10 2012 *) CROSSREFS Cf. A136707, A136708, A136709, A136710, A136711, A136712, A136713, A136714. Sequence in context: A185093 A010779 A215619 * A326478 A324118 A100796 Adjacent sequences:  A136703 A136704 A136705 * A136707 A136708 A136709 KEYWORD easy,base,nonn AUTHOR Paolo P. Lava and Giorgio Balzarotti, Jan 18 2008 STATUS approved

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

Last modified October 21 14:27 EDT 2019. Contains 328301 sequences. (Running on oeis4.)