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!)
A080153 a(1)=2, a(2)=3; a(n) for n>2 is the first prime > a(n-1) such that the concatenation of a(n-1), a(n-2) and a(n) is also prime. 2
2, 3, 11, 23, 31, 41, 59, 79, 97, 107, 113, 151, 163, 179, 197, 223, 227, 241, 257, 271, 337, 383, 433, 439, 467, 491, 547, 619, 773, 797, 853, 883, 887, 911, 967, 977, 1069, 1129, 1187, 1223, 1291, 1297, 1409, 1483, 1489, 1523, 1559, 1567, 1579, 1607, 1619 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
E.g. a(3) is the smallest prime > a(2)=3 which, when concatenated to 23 (which is the concatenation of a(1) and a(2)) gives a prime. Thus a(3)=11 because 235 and 237 are composite.
MAPLE
with(numtheory): pout := [2, 3]: nout := [1, 2]: for n from 3 to 1000 do: p := ithprime(n): d := parse(cat(pout[nops(pout)-1], pout[nops(pout)], p)): if (isprime(d)) then pout := [op(pout), p]: nout := [op(nout), n]: fi: od: pout;
MATHEMATICA
a[1] = 2; a[2] = 3; a[n_] := a[n] = SelectFirst[Prime@ Range[#, 10^3 + #] &[PrimePi@ a[n - 1] + 1], PrimeQ@ FromDigits@ Join[IntegerDigits@ a[n - 2], IntegerDigits@ a[n - 1], IntegerDigits@ #] &]; Array[a, 51] (* Version 10, or *)
a[1] = 2; a[2] = 3; a[n_] := a[n] = Block[{p = PrimePi@ a[n - 1] + 1},
While[! PrimeQ@ FromDigits@ Join[IntegerDigits@ a[n - 2], IntegerDigits@ a[n - 1], IntegerDigits@ p], p = NextPrime@ p]; p]; Array[a, 51] (* Michael De Vlieger, Aug 15 2016 *)
CROSSREFS
Cf. A073640.
Sequence in context: A070174 A320393 A350853 * A040124 A082739 A158017
KEYWORD
nonn,base
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 31 2003
EXTENSIONS
Edited by Charles R Greathouse IV, Apr 26 2010
Edited by Zak Seidov, Aug 15 2016
STATUS
approved

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 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)