A245364 Let p = first digit of n, q = number obtained if p is removed from n; let r = last digit of n, s = number obtained if r is removed from n; sequence give n such that p*q = r*s != 0, p! = q, and r! = s.
111, 164, 195, 222, 265, 333, 444, 498, 555, 666, 777, 888, 999, 1111, 1664, 1995, 2222, 2665, 3333, 4444, 4847, 4998, 5555, 6545, 6666, 7424, 7777, 8888, 9999, 11111, 16664, 19995, 22222, 26665, 33333, 43243, 44444, 49998, 55555, 66666, 77777, 86486, 88888, 99999, 111111, 166664
Offset: 1
Examples
1*64 = 16*4 = 64. Thus 164 is a term of this sequence. 9*999 = 999*9 = 8991. Thus 9999 is a term of this sequence.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..74 (all terms up to 10 million)
Crossrefs
Cf. A010785.
Programs
-
Mathematica
pqrsQ[n_]:=Module[{p=IntegerDigits[n][[1]],q=FromDigits[Rest[ IntegerDigits[ n]]],r=Mod[n,10],s=Floor[n/10]},p*q==r*s!=0 && p!=q && r!=s]; Select[ Range[100,200000],pqrsQ] (* Harvey P. Dale, Aug 29 2020 *)
-
Python
for n in range(100, 10**5): s = str(n) num = int(s[:1])*int(s[1:]) if num != 0 and num == int(s[:len(s)-1])*int(s[len(s)-1:]): print(n, end=', ')
Comments