OFFSET
1,1
COMMENTS
Except for 1 and 2 the complement sequence c is: 3, 5, 8, 11, 20, 23, 35, 41, 50, 53, 56, 65, ...; where 2*c(i) + 1 and 2*c(i) - 3 are a pair of cousin primes. This is a consequence of the sieve of Sundaram.
LINKS
Wikipedia, Sieve of Sundaram.
EXAMPLE
For i,j = 1, 1+1+2*1*1 = 4 and 2+1+1+2*1*1 = 6.
PROG
(Python)
def aupto(limit):
aset = set()
for i in range(1, limit//3):
for j in range(i, limit//3):
t = i + j + 2*i*j
if t > limit: break
aset.update([t, t+2])
return sorted(an for an in aset if an <= limit)
print(aupto(80)) # Michael S. Branicky, Jul 05 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Davide Rotondo, Jun 19 2021
STATUS
approved