Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A136713
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A136713 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=9. +0
9
1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 12, 3, 2, 2, 2, 2, 2, 2, 2, 13, 13, 4, 3, 3, 3, 3, 3, 3, 14, 14, 14, 5, 4, 4, 4, 4, 4, 15, 15, 15, 15, 6, 5, 5, 5, 5, 16, 16, 16, 16, 16, 7, 6, 6, 6, 17, 17, 17, 17, 17, 17, 8, 7, 7, 18, 18, 18, 18, 18, 18, 18, 9, 8, 19, 19, 19, 19, 19, 19, 19 (list; graph; listen)
OFFSET

0,10

EXAMPLE

For n=19 we have 12 because the digit (19 mod 9)=1 is present 12 times: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19.

For n=20 we have 3 because the digit (20 mod 9)=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, 9);

CROSSREFS

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

Sequence in context: A098744 A025429 A076250 this_sequence A043281 A061704 A050361

Adjacent sequences: A136710 A136711 A136712 this_sequence A136714 A136715 A136716

KEYWORD

easy,nonn

AUTHOR

Paolo P. Lava & Giorgio Balzarotti (ppl(AT)spl.at), Jan 18 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research