OFFSET
1,1
COMMENTS
The even terms of this sequence are exactly twice the primes > 3. The odd terms are odd composites c for which the odd integer next to c/2 is not prime. - M. F. Hasler, Jun 16 2009
The English language can be ambiguous! What is meant here is: write down a list of the composite numbers 4,6,8,9,10,12,... Whenever the sum of two adjacent terms is composite, adjoin it to the sequence: 4+6=10, 6+8=14, 10+12=22, ... - N. J. A. Sloane, Nov 26 2019
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
MATHEMATICA
CompositeNext[n_]:=Module[{k=n+1}, While[PrimeQ[k], k++ ]; k]; q=6!; lst2={}; Do[If[ !PrimeQ[n], c=CompositeNext[n]; a2=n+c; If[ !PrimeQ[a2], AppendTo[lst2, a2]]], {n, q}]; lst2 (* Vladimir Joseph Stephan Orlovsky, Jun 17 2009 *)
Module[{c=Select[Range[300], CompositeQ], s2}, s2=Total/@Partition[c, 2, 1]; Intersection[c, s2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 27 2019 *)
PROG
(PARI) isA151740(n)= bittest(n, 0) || return(isprime(n/2) && n>6); !isprime(bitor(n\2, 1)) && !isprime(n) && n>1 \\ M. F. Hasler, Jun 16 2009
(Python)
from sympy import isprime, composite
print([totest for k in range(1, 92) if not isprime(totest := composite(k) + composite(k+1))]) # Karl-Heinz Hofmann, Feb 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Claudio Meller, Jun 15 2009
STATUS
approved