A240453 Greatest prime divisors of the palindromes with an even number of digits.
11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 101, 37, 11, 131, 47, 151, 23, 19, 181, 13, 11, 101, 53, 37, 29, 11, 11, 131, 17, 13, 283, 293, 101, 313, 19, 37, 11, 353, 11, 13, 17, 11, 197, 101, 23, 53, 31, 37, 227, 13, 31, 19, 97, 11, 101, 103, 11, 107, 109, 13
Offset: 1
Examples
a(10) = 13 because the concatenation of 10 and 01 is 1001 = 7*11*13 where 13 is the greatest divisor of 1001.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory):for n from 1 to 100 do:x:=convert(n,base,10):n1:=nops(x): s:=sum('x[i]*10^(n1-i)', 'i'=1..n1):y:=n*10^n1+s:z:=factorset(y):n2:=nops(z):d:=z[n2]:printf(`%d, `,d):od:
-
Mathematica
d[n_]:=IntegerDigits[n];Table[FactorInteger[FromDigits[Join[x=d[n],Reverse[x]]]][[-1,1]],{n,1,100}] FactorInteger[#][[-1,1]]&/@Flatten[Table[Select[Range[10^n,10^(n+1)-1],PalindromeQ],{n,1,3,2}]] (* Harvey P. Dale, Dec 06 2021 *)
-
Python
from sympy import primefactors def a(n): s = str(n); return max(primefactors(int(s + s[::-1]))) print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Nov 11 2021
Comments