OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
1718191817 is a term as the concatenation of 17,18,19,18 and 17.
MAPLE
for n from 1 to 1500 do a := n+10^( floor(evalf(log(n)/log(10))+0.0000000001 )+1)*(n+1); a := a+10^( floor(evalf(log(a)/log(10))+0.0000000001 )+1)*(n+2); a := a+10^( floor(evalf(log(a)/log(10))+0.0000000001 )+1)*(n+1); a := a+10^( floor(evalf(log(a)/log(10))+0.0000000001 )+1)*n; b[n] := a:end do:k := 0:for n from 2 to 1500 doif(isprime(b[n]) ) then k := k+1:c[k] := b[n]:end if:end do:seq(c[j], j=1..k);
MATHEMATICA
Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n+1], IntegerDigits[n+2], IntegerDigits[n+1], IntegerDigits[n], {}}]], {n, 1000}], PrimeQ] (* Vincenzo Librandi, Mar 13 2013 *)
Select[Table[FromDigits[Flatten[IntegerDigits/@Join[Range[n, n+2], Range[n+1, n, -1]]]], {n, 300}] PrimeQ] (* Harvey P. Dale, Sep 04 2024 *)
PROG
(Magma) [m: n in [1..300] | IsPrime(m) where m is Seqint([] cat Intseq(n) cat Intseq(n+1) cat Intseq(n+2) cat Intseq(n+1) cat Intseq(n))]; // Vincenzo Librandi, Mar 13 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 04 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 27 2002
STATUS
approved