Search: a003634 -id:a003634
|
|
A007471
|
|
Sum of digits of n a(n) is n ( = A003634/n), or 0 if no such number exists.
(Formerly M4597)
|
|
+20
0
|
|
|
1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 18, 9, 9, 9, 9, 9, 9, 9, 6, 9, 18, 6, 9, 9, 6, 9, 9, 4, 9, 9, 12, 18, 18, 3, 9, 9, 3, 9, 9, 3, 18, 18, 12, 18, 9, 5, 9, 9, 9, 9, 18, 6, 18, 18, 2, 9, 9, 9, 9, 9, 12, 0, 0, 5, 0, 18, 3, 9, 9, 3, 18, 18, 7, 27, 0, 12, 18
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A057147
|
|
a(n) = n times sum of digits of n.
|
|
+10
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
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)
(Python)
[n*sum([int(d) for d in str(n)]) for n in range(10**5)] # Chai Wah Wu, Aug 05 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from James A. Sellers and Larry Reeves (larryr(AT)acm.org), Sep 13 2000
|
|
STATUS
|
approved
|
|
|
|
|
A003635
|
|
Inconsummate numbers in base 10: no number is this multiple of the sum of its digits (in base 10).
(Formerly M5325)
|
|
+10
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A052489
|
|
Largest number that is n times sum of its decimal digits.
|
|
+10
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A072081
|
|
Numbers divisible by the square of the sum of their digits in base 10.
|
|
+10
9
|
|
|
1, 10, 20, 50, 81, 100, 112, 162, 200, 243, 324, 392, 400, 405, 500, 512, 605, 648, 810, 972, 1000, 1053, 1100, 1120, 1134, 1183, 1215, 1296, 1400, 1620, 1701, 1900, 1944, 2000, 2025, 2106, 2156, 2240, 2268, 2300, 2401, 2430, 2511, 2592, 2704, 2800, 2916
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If k is a term, then 10 * k is a term. There are an infinite number of terms that are not divisible by 10. The numbers m = 24 * 10^(42 * k - 40) +1, k >= 1, are divisible by 7^2 = digsum(m)^2. Also, the numbers s = 491 * 10^(42 * k - 8) + 3, k >= 1, are divisible by 17^2 = digsum(s)^2. - Marius A. Burtea, Mar 19 2020
|
|
LINKS
|
|
|
EXAMPLE
|
k=9477, sumdigits(9477)=27, q=9477=27*27*13.
|
|
MATHEMATICA
|
sud[x_] := Apply[Plus, IntegerDigits[x]] Do[s=sud[n]^2; If[IntegerQ[n/s], Print[n]], {n, 1, 10000}]
Select[Range[3000], Divisible[#, Total[IntegerDigits[#]]^2]&] (* Harvey P. Dale, May 04 2011 *)
|
|
PROG
|
(PARI) for(n=1, 10^4, s=sumdigits(n); if(!(n%s^2), print1(n, ", "))) \\ Derek Orr, Apr 29 2015
(Magma) [k:k in [1..3000]| k mod &+Intseq(k)^2 eq 0]; // Marius A. Burtea, Mar 19 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A056770
|
|
Smallest number that is n times the product of its digits or 0 if impossible.
|
|
+10
6
|
|
|
1, 36, 15, 384, 175, 12, 735, 128, 135, 0, 11, 1296, 624, 224, 0, 0, 816, 216, 1197, 0, 315, 132, 115, 0, 0, 0, 2916, 1176, 3915, 0, 93744, 0, 51975, 78962688, 0, 82944, 1184, 0, 0, 0, 31488, 0, 0, 77616, 77175, 4416, 0, 12288, 1715, 0, 612
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 384 because 4*(product of digits of 384) = 4*96 = 384, and no number smaller than 384 has this property.
|
|
MATHEMATICA
|
Do[k = n; If[Mod[n, 10] == 0, Print[0]; Continue[]]; While[Apply[Times, RealDigits[k][[1]]]*n != k, k += n]; Print[k], {n, 1, 14}]
|
|
PROG
|
(Python)
from itertools import count, combinations_with_replacement
from math import prod
if not n%10: return 0
for l in count(1):
if 9**l*n < 10**(l-1): return 0
c = 10**l
for d in combinations_with_replacement(range(1, 10), l):
if sorted(str(a:=prod(d)*n)) == list(str(e) for e in d):
c = min(c, a)
if c < 10**l:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A065879
|
|
a(n) is the smallest positive number that is n times the number of 1's in its binary expansion, or 0 if no such number exists.
|
|
+10
5
|
|
|
1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 55, 24, 0, 42, 60, 16, 34, 36, 0, 40, 126, 110, 69, 48, 0, 0, 81, 84, 116, 120, 155, 32, 66, 68, 0, 72, 185, 0, 156, 80, 205, 252, 172, 220, 180, 138, 0, 96, 0, 0, 204, 0, 212, 162, 0, 168, 228, 232, 295, 240, 366, 310, 378, 64, 130
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is bounded above by n*A272756(n), so a program only has to check values up to that point to see if a(n) is zero. - Peter Kagey, May 05 2016
|
|
LINKS
|
|
|
EXAMPLE
|
a(23) is 69 since 69 is written in binary as 1000101, 69/(1+0+0+0+1+0+1)=23 and there is no smaller possibility (neither 23 nor 46 are divisible by their number of binary 1's).
|
|
MATHEMATICA
|
Table[SelectFirst[Range[2^12], # == n First@ DigitCount[#, 2] &] /. k_ /; MissingQ@ k -> 0, {n, 80}] (* Michael De Vlieger, May 05 2016, Version 10.2 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A037478
|
|
Number of positive solutions to "numbers that are n times sum of their digits".
|
|
+10
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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"):
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
break;
end if;
end do:
a ;
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A052490
|
|
Numbers n with only one nonzero solution to "numbers that are n times sum of their digits".
|
|
+10
4
|
|
|
2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 29, 30, 32, 33, 35, 39, 41, 42, 44, 45, 50, 51, 53, 54, 56, 57, 59, 60, 66, 68, 69, 71, 72, 74, 77, 78, 80, 81, 83, 86, 87, 89, 90, 92, 93, 96, 98, 99, 101, 102, 104, 105, 108, 110, 111, 113, 114, 117, 119, 120, 122
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=3 since there is only one positive number which is three times the sum of its digits, namely 27=3*9
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A072083
|
|
Numbers divisible by the 4th power of the sum of their digits in base 10.
|
|
+10
3
|
|
|
1, 10, 100, 1000, 2000, 2401, 5000, 10000, 13122, 20000, 24010, 50000, 100000, 110000, 131220, 140000, 190000, 200000, 230000, 234256, 240100, 280000, 320000, 370000, 390625, 400221, 410000, 460000, 500000, 512000, 550000, 614656, 640000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If k is a term, then 10*k is a term. There are an infinite number of terms that are not divisible by 10. The numbers m = 24 * 10^(294*k - 292) + 1, k = 7*a - 6, a >= 1, are divisible by 7^4 = digsum(m)^4. Also, the numbers s = 491 * 10^(4624*k - 4623) + 3, k = 17*u - 11, u >= 1, are divisible by 17^4 = digsum(s)^4. - Marius A. Burtea, Mar 19 2020
|
|
LINKS
|
|
|
EXAMPLE
|
k=614656: sumdigits(614656)=28, q=1, since k=28*28*28*28.
|
|
MATHEMATICA
|
sud[x_] := Apply[Plus, IntegerDigits[x]] Do[s=sud[n]^4; If[IntegerQ[n/s], Print[n]], {n, 1, 10000}]
Select[Range[700000], Divisible[#, Total[IntegerDigits[ #]]^4]&] (* Harvey P. Dale, Jun 28 2011 *)
|
|
PROG
|
(Magma) [k:k in [1..640000]| k mod &+Intseq(k)^4 eq 0]; // Marius A. Burtea, Mar 19 2020
(PARI) isok(m) = (m % sumdigits(m)^4) == 0; \\ Michel Marcus, Apr 02 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.007 seconds
|