OFFSET
1,2
COMMENTS
By definition, all terms have an odd number of digits. It is not surprising that the sequence of middle digits is 1, 4, 6, 8, 9, 0. - Harvey P. Dale, Jun 15 2024
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MAPLE
ts_num_midpal := proc(n) local ad, adr, midigit; ad := convert(n, base, 10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2, ad ): if (isprime( midigit )='false' and adr=ad) then return 0; else return 1; fi end: ts_n_pal := proc(n) if ts_num_midpal(n) = 0 then return (i) fi end: anpal := [seq(ts_n_pal(i), i=1..50000)]: anpal;
MATHEMATICA
Select[Range[1000], PalindromeQ[#]&&OddQ[IntegerLength[#]]&&!PrimeQ[IntegerDigits[#][[(IntegerLength[#]+1)/2]]]&] (* Harvey P. Dale, Jun 15 2024 *)
PROG
(Python)
from itertools import chain, count, islice
def A076612_gen(): # generator of terms
return chain((1, 4, 6, 8, 9), chain.from_iterable((int((s:=str(d))+e+s[::-1]) for d in range(10**l, 10**(l+1)) for e in '014689') for l in count(0)))
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Jani Melik, Oct 21 2002
STATUS
approved