cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240454 Smallest prime divisors of the palindromes with an even number of digits.

This page as a plain text file.
%I A240454 #19 Nov 02 2021 09:52:16
%S A240454 11,2,3,2,5,2,7,2,3,7,11,3,11,11,3,11,7,3,11,2,2,2,2,2,2,2,2,2,2,3,11,
%T A240454 11,3,11,11,3,7,11,3,2,2,2,2,2,2,2,2,2,2,5,3,5,5,3,5,5,3,5,5,2,2,2,2,
%U A240454 2,2,2,2,2,2,7,11,3,11,11,3,11,7,3,11,2,2,2
%N A240454 Smallest prime divisors of the palindromes with an even number of digits.
%C A240454 a(n) is the smallest prime divisor of A056524(n), or smallest prime divisor of the concatenation of a number n and reverse(n).
%H A240454 Michel Lagneau, <a href="/A240454/b240454.txt">Table of n, a(n) for n = 1..10000</a>
%F A240454 a(n) = A020639(A056524(n)).
%e A240454 a(10) = 7 because the concatenation of 10 and 01 is 1001 = 7*11*13 where 7 is the smallest divisor of 1001.
%p A240454 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[1]:printf(`%d, `,d):od:
%t A240454 d[n_]:=IntegerDigits[n];Table[FactorInteger[FromDigits[Join[x=d[n],Reverse[x]]]][[1,1]],{n,1,100}]
%t A240454 Table[FactorInteger[#][[1,1]]&/@Select[Range[10^n,10^(n+1)-1],PalindromeQ],{n,1,3,2}]//Flatten (* _Harvey P. Dale_, Jul 19 2021 *)
%o A240454 (Python)
%o A240454 from sympy import primefactors
%o A240454 def a(n): s = str(n); return min(primefactors(int(s + s[::-1])))
%o A240454 print([a(n) for n in range(1, 83)]) # _Michael S. Branicky_, Nov 02 2021
%Y A240454 Cf. A020639, A056524, A240453.
%K A240454 nonn,base,easy
%O A240454 1,1
%A A240454 _Michel Lagneau_, Apr 05 2014