login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113578 a(1) = 1, then the rearrangement of odd palindromes such that every concatenation is a prime for n > 1. 1

%I #13 Oct 13 2019 07:40:20

%S 1,3,7,11,9,111,33,99,717,151,383,969,3003,3663,141,121,10101,11711,

%T 393,11811,363,979,77,34443,171,14941,989,919,707,34243,929,7557,

%U 18781,18681,131,11511,30303,10701,12421,12321,747,7667,1441,14841,13431,797,16861

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

%C 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

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

%o (PARI) findnew(va, n, vp, ilast) = {s= ""; for (i=1, n-1, 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;}

%o 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

%Y Cf. A113577, A113579.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Nov 06 2005

%E Corrected and extended by _Michel Marcus_, Feb 06 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:59 EDT 2024. Contains 371935 sequences. (Running on oeis4.)