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!)
A356847 Greedily choose a(n) to be the least prime p > a(n-1) such that all sums a(i) + a(j) - 1, 1 <= i < j, are also prime. 0
5, 7, 13, 67, 97, 9337, 28657, 516157, 2193637, 1725215287, 5858906527, 10845974467, 311697041437, 2748104242057, 478834469031547, 30509330585363257 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It is not known if this sequence is infinite.
LINKS
Sequence inspired by (but not mentioned in) talk by Terence Tao, February 23 2023, in the Number Theory Web Seminar.
PROG
(Python)
from math import gcd
from itertools import count, islice
from sympy import isprime, nextprime
def agen(): # generator of terms
alst = [5]
while True:
yield alst[-1]
p = nextprime(alst[-1])
while any(not isprime(ai + p - 1) for ai in alst):
p = nextprime(p)
alst.append(p)
print(list(islice(agen(), 9))) # Michael S. Branicky, Feb 23 2023
CROSSREFS
Sequence in context: A077781 A102872 A102873 * A342506 A158892 A106022
KEYWORD
nonn,more
AUTHOR
Jeffrey Shallit, Feb 23 2023
EXTENSIONS
a(10)-a(12) from Michael S. Branicky, Feb 23 2023
a(13) from Rémy Sigrist, Feb 24 2023
a(14)-a(16) from Bert Dobbelaere, Mar 05 2023
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 March 1 22:23 EST 2024. Contains 370443 sequences. (Running on oeis4.)