A265684 Sarrus numbers (A001567) that are the average of two consecutive primes.
645, 7957, 11305, 15841, 25761, 35333, 126217, 194221, 212421, 332949, 464185, 635401, 656601, 741751, 934021, 1193221, 1357441, 1459927, 1620385, 1690501, 1969417, 2704801, 3911197, 4154161, 4209661, 5095177, 5284333, 5351537, 5758273, 6189121, 6212361, 7820201, 8134561, 8209657
Offset: 1
Keywords
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[200000], CompositeQ[#] && PowerMod[2, (# - 1), #] == 1 && NextPrime[#] - # == # - NextPrime[#, -1] &] (* Amiram Eldar, Jun 28 2019 *)
-
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, ", ")))
Comments