login
Non-palindromic numbers whose digit reversal have the same sum of prime factors (with repetition).
2

%I #21 Mar 05 2026 16:01:16

%S 45,54,250,495,594,1131,1311,2262,2550,2622,2750,2926,3393,3933,4154,

%T 4489,4514,4545,4636,4995,5454,5808,5994,6292,6364,6550,7800,8085,

%U 8749,9478,9844,12441,13980,14269,14421,15167,15180,15602,16237,18449,18977

%N Non-palindromic numbers whose digit reversal have the same sum of prime factors (with repetition).

%H Scott R. Shannon, <a href="/A085607/b085607.txt">Table of n, a(n) for n = 1..10000</a> (1..500 from Harvey P. Dale).

%e 250 is a term because 250 = 2*5^3 and 52 = 2^2*13 and 2+5+5+5 = 2+2+13 = 17.

%t spf[n_]:=Total[Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]];

%t spffQ[ n_]:=!PalindromeQ[n]&&spf[n]==spf[IntegerReverse[n]];

%t Select[Range[ 20000], spffQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 19 2017 *)

%o (Python)

%o from sympy import factorint

%o def sopfr(n): return sum(p*e for p, e in factorint(n).items())

%o def ok(n): return n != (r:=int(str(n)[::-1])) and sopfr(n) == sopfr(r)

%o print([k for k in range(20000) if ok(k)]) # _Michael S. Branicky_, Mar 05 2026

%Y Cf. A001414, A029742.

%K base,nonn

%O 1,1

%A _Jason Earls_, Jul 08 2003

%E Corrected by _T. D. Noe_, Oct 25 2006