A067734 Number of ways writing n as a product of decimal digits of some other number which has no digits equal to 1.
0, 1, 1, 2, 1, 3, 1, 4, 2, 2, 0, 7, 0, 2, 2, 7, 0, 7, 0, 5, 2, 0, 0, 17, 1, 0, 3, 5, 0, 8, 0, 13, 0, 0, 2, 21, 0, 0, 0, 12, 0, 8, 0, 0, 5, 0, 0, 38, 1, 3, 0, 0, 0, 15, 0, 12, 0, 0, 0, 24, 0, 0, 5, 24, 0, 0, 0, 0, 0, 6, 0, 58, 0, 0, 3, 0, 0, 0, 0, 26, 5, 0, 0, 24, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 82, 0
Offset: 1
Examples
There are 21 other numbers with no digit 1 whose digit product equals 36: 49, 66, 94, 229, 236, 263, 292, 326, 334, 343, 362, 433, 623, 632, 922, 2233, 2323, 2332, 3223, 3232, 3322. If 1-digits were permitted then an infinite number of solutions would exist, e.g., 111114111113111113. If n has a prime divisor larger than 7, i.e., a prime divisor that is two or more digits in length, such as 11, then no solutions exist at all. The largest solution is a (decimal) number created by concatenating not-necessarily-distinct prime factors, such as 36 = 3*2*2*2. [edited by _Jon E. Schoenfield_, Jun 14 2017]
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
id1[x_] := IntegerDigits[x]; id2[x_] := DeleteCases[id1[x], 1] f[x_] := Apply[Times, IntegerDigits[x]]; k=0; Do[s=f[n]; If[Equal[s, 36]&&!Greater[Length[id1[n]], Length[id2[n]]], k=k+1; Print[{k, n}]], {n, 1, 3400}]
-
PARI
{ A067734(n) = local(v,r,i2,i3); v=vector(4,i,valuation(n,prime(i))); if(n==1||n!=prod(i=1,4,prime(i)^v[i]), return(0)); r=0; for(i6=0,min(v[1],v[2]), for(i8=0,(v[1]-i6)\3, for(i4=0,(v[1]-i6-3*i8)\2, i2=v[1]-i6-3*i8-2*i4; for(i9=0,(v[2]-i6)\2, i3=v[2]-i6-2*i9; r += (i2+i3+i4+v[3]+i6+v[4]+i8+i9)! / i2! / i3! / i4! / v[3]! / i6! / v[4]! / i8! / i9! )))); r } \\ Max Alekseyev, Sep 19 2009
Formula
a(A002473(n)) > 0 for n > 1. - David A. Corneth, Jun 14 2017
Comments