OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..7000
EXAMPLE
Obviously all terms must be palindromic; let us consider the prime factorization:
a(1) = 20522502 = 2 * 3^2 * 7 * 11 * 13 * 17 * 67 has exactly 7 distinct prime divisors, although the factor 3 appears twice in the factorization. (Without the second factor 3 the number would not be palindromic.)
a(2) = 21033012 = 2^2 * 3 * 7 * 11 * 13 * 17 * 103 has exactly 7 distinct prime divisors, although the factor 2 appears twice in the factorization. (Without the second factor 2 the number would not be palindromic.)
a(3) = 22444422 = 2 * 3 * 7 * 11 * 13 * 37 * 101 is the product of 7 distinct primes (cf. A123321), hence the first squarefree term of this sequence.
MATHEMATICA
nPal[n_]:=Module[{id=IntegerDigits[n], lid, flid2, revleft1, oklpl, lfpt1, new1, lfpt2, revleft2, new2}, lid=Length[id]; flid2=Floor[lid/2]; revleft1=Reverse[Take[id, flid2]]; oklpl=If[OddQ[lid], flid2+1, flid2]; lfpt1=Take[id, oklpl]; new1=FromDigits[Join[lfpt1, revleft1]]; lfpt2=IntegerDigits[FromDigits[lfpt1]+1]; revleft2=If[EvenQ[lid], Reverse[lfpt2], Reverse[Drop[lfpt2, -1]]]; new2=FromDigits[Join[lfpt2, revleft2]]; Which[Union[id]=={9}, n+2, new1>n, new1, True, new2]]; Select[NestList[nPal[#]&, 20522502, 10000], PrimeNu[#]==7&] (* Harvey P. Dale, Nov 29 2025 *)
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jun 06 2024
STATUS
approved
