login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Palindromic primes: insert a digit between digits of the previous term.
0

%I #12 Aug 08 2015 18:09:25

%S 11,101,16061,126202621,13236323032363231

%N Palindromic primes: insert a digit between digits of the previous term.

%C Inserted digits are 0, 6, 2, 3. If we search only for minimal inserted digit and start with 11, the sequence ends at 5th term. - _Ray Chandler_, Feb 25 2005

%e Start with 11; insert 0 between digits, 101 is prime; insert 6 between digits, 16061 is prime, etc.

%t nxt[n_]:=SelectFirst[FromDigits/@Table[Riffle[IntegerDigits[n],i],{i,0,9}],PrimeQ]; NestList[nxt,11,4] (* The program uses the SelectFirst function from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 08 2015 *)

%K fini,nonn,base

%O 1,1

%A _Zak Seidov_, Feb 23 2005

%E Corrected by _Ray Chandler_, Feb 25 2005