login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k with the property that the product of the digits of k starts k.
1

%I #12 Mar 18 2022 13:07:57

%S 1,2,3,4,5,6,7,8,9,11,21,31,41,51,61,71,81,91,111,126,153,211,243,311,

%T 362,411,511,611,711,811,911,1111,1216,1223,1232,1261,1288,1359,1449,

%U 1513,1531,1755,2111,2413,2431,3111,3612,3621,3844,4111,5111,6111,6728,7111,7357,8111,9111,11111,11278,11287

%N Numbers k with the property that the product of the digits of k starts k.

%e a(10) = 11 starts with 1, which is the product 1*1;

%e a(20) = 126 starts with 12, which is the product 1*2*6;

%e a(42) = 1755 starts with 175, which is the product ; 1*7*5*5; etc.

%t 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 *)

%o (Python)

%o from math import prod

%o def ok(n): s = str(n); return s.startswith(str(prod(map(int, s))))

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

%Y Cf. A203565, A352461, A352464.

%K base,nonn

%O 1,2

%A _Eric Angelini_ and _Carole Dubois_, Mar 17 2022