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.
FORMULA
a(n) = prime(A112877(n) - 1).
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
N. J. A. Sloane, Apr 20 2006
EXTENSIONS
a(19)-a(26) from Donovan Johnson, Feb 18 2010
a(27)-a(29) from Chai Wah Wu, Mar 04 2024
a(30) from Chai Wah Wu, Mar 10 2024
STATUS
approved