login
A061013
Numbers k such that (product of digits of k) is divisible by (sum of digits of k), where 0's are not permitted.
6
1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 36, 44, 63, 66, 88, 123, 132, 138, 145, 154, 159, 167, 176, 183, 189, 195, 198, 213, 224, 231, 235, 242, 246, 253, 257, 264, 268, 275, 279, 286, 297, 312, 318, 321, 325, 333, 345, 347, 352, 354, 357, 369, 374, 375, 381, 396, 415
OFFSET
1,2
COMMENTS
Called "perfect years". 1998 and 2114 are the nearest past and future examples.
REFERENCES
H. Herles, Reformstau, Gefuehlsstau, Verkehrsstau. Generalanzeiger, 12/31/1997, p. V.
H. Muller-Merbach and L. Logelix, Perfekte Jahre, Technologie und Management, Vol. 42, 1993, No. 1, p. 47 and No. 2, p. 95.
EXAMPLE
1998 is perfect since 1*9*9*8/(1+9+9+8) = 24.
MAPLE
for n from 1 to 3000 do a := convert(n, base, 10):s := add(a[i], i=1..nops(a)):p := mul(a[i], i=1..nops(a)): if p<>0 and p mod s=0 then printf(`%d, `, n):fi:od:
MATHEMATICA
Select[Range[415], FreeQ[x = IntegerDigits[#], 0] && Divisible[Times @@ x, Plus @@ x] &] (* Jayanta Basu, Jul 13 2013 *)
PROG
(PARI) is(n) = my(d = digits(n)); vd = vecprod(d); vd != 0 && vd % vecsum(d) == 0 \\ David A. Corneth, Mar 15 2021
(Python)
from math import prod
def ok(n):
d = list(map(int, str(n)))
pod, sod = prod(d), sum(d)
return pod and pod%sod == 0
print([k for k in range(416) if ok(k)]) # Michael S. Branicky, Mar 28 2022
CROSSREFS
See A038367 for case where 0 digits are allowed. Cf. A055931.
Cf. A274124.
Sequence in context: A108194 A083158 A254956 * A037264 A274124 A045910
KEYWORD
nonn,easy,base
AUTHOR
Heiner Muller-Merbach (hmm(AT)sozwi.uni-kl.de), Jun 06 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org) and Vladeta Jovovic, Jun 07 2001
STATUS
approved