login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136710 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=6. 8
1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 6, 2, 2, 2, 2, 1, 12, 3, 2, 2, 2, 2, 13, 10, 3, 3, 3, 3, 14, 14, 8, 4, 4, 3, 14, 14, 14, 5, 4, 4, 15, 15, 15, 12, 5, 4, 15, 15, 15, 15, 9, 5, 16, 16, 16, 16, 16, 6, 17, 17, 17, 17, 17, 6, 17, 17, 17, 17, 17, 7, 18, 18, 18, 18, 18, 7, 18, 18, 18, 18, 18, 8, 19 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,13

LINKS

Table of n, a(n) for n=0..84.

EXAMPLE

For n=13 we have 6 because the digit (13 mod 6)=1 is present 6 times: 1, 10, 11, 12, 13.

For n=20 we have 3 because the digit (20 mod 6)=2 is present 3 times: 2, 12, 20.

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, 6);

CROSSREFS

Cf. A136706, A136707, A136708, A136709, A136711, A136712, A136713, A136714.

Sequence in context: A061666 A136708 A020795 * A276801 A083286 A247818

Adjacent sequences:  A136707 A136708 A136709 * A136711 A136712 A136713

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 03:03 EDT 2019. Contains 326318 sequences. (Running on oeis4.)