|
|
A117129
|
|
Primes not occurring as |differences| in Cald's sequence A006509.
|
|
2
|
|
|
641, 1213, 2617, 2957, 3727, 5443, 9283, 17359, 33829, 66173, 131303, 264763, 494743, 957547, 1888157, 3753647, 7490797, 14961157, 29899357, 59773871, 119551489, 239106347, 478234723, 956607929, 1913366111, 3826828409, 7653840367, 15308666783, 30619196381, 57415599151
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
In other words, primes that do not occur as absolute values of differences of successive terms in Cald's sequence A006509.
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(Python)
from itertools import count, islice
from sympy import nextprime
def A117129_gen(): # generator of terms
a, aset, p = 1, {1}, 2
for c in count(2):
if (b:=a-p) > 0 and b not in aset:
a = b
elif (b:=a+p) not in aset:
a = b
else:
a = 0
yield p
aset.add(a)
p = nextprime(p)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|