|
|
A175093
|
|
a(1) = 1, a(2) = 2, for n >= 3, a(n) = smallest prime > a(n-1) such that a(n) mod a(n-1) = a(n-2).
|
|
4
|
|
|
1, 2, 3, 5, 13, 31, 137, 853, 6961, 28697, 179143, 6836131, 68540453, 966402473, 15530980021, 94152282599, 203835545219, 2540178825227, 61168127350667, 6119352913891927, 220357873027460039, 16312601956945934813, 750600047892540461437, 33042714709228726238041
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
PROG
|
(Python)
from gmpy2 import is_prime
from itertools import count, islice
def agen(): # generator of terms
c, b = 1, 2
yield from [c, b]
for n in count(3):
a = next(c + b*i for i in count(1) if is_prime(c+b*i))
c, b = b, a
yield a
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|