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!)
A088084 a(1) = 2; then least palindrome greater than the previous term such that every partial concatenation is a prime. 2

%I #6 Dec 05 2013 19:56:33

%S 2,3,9,11,313,353,363,373,3993,10401,11911,16061,16861,17571,30903,

%T 33633,34043,39693,74347,147741,370073,768867,795597,960069,962269,

%U 1036301,1165611,1405041,1485841,1498941,1601061,1644461,1934391

%N a(1) = 2; then least palindrome greater than the previous term such that every partial concatenation is a prime.

%e 2, 23, 239, 23911, etc., are primes.

%t NextPalindrome[n_] := Block[{l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]]; a = 2; k = 2; f[n_, m_] := Block[{k = NextPalindrome[m]}, While[b = FromDigits[ Join[ IntegerDigits[n], IntegerDigits[k]]]; !PrimeQ[b], k = NextPalindrome[k]]; Return[b]]; f[2, 2]; f[%, 3]; etc.

%Y Cf. A088085, A088086.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Sep 22 2003

%E Edited, corrected and extended by _Robert G. Wilson v_, Sep 27 2003

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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)