login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238088 a(n) is the smallest k > 0 such that the first n multiples of k have the same sum of digits, but (n+1)k has a different one. a(n)=0 if no such k exists. 2
1, 63, 72, 135, 81, 27, 36, 1881, 0, 9, 549, 1683, 1782, 3465, 1728, 1287, 1386, 891, 0, 1188, 95904, 693, 87912, 204795, 81918, 42957, 73926, 792, 0, 40959, 65934, 36963, 67932, 1485, 61938, 297, 53946, 28971, 0, 30969, 1881198, 26973, 47952, 114885, 4419558 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(10*t-1) = 0 for t > 0, because if the first 10*t-1 multiples of a number k have the same sum of digits, then 10*t*k also has the same sum, since sod(10*t*k) = sod(t*k).
LINKS
EXAMPLE
a(4) = 135 since 1*135 = 135, 2*135 = 270, 3*135 = 405 and 4*135 = 540 all have the same sum of digits (9) while 5*135 = 675 has a different sum of digits.
MATHEMATICA
sod[n_] := Plus @@ IntegerDigits@n; okQ[n_, k_] := Catch@Block[{s = sod@k}, Do[If[ sod[j*k] != s, Throw@ False], {j, 2, n}]; sod[k*(n + 1)] != s]; a[n_] := If[ Mod[n, 10] == 9, 0, Block[{k = 1}, While[! okQ[n, k], k++]; k]]; Array[a, 20]
PROG
(PARI) for(r=2, 46, n=0; if(Mod(r, 10)==0, print1(n, ", "), until(m==r, n++; s=sumdigits(n); m=1; until(!(sumdigits(n*m)==s), m++)); print1(n, ", "))); \\ Arkadiusz Wesolowski, Feb 21 2014
CROSSREFS
Sequence in context: A095543 A347944 A073569 * A350960 A046049 A240528
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, Feb 17 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)