

A316312


Numbers n such that sum of the digits of the numbers 1, 2, 3, ... up to (n  1) is divisible by n.


0



1, 3, 5, 7, 9, 12, 15, 20, 27, 40, 45, 60, 63, 80, 81, 100, 180, 181, 300, 360, 363, 500, 540, 545, 700, 720, 727, 900, 909, 912, 915, 1137, 1140, 1200, 1500, 1560, 1563, 2000, 2700, 2720, 2727, 4000, 4500, 4540, 4545, 6000, 6300, 6360, 6363, 8000, 8100, 8180
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Numbers n such that A007953(A007908(n  1)) is divisible by n.  Felix Fröhlich, Jun 29 2018
From Robert Israel, Jun 29 2018: (Start)
Numbers n such that A037123(n  1) is divisible by n.
If m is even, then 10^m, 3 * 10^m, 5 * 10^m, 7 * 10^m and 9 * 10^m are included.
If m is odd, then 2 * 10^m, 4 * 10^m, 6 * 10^m, and 8 * 10^m are included. (End)
Is it true that if k is a term then 100 * k is a term?


LINKS

Table of n, a(n) for n=1..52.


EXAMPLE

For n = 7, sum of the digits of the numbers 1 to 6 is 21, which is divisible by 7.
For n = 12, sum of the digits of the numbers 1 to 11 is 48, which is divisible by 12.
For n = 15, sum of the digits of the numbers 1 to 14 is 60, which is divisible by 15.
16 is not in the sequence because the sum of the digits of the numbers 1 to 15 is 66, which is not divisible by 16.


MAPLE

t:= 0: Res:= NULL:
for n from 1 to 10000 do
t:= t + convert(convert(n1, base, 10), `+`);
if (t/n)::integer then Res:= Res, n fi
od:
Res; # Robert Israel, Jun 29 2018


MATHEMATICA

s = 0; Reap[Do[If[Mod[s, n] == 0, Sow[n]]; s += Plus @@ IntegerDigits@n, {n, 10000}]][[2, 1]] (* Giovanni Resta, Jun 29 2018 *)


PROG

(PARI) sumsod(n) = sum(i=1, n, sumdigits(i))
is(n) = sumsod(n1)%n==0 \\ Felix Fröhlich, Jun 29 2018
(PARI) upto(n) = my(s=0, res=List()); for(i=0, n, s += vecsum(digits(i)); if(s%(i+1)==0, listput(res, i+1))); res \\ David A. Corneth, Jun 29 2018


CROSSREFS

Cf. A007953, A007908, A037123, A110740, A114136.
Sequence in context: A226332 A226331 A333601 * A118015 A265057 A122643
Adjacent sequences: A316309 A316310 A316311 * A316313 A316314 A316315


KEYWORD

nonn,base


AUTHOR

Debapriyay Mukhopadhyay, Jun 29 2018


EXTENSIONS

More terms from Felix Fröhlich, Jun 29 2018


STATUS

approved



