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!)
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

%I #21 Mar 28 2022 14:09:08

%S 1,2,3,4,5,6,7,8,9,22,36,44,63,66,88,123,132,138,145,154,159,167,176,

%T 183,189,195,198,213,224,231,235,242,246,253,257,264,268,275,279,286,

%U 297,312,318,321,325,333,345,347,352,354,357,369,374,375,381,396,415

%N Numbers k such that (product of digits of k) is divisible by (sum of digits of k), where 0's are not permitted.

%C Called "perfect years". 1998 and 2114 are the nearest past and future examples.

%D H. Herles, Reformstau, Gefuehlsstau, Verkehrsstau. Generalanzeiger, 12/31/1997, p. V.

%D H. Muller-Merbach and L. Logelix, Perfekte Jahre, Technologie und Management, Vol. 42, 1993, No. 1, p. 47 and No. 2, p. 95.

%H David A. Corneth, <a href="/A061013/b061013.txt">Table of n, a(n) for n = 1..10000</a>

%H H. Muller-Merbach, <a href="http://www-bior.sozwi.uni-kl.de/1998/welcome.htm">Wunsche für das "perfekte Jahr" 1998</a>

%e 1998 is perfect since 1*9*9*8/(1+9+9+8) = 24.

%p 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:

%t Select[Range[415], FreeQ[x = IntegerDigits[#], 0] && Divisible[Times @@ x, Plus @@ x] &] (* _Jayanta Basu_, Jul 13 2013 *)

%o (PARI) is(n) = my(d = digits(n)); vd = vecprod(d); vd != 0 && vd % vecsum(d) == 0 \\ _David A. Corneth_, Mar 15 2021

%o (Python)

%o from math import prod

%o def ok(n):

%o d = list(map(int, str(n)))

%o pod, sod = prod(d), sum(d)

%o return pod and pod%sod == 0

%o print([k for k in range(416) if ok(k)]) # _Michael S. Branicky_, Mar 28 2022

%Y See A038367 for case where 0 digits are allowed. Cf. A055931.

%Y Cf. A274124.

%K nonn,easy,base

%O 1,2

%A Heiner Muller-Merbach (hmm(AT)sozwi.uni-kl.de), Jun 06 2001

%E More terms from Larry Reeves (larryr(AT)acm.org) and _Vladeta Jovovic_, Jun 07 2001

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 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)