login
Numbers with multiplicative digital root of 5 that are free of 1s and have their digits in ascending order.
1

%I #36 Apr 18 2024 18:06:10

%S 5,35,57,355,359,557,579,3335,3357,5579,5777,33557,35559,333555,

%T 357799,557779,3335779,3355777,33333577

%N Numbers with multiplicative digital root of 5 that are free of 1s and have their digits in ascending order.

%C Conjectured to be complete.

%C If it exists, a(20) > 10^500. - _Michael S. Branicky_, Apr 18 2024

%t A031347 = Table[NestWhile[Times @@ IntegerDigits[#] &, n, # > 9 &], {n, 1, 100000}]; Select[Range[100000], A031347[[#]] == 5 && DigitCount[#, 10, 1] == 0 && Sort[IntegerDigits[#]] == IntegerDigits[#] &] (* _Vaclav Kotesovec_, Apr 17 2024 *)

%o (Python)

%o from math import prod

%o from itertools import count, islice, combinations_with_replacement as mc

%o def A031347(n):

%o while n > 9: n = prod(map(int, str(n)))

%o return n

%o def bgen(): yield from (m for d in count(1) for m in mc((3,5,7,9), d))

%o def agen(): yield from (int("".join(map(str, t))) for t in bgen() if A031347(prod(t)) == 5)

%o print(list(islice(agen(), 19))) # _Michael S. Branicky_, Apr 17 2024, edited Apr 18 2024 after _Chai Wah Wu_

%o (Python)

%o from math import prod

%o from itertools import count, islice

%o def A371561_gen(): # generator of terms

%o for l in count(1):

%o for a in range(l,-1,-1):

%o a3 = 3**a

%o for b in range(l-a,-1,-1):

%o b3 = a3*5**b

%o for c in range(l-a-b,-1,-1):

%o d = l-a-b-c

%o d3 = b3*7**c*9**d

%o while d3 > 9:

%o d3 = prod(int(x) for x in str(d3))

%o if d3==5:

%o yield (10**(a+b+c+d)-1)//3+(10**d*(10**c*(10**b+1)+1)-3)*2//9

%o A371561_list = list(islice(A371561_gen(),19)) # _Chai Wah Wu_, Apr 17 2024

%Y Cf. A034052, A263473, A263479, A031347.

%K nonn,more,base

%O 1,1

%A _Sergio Pimentel_, Mar 27 2024