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!)
A077713 a(1) = 3; thereafter a(n) = the smallest prime of the form d0...0a(n-1), where d is a single digit, or 0 if no such prime exists. 4
3, 13, 113, 2113, 12113, 612113, 50612113, 1050612113, 6001050612113, 26001050612113, 1026001050612113, 6000001026001050612113, 500006000001026001050612113, 600500006000001026001050612113, 1600500006000001026001050612113, 6001600500006000001026001050612113 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the smallest prime obtained by prefixing a(n-1) with a number of the form d*10^k where d is a single digit, 0 < d < 10, and k >= 0. Conjecture: d*10^k always exists.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..44
EXAMPLE
a(7) = 50612113: deleting 5 gives 612113 = a(6).
MAPLE
a:= proc(n) option remember; local k, m, d, p;
if n=1 then 3 else k:= a(n-1);
for m from length(k) do
for d to 9 do p:= k +d*10^m;
if isprime(p) then return p fi
od od
fi
end:
seq(a(n), n=1..20); # Alois P. Heinz, Jan 12 2015
PROG
(Python)
from sympy import isprime
from itertools import islice
def agen(an=3):
while True:
yield an
pow10 = 10**len(str(an))
while True:
found = False
for t in range(pow10+an, 10*pow10+an, pow10):
if isprime(t):
an = t; found = True; break
if found: break
pow10 *= 10
print(list(islice(agen(), 16))) # Michael S. Branicky, Jun 23 2022
CROSSREFS
Sequence in context: A105431 A360187 A053583 * A119723 A093011 A262147
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Ray Chandler, Jul 23 2003
Changed offset to 1 by Alois P. Heinz, Jan 12 2015
Definition clarified by N. J. A. Sloane, Jan 19 2015
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 17 21:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)