%I #20 Jan 26 2024 05:30:45
%S 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,111,112,113,114,115,116,
%T 117,118,119,236,315,324,612,1111,1112,1113,1114,1115,1116,1117,1118,
%U 1119,1236,1315,1324,1612,2136,2312,3115,3124,3212,4384,5175,6112,7735
%N Numbers k which have nonzero digital product equal to the last digits of k.
%H Karl-Heinz Hofmann, <a href="/A167619/b167619.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) < 10^n, since 11...1 is always a member of this sequence; for n > 18, a(n) > n^1.0479 because 0's are not allowed in the decimal expansion.
%e 4384 is a term because 4*3*8*4 = 384 and the last digits of 4384 are 384.
%o (PARI) dprod(n)=my(pr=1);while(n,pr*=n%10;n\=10);pr
%o isA167619(n)=my(d=dprod(n));d>0&&d==n%10^(#Str(d))
%o (Python)
%o A167619 = []
%o for k in range(1,7736):
%o dprod, k_str = 1, str(k)
%o for d in range(0,len(k_str)): dprod *= int(k_str[d])
%o if dprod != 0 and str(dprod) == k_str[-(len(str(dprod))):]: A167619.append(k)
%o print(A167619) # _Karl-Heinz Hofmann_, Jan 26 2024
%K nonn,base
%O 1,2
%A _Claudio Meller_, Nov 07 2009
%E Formula and programs by _Charles R Greathouse IV_, Nov 09 2009
|