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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114136 Numbers k such that k divides the sum of digits of all numbers from 1 to k. 4

%I

%S 1,3,5,7,9,18,21,24,38,58,78,98,298,498,501,537,698,702,707,711,716,

%T 898,1141,1197,1501,1557,1998,2703,2706,2712,2715,3998,4502,4509,4529,

%U 4536,5998,7998,8001,8097,9998,29998,36001,36297,49998,54504,54507,54510

%N Numbers k such that k divides the sum of digits of all numbers from 1 to k.

%C a(n) | A037123(a(n)). Sequence is infinite, including 10^(2m)-2 for all m >= 1. For each m >= 1, there is at least one n with A037123(a(n))/a(n) = m.

%C Number of terms < 10^m for m >= 1: 5, 12, 22, 41, 58, 79, 105, 128, 176, 202, ..., . - _Robert G. Wilson v_, Jul 06 2018

%C Certain number forms appear repeatedly: 1(9e)8, 3(9e)8, 5(9e)8, 7(9e)8, 9(9e)8, 2(9o)8, 4(9o)8, 6(9o)8, 8(9o)8; where e represents an even number of times and o an odd number of times. - _Robert G. Wilson v_, Jul 06 2018

%H Giovanni Resta, <a href="/A114136/b114136.txt">Table of n, a(n) for n = 1..320</a> (terms < 5*10^12, first 203 terms from Robert G. Wilson v)

%p P:=proc(n) local i,k,w,sp; sp:=0; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; sp:=sp+w; if sp/i=trunc(sp/i) then print(i); fi; od; end: P(5000); # _Paolo P. Lava_, Jul 30 2007

%t lst = {}; k = 1; s = 0; While[k < 10001, If[ Mod[s += Plus @@ IntegerDigits@k, k++] == 0, AppendTo[lst, k -1]]]; lst (* _Robert G. Wilson v_, Jul 06 2018 *)

%t nxt[{t_,n_}]:={t+Total[IntegerDigits[n+1]],n+1}; Select[NestList[nxt,{1,1},55000],Divisible[#[[1]],#[[2]]]&][[All,2]] (* _Harvey P. Dale_, Jan 18 2019 *)

%o (PARI) isok(n) = (sum(k=1, n, sumdigits(k)) % n) == 0; \\ _Michel Marcus_, Jul 16 2018

%Y Cf. A037123.

%K base,nonn

%O 1,2

%A _David W. Wilson_, Feb 02 2006

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 22 02:44 EDT 2019. Contains 326169 sequences. (Running on oeis4.)