login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352463
Numbers k with the property that the product of the digits of k starts k.
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 31, 41, 51, 61, 71, 81, 91, 111, 126, 153, 211, 243, 311, 362, 411, 511, 611, 711, 811, 911, 1111, 1216, 1223, 1232, 1261, 1288, 1359, 1449, 1513, 1531, 1755, 2111, 2413, 2431, 3111, 3612, 3621, 3844, 4111, 5111, 6111, 6728, 7111, 7357, 8111, 9111, 11111, 11278, 11287
OFFSET
1,2
EXAMPLE
a(10) = 11 starts with 1, which is the product 1*1;
a(20) = 126 starts with 12, which is the product 1*2*6;
a(42) = 1755 starts with 175, which is the product ; 1*7*5*5; etc.
MATHEMATICA
q[n_] := Module[{d = IntegerDigits[n], p, dp, ndp}, p = Times @@ d; dp = IntegerDigits[p]; ndp = Length[dp]; dp == d[[1 ;; ndp]]]; Select[Range[12000], q] (* Amiram Eldar, Mar 18 2022 *)
PROG
(Python)
from math import prod
def ok(n): s = str(n); return s.startswith(str(prod(map(int, s))))
print([k for k in range(1, 12000) if ok(k)]) # Michael S. Branicky, Mar 17 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Mar 17 2022
STATUS
approved