A155878 a(0)=4; for n > 0, a(n) is the smallest composite number c > a(n-1) such that c + n is also composite.
4, 8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 39, 40, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 62, 63, 64, 65, 66, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 86, 87, 88, 90, 91, 93, 94, 95, 96, 98, 99, 102, 104, 105, 106, 108
Offset: 0
Examples
a(0)=4. Adding a(0) to n=0 gives 4+0=4, which is a composite number; adding a(1) to n=1 gives 8+1=9 which is composite; adding a(2) to n=2 gives 10+2=12 which is composite; adding a(3) to n=3 gives 12+3=15 which is composite; etc.
Crossrefs
Cf. A155874.
Programs
-
Maple
isA002808 := proc(n) option remember; RETURN(n>= 4 and not isprime(n)) ; end: A155878:= 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(A155878(n),n=0..100) ; # R. J. Mathar, Jan 31 2009
Extensions
Extended by R. J. Mathar, Jan 31 2009
Name edited by Jon E. Schoenfield, Jan 20 2019