OFFSET
1,1
COMMENTS
Consists of numbers that cannot be the difference of two primes: an odd number m can be the difference of two primes only if m+2 is prime, which cannot be the case for any a(n) as a(n)+2 is composite.
Some terms form subsequences of perfect powers, e.g., A106564 (for squares) and A269346 (for cubes).
Any composite of the form 6k+1 (A016921) is a term: (6k+1)+2 = 3(2k+1) is both odd and composite as a product of two odd numbers, thus 6k+1, being odd, is a term if it is composite.
LINKS
Eric Weisstein's World of Mathematics, Twin Composites
FORMULA
a(n) = A061673(n) - 1. - M. F. Hasler, Nov 18 2018
EXAMPLE
25 belongs to this sequence because 27=25+2 is the next odd composite.
MATHEMATICA
Select[Range[450], OddQ[#]&& !PrimeQ[#]&&!PrimeQ[#+2]&]
PROG
(PARI) for(n=1, 450, n%2==1&&!isprime(n)&&!isprime(n+2)&&print1(n, ", "))
(Magma) [n: n in [1..350]| not IsPrime(n) and not IsPrime(n+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Waldemar Puszkarz, Feb 24 2016
EXTENSIONS
Name edited by Michel Marcus, Jul 27 2023
STATUS
approved