login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A272360
Numbers n such that the sum of the digits of the numbers from 1 to n divides the sum of the numbers from 1 to n.
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 80, 119, 180, 398, 399, 998, 999, 1055, 1809, 2715, 4063, 4529, 11374, 18180, 19199, 27269, 54519, 110549, 113695, 168399, 294999, 454511, 624591, 636349, 639999, 1090719, 1818180, 2350079, 9639999, 17576999, 17914111, 54545436, 61484399, 81818169, 91728090, 466359999, 909091519, 909113679, 909156319, 911363679, 915636319, 999999998, 999999999
OFFSET
1,2
COMMENTS
The ratios for the numbers in the list are: 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 7, 10, 19, 19, 37, 37, 40, 67, 97, 136, 151, 325, 505, 526, 737, 1363, 2497, 2584, 3789, 6313, 9469, 12507, 12727, 12784, 20451, 33670, 43214, 154481, 280413, 284734, 814111, 905187
The sequence is infinite, since it contains all the numbers of the form 10^(3^k)-1 and 10^(3^k)-2. For these numbers the ratio is (10^(3^k)-1)/(9*3^k), which is an integer because in general x^(3^k)-1 can be factored into (x-1)(x^2+x+1)(x^6+x^3+1)(x^18+x^9+1)...(x^(2*3^(k-1))+x^(3^(k-1))+1) and since here x=10, x-1=9 and each of the following k factors is divisible by 3 because its sum of digits is 3, thus 10^(3^k)-1 is divisible by 9*3^k. - Giovanni Resta, Apr 27 2016
FORMULA
Solutions for A037123(n) | A000217(n).
EXAMPLE
The sum of the digits of the numbers from 1 to 80 is 648; the sum of the numbers from 1 to 80 is 80*81/2 = 3240 and 3240 / 648 = 5
MAPLE
P:=proc(q) local b, k; global a, n; a:=0; for n from 1 to q do
b:=n; for k from 1 to ilog10(n)+1 do a:=a+(b mod 10); b:=trunc(b/10); od;
if type(n*(n+1)/(2*a), integer) then print(n); fi; od; end: P(10^9);
MATHEMATICA
With[{nn=10^9}, Position[Thread[{Accumulate[Range[nn]], Accumulate[ Table[ Total[ IntegerDigits[n]], {n, nn}]]}], _?(Divisible[#[[1]], #[[2]]]&), 1, Heads->False]]//Flatten (* Harvey P. Dale, Sep 30 2017 *)
PROG
(PARI) list(lim)=my(v=List(), s, t); for(n=1, lim, s+=n; t+=sumdigits(n); if(s%t==0, listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Apr 29 2016
CROSSREFS
Sequence in context: A348799 A341909 A024663 * A288946 A237346 A193757
KEYWORD
nonn,base,changed
AUTHOR
Paolo P. Lava, Apr 27 2016
EXTENSIONS
a(43)-a(52) from Charles R Greathouse IV, Apr 29 2016
STATUS
approved