login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236527 Primes obtained by concatenating to the end of previous term the next smallest number that will produce a prime, starting with 3. 1
3, 31, 311, 3119, 31193, 3119317, 31193171, 311931713, 3119317139, 311931713939, 31193171393933, 3119317139393353, 31193171393933531, 3119317139393353121, 311931713939335312127, 311931713939335312127113, 31193171393933531212711399, 31193171393933531212711399123 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n + 1) is the next smallest prime beginning with a(n). Initial term is 3. These are the primes arising in A069605.

LINKS

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

EXAMPLE

a(1) = 3 by definition.

a(2) is the next smallest prime beginning with 3, so a(2) = 31.

a(3) is the next smallest prime beginning with 31, so a(3) = 311.

MATHEMATICA

A069605[1] = 3; A236527[1] = 3; A069605[n_] := A069605[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits[Flatten[Append[c, IntegerDigits[k]]]]], k += 2]; k]; A236527[n_] := A236527[n] = FromDigits[Flatten[IntegerDigits[A236527[n - 1]], IntegerDigits[A069605[n]]]]; Table[A236527[n], {n, 20}] (* Alonso del Arte, Jan 28 2014 based on Robert G. Wilson v's program for A069605 *)

PROG

(Python)

import sympy

from sympy import isprime

def b(x):

..num = str(x)

..n = 1

..while n < 10**3:

....new_num = str(x) + str(n)

....if isprime(int(new_num)):

......print(int(new_num))

......x = new_num

......n = 1

....else:

......n += 1

b(3)

CROSSREFS

Cf. A048553, A110773, A069605.

Sequence in context: A100894 A065533 A048550 * A108430 A113075 A111137

Adjacent sequences:  A236524 A236525 A236526 * A236528 A236529 A236530

KEYWORD

nonn,base

AUTHOR

Derek Orr, Jan 27 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 18:20 EDT 2019. Contains 327178 sequences. (Running on oeis4.)