[go: up one dir, main page]

login
Search: a052490 -id:a052490
     Sort: relevance | references | number | modified | created      Format: long | short | data
Inconsummate numbers in base 10: no number is this multiple of the sum of its digits (in base 10).
(Formerly M5325)
+0
21
62, 63, 65, 75, 84, 95, 161, 173, 195, 216, 261, 266, 272, 276, 326, 371, 372, 377, 381, 383, 386, 387, 395, 411, 416, 422, 426, 431, 432, 438, 441, 443, 461, 466, 471, 476, 482, 483, 486, 488, 491, 492, 493, 494, 497, 498, 516, 521, 522, 527, 531, 533, 536
OFFSET
1,1
REFERENCES
J. H. Conway, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
MAPLE
For Maple code see A058906.
MATHEMATICA
nmax = 1000; Reap[ Do[k = n; kmax = 100*n; While[ Tr[ IntegerDigits[k]]*n != k && k < kmax, k = k + n]; If[k == kmax, Sow[n]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Jul 12 2012 *)
PROG
(Python)
from itertools import count, islice, combinations_with_replacement
def A003635_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
for l in count(1):
if 9*l*n < 10**(l-1):
yield n
break
for d in combinations_with_replacement(range(10), l):
if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
break
else:
continue
break
A003635_list = list(islice(A003635_gen(), 20)) # Chai Wah Wu, May 09 2023
KEYWORD
nonn,easy,nice,base
STATUS
approved
Number of positive solutions to "numbers that are n times sum of their digits".
+0
4
9, 1, 1, 4, 1, 1, 4, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 11, 1, 1, 3, 1, 1, 3, 2, 2, 12, 1, 1, 3, 1, 1, 4, 1, 2, 15, 2, 1, 4, 1, 1, 3, 1, 1, 13, 2, 2, 3, 1, 1, 4, 1, 1, 13, 1, 1, 2, 1, 1, 3, 0, 0, 7, 0, 1, 4, 1, 1, 4, 1, 1, 8, 1, 0, 3, 1, 1, 4, 1, 1, 10, 1, 0, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 0, 1, 3, 1, 1, 9, 1
OFFSET
1,1
COMMENTS
It appears that the largest terms occur when n=1 mod 9 and moderately large terms when n=4 or 7 mod 9.
LINKS
EXAMPLE
a(13)=3 since the only three solutions are 117=9*13, 156=12*13 and 195=15*13.
MAPLE
read("transforms"):
A037478 := proc(n)
local a, x, k;
a := 0 ;
for k from 1 do
x := n*k ;
if digsum(x)*n = x then
a := a+1 ;
end if;
# may stop if x/digsum(x)>n, so if x/#digits(x) > 9*n
if x/A055642(x) > 9*n then
break;
end if;
end do:
a ;
end proc:
seq(A037478(n), n=1..101) ; # R. J. Mathar, May 11 2016
KEYWORD
nonn,base
AUTHOR
Henry Bottomley, Sep 12 2000
STATUS
approved
Largest number that is n times sum of its decimal digits.
+0
11
0, 9, 18, 27, 48, 45, 54, 84, 72, 81, 90, 198, 108, 195, 126, 135, 288, 153, 162, 399, 180, 378, 396, 207, 216, 375, 468, 486, 588, 261, 270, 558, 576, 594, 408, 315, 648, 999, 684, 351, 480, 738, 756, 774, 792, 405, 966, 846, 864, 882, 450, 918, 936, 954
OFFSET
0,2
COMMENTS
It is infinite, as pointed out by Dr. Geoffrey Landis: Clearly if you have one integer that is N times the sum of its decimal digits, then when you add a 0 to the end, you have an integer that is 10N times the sum of its decimal digits. - Jonathan Vos Post, Feb 06 2011
LINKS
MATHEMATICA
p[n_] := 10(Length[IntegerDigits[n]]+1); a[0]=0; a[n_] := Catch[For[k = p[n]*n, k >= 0, k--, If[k == n*Total[IntegerDigits[k]], If[k == 0, Print["a(", n, ") not found"]]; Throw[k]]]]; Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Jul 19 2012 updated Oct 06 2016 after Daniel Mondot's observations *)
PROG
(PARI) a(n) = {nbd = 1; while (9*nbd*n > 10^nbd, nbd++); forstep(k=9*nbd*n, 1, -1, if (sumdigits(k)*n == k, return(k)); ); 0; } \\ Michel Marcus, Oct 05 2016
CROSSREFS
KEYWORD
base,nonn,nice,look
AUTHOR
Henry Bottomley, Mar 16 2000
STATUS
approved
a(n) = n times sum of digits of n.
+0
25
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 22, 36, 52, 70, 90, 112, 136, 162, 190, 40, 63, 88, 115, 144, 175, 208, 243, 280, 319, 90, 124, 160, 198, 238, 280, 324, 370, 418, 468, 160, 205, 252, 301, 352, 405, 460, 517, 576, 637, 250, 306, 364, 424, 486, 550, 616
OFFSET
0,3
COMMENTS
A056992(n) = A010888(a(n)). - Reinhard Zumkeller, Mar 19 2014
LINKS
F. B. Diniz, About a new family of sequences, arXiv:1607.06082 [math.GM], 2016.
FORMULA
a(n) = n*A007953(n). - Michel Marcus, Aug 10 2014
G.f.: x * (d/dx) (1/(1 - x))*Sum_{k>=1} (x^k - x^(10^k+k) - 9*x^(10^k))/(1 - x^(10^k)). - Ilya Gutkovskiy, Mar 27 2018
MAPLE
for n from 0 to 150 do printf(`%d, `, n*add(convert(n, base, 10)[i], i=1..nops(convert(n, base, 10)))) od:
MATHEMATICA
Table[n*Total[IntegerDigits[n]], {n, 0, 100}]
PROG
(Haskell)
a057147 n = a007953 n * n -- Reinhard Zumkeller, Mar 19 2014
(PARI) a(n) = n*sumdigits(n) \\ Franklin T. Adams-Watters, Aug 03 2014
(Python)
[n*sum([int(d) for d in str(n)]) for n in range(10**5)] # Chai Wah Wu, Aug 05 2014
CROSSREFS
Iterations: A047892 (start=2), A047912 (start=3), A047897 (start=5), A047898 (start=6), A047899 (start=7), A047900 (start=8), A047901 (start=9), A047902 (start=11).
KEYWORD
nonn,base,easy,look
AUTHOR
N. J. A. Sloane, Sep 13 2000
EXTENSIONS
More terms from James A. Sellers and Larry Reeves (larryr(AT)acm.org), Sep 13 2000
STATUS
approved

Search completed in 0.010 seconds