OFFSET
1,1
COMMENTS
Inspired by A265669.
Motivation was the form of differences between consecutive primes that generate this sequence. It seems that 12*k appears in differences most of the time. For the first 175 term of this sequence, the relevant proportion is 161/175.
Differences between corresponding consecutive primes are 4, 12, 12, 36, 4, 12, 12, 36, 4, 4, 24, 24, 4, 60, 24, 24, 24, 12, 12, 36, 12, 24, 12, 24, 36, 12, 12, 12, 12, 24, 4, 60, 24, 48, 36, 12, 24, 36, 24, 20, 12, 84, 36, 12, 24, 24, 12, 24, 36, 12, 12, 36, ...
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
645 is a term because it is a Sarrus number and the average of the consecutive primes 643 and 647.
7957 is a term because it is a Sarrus number and the average of the consecutive primes 7951 and 7963.
MATHEMATICA
Select[Range[200000], CompositeQ[#] && PowerMod[2, (# - 1), #] == 1 && NextPrime[#] - # == # - NextPrime[#, -1] &] (* Amiram Eldar, Jun 28 2019 *)
PROG
(PARI) is(n)={Mod(2, n)^n==2 && !isprime(n)}
forcomposite(n=2, 1e7, if(is(n) && (nextprime(n)-n)==(n-precprime(n)), print1(n, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Dec 13 2015
STATUS
approved