

A113578


a(1) = 1, then the rearrangement of odd palindromes such that every concatenation is a prime for n > 1.


1



1, 3, 7, 11, 9, 111, 33, 99, 717, 151, 383, 969, 3003, 3663, 141, 121, 10101, 11711, 393, 11811, 363, 979, 77, 34443, 171, 14941, 989, 919, 707, 34243, 929, 7557, 18781, 18681, 131, 11511, 30303, 10701, 12421, 12321, 747, 7667, 1441, 14841, 13431, 797, 16861
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Since the first 5 terms of A083754 are odd palindromes (A029950), they are also the first 5 terms of this sequence.  Michel Marcus, Feb 06 2014


LINKS

Table of n, a(n) for n=1..47.


EXAMPLE

13, 137, 13711, 137119, 137119111, 13711911133, ..., are all prime.


PROG

(PARI) findnew(va, n, vp, ilast) = {s= ""; for (i=1, n1, s = concat(s, Str(va[i])); ); ok = 0; i = 2; while (!ok, if (vp[i] != 0, ns = concat(s, Str(vp[i])); if (isprime(eval(ns)), ok = 1); ); if (!ok, i++); if (i > #vp, return (0)); ); i; }
lista(nn) = {vn = vector(nn, i, i); vp = select(n>is_A002113(n), vn); va = vector(nn); va[1] = 1; print1(va[1], ", "); vp[1] = 0; ilast = 1; for (n = 2, vecmax(vp), inew = findnew(va, n, vp, ilast); if (! inew, break); va[n] = vp[inew]; vp[inew] = 0; print1(va[n], ", "); ilast = inew; ); } \\ Michel Marcus, Feb 06 2014


CROSSREFS

Cf. A113577, A113579.
Sequence in context: A261103 A262505 A083754 * A337250 A043345 A023718
Adjacent sequences: A113575 A113576 A113577 * A113579 A113580 A113581


KEYWORD

base,nonn


AUTHOR

Amarnath Murthy, Nov 06 2005


EXTENSIONS

Corrected and extended by Michel Marcus, Feb 06 2014


STATUS

approved



