OFFSET
1,1
COMMENTS
Numbers that are composites and nearest-neighbors of twin primes.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
28, 30 and 32 are triple composites because 29 and 31 are twin primes and 28, 30 and 32 are composites and nearest-neighbors of 29 and 31.
MATHEMATICA
#[[1]]+{-1, 1, 3}&/@Select[Partition[Prime[Range[3, 100]], 2, 1], #[[2]]-#[[1]]==2&]//Flatten (* Harvey P. Dale, Jun 09 2023 *)
Flatten[{#[[1]], #[[1]]+2, #[[2]]}&/@SequencePosition[Table[Which[CompositeQ[ n], 1, PrimeQ[ n], 2, True, 0], {n, 300}], {1, 2, 1, 2, 1}]] (* Harvey P. Dale, Sep 07 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Nov 16 2007
STATUS
approved