login
Numbers n such that n and its digital reversal have the same prime divisors.
14

%I #18 Dec 07 2019 12:18:25

%S 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151,

%T 161,171,181,191,202,212,222,232,242,252,262,272,282,292,303,313,323,

%U 333,343,353,363,373,383,393,404,414,424,434,444,454,464,474,484,494

%N Numbers n such that n and its digital reversal have the same prime divisors.

%C Contains the palindromes A002113 as a subsequence. 1089 and 2178 are the first two non-palindromic terms. Any number of concatenations of 1089 with itself or 2178 with itself gives a term; e.g. 10891089 etc. Hence there are infinitely many non-palindromic terms. They are given in A110819.

%H Derek Orr, <a href="/A110751/b110751.txt">Table of n, a(n) for n = 1..1000</a>

%e 1089 = 3^2*11^2, 9801 = 3^4*11^2.

%t Select[ Range[ 500], First /@ FactorInteger[ # ] == First /@ FactorInteger[ FromDigits[ Reverse[ IntegerDigits[ # ]]]] &] (* _Robert G. Wilson v_ *)

%o (PARI) is_A110751(n)={ local(r=eval(concat(vecextract(Vec(Str(n)),"-1..1")))); r==n || factor(r)[,1]==factor(n)[,1] } /* _M. F. Hasler_ */

%o (Python)

%o from sympy import primefactors

%o A110751 = [n for n in range(1,10**5) if primefactors(n) == primefactors(int(str(n)[::-1]))] # _Chai Wah Wu_, Aug 14 2014

%Y Cf. A002113, A110819.

%K base,easy,nonn

%O 1,2

%A _Amarnath Murthy_, Aug 11 2005

%E Edited and extended by _Robert G. Wilson v_, Sep 21 2005

%E Corrected comment, added PARI code. - _M. F. Hasler_, Nov 16 2008