OFFSET
0,1
EXAMPLE
a(0) = 4. Subtracting n = 0 from a(0) gives 4-0 = 4, which is a composite number; subtracting n = 1 from a(1) gives 9-1 = 8, which is a composite number; subtracting n = 2 from a(2) gives 12-2 = 10, which is a composite number; subtracting n = 3 from a(3) gives 15-3 = 12, which is a composite number; etc.
MAPLE
isA002808 := proc(n) option remember; RETURN(n>= 4 and not isprime(n)) ; end: A155879:= proc(n) option remember; local a; if n = 0 then 4; else for a from procname(n-1)+1 do if isA002808(a) and isA002808(a-n) then RETURN(a) ; fi; od: fi; end: seq(A155879(n), n=0..100) ; # R. J. Mathar, Jan 31 2009
PROG
(Python)
from sympy import isprime
def composite(n): return n >= 4 and not isprime(n)
def aupton(nn):
alst = [4]
for n in range(1, nn+1):
an = max(alst[-1] + 1, n + 4)
while not (composite(an) and composite(an-n)): an += 1
alst.append(an)
return alst
print(aupton(68)) # Michael S. Branicky, Apr 09 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jan 29 2009
EXTENSIONS
Corrected from a(2) on by R. J. Mathar, Jan 31 2009
Name edited by Jon E. Schoenfield, Jan 19 2019
STATUS
approved