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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053582 a(n+1) is the smallest prime ending with a(n), where a(1)=1. 12
1, 11, 211, 4211, 34211, 234211, 4234211, 154234211, 3154234211, 93154234211, 2093154234211, 42093154234211, 342093154234211, 11342093154234211, 3111342093154234211, 63111342093154234211, 2463111342093154234211 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

EXAMPLE

The least prime ending with seed 1 is 11; the least prime ending with 11 is 211; the least prime ending with 211 is 4211. - Clark Kimberling, Sep 17 2015

MAPLE

P:=proc(q, h) local a, b, c, d, n; a:=h; b:=1; print(1);

for n from 1 to q do if isprime(n) then if a=(n mod 10^b) then print(n);

a:=n; d:=a; b:=0; while d>0 do b:=b+1; d:=trunc(d/10);

od; fi; fi; od; end: P(10^25, 1); # Paolo P. Lava, Jul 15 2014

MATHEMATICA

f[n_] := f[n] = Block[{j = f[n - 1], k = 1, l = Floor[Log[10, f[n - 1]] + 1]},   While[m = k*10^l + j; ! PrimeQ@ m, k++ ]; m]; f[1] = 1; Array[f, 17]

nxt[n_]:=Module[{k=1, p=10^IntegerLength[n]}, While[!PrimeQ[k*p+n], k++]; k*p+n]; NestList[nxt, 1, 20] (* Harvey P. Dale, Jul 14 2016 *)

CROSSREFS

Cf. A261114.

Sequence in context: A249604 A038399 A053547 * A077714 A089567 A110747

Adjacent sequences:  A053579 A053580 A053581 * A053583 A053584 A053585

KEYWORD

base,nonn

AUTHOR

G. L. Honaker, Jr., Jan 18 2000

EXTENSIONS

a(14)-a(17) corrected by Robert G. Wilson v, Dec 07 2010

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 11 16:09 EST 2017. Contains 295906 sequences.