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!)
A354456 a(n) is the least number k such that k - 5^i is prime for i = 1..n. 0
7, 28, 132, 666, 3234, 17514, 100674, 501228, 2062662, 211097334, 2597411082, 34473310284, 214852200444, 394471192794 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(15) > 5*10^12. - David A. Corneth, May 30 2022
LINKS
EXAMPLE
a(3) = 132 because 132 - 5^1 = 127, 132 - 5^2 = 107 and 132 - 5^3 = 7 are all prime, and 132 is the least number with this property.
MAPLE
g:= proc(n) local p, x, i;
p:= 1:
do
p:= nextprime(p);
x:= p + 5^n;
if andmap(isprime, [seq(x-5^i, i=1..n-1)]) then return x fi
od
end proc:
map(g, [$1..10]);
PROG
(Python)
from sympy import isprime, nextprime
def a(n):
p = 2
while True:
k, p = 5**n + p, nextprime(p)
if all(isprime(k-5**i) for i in range(1, n)):
return k
print([a(n) for n in range(1, 10)]) # Michael S. Branicky, May 30 2022
CROSSREFS
Sequence in context: A219737 A316106 A359203 * A249872 A238448 A290356
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, May 30 2022
EXTENSIONS
a(11)-a(14) from David A. Corneth, May 30 2022
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 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)