OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Robert J. Lemke Oliver and Kannan Soundararajan, Unexpected biases in the distribution of consecutive primes, arXiv:1603.03720 [math.NT], 2016.
FORMULA
a(n) = prime(A270311(n)).
MATHEMATICA
Select[Prime@ Range@ 300, Function[k, Or[k == Mod[NextPrime@ #, 10], k == Mod[NextPrime[#, -1], 10]]]@ Mod[#, 10] &] (* Michael De Vlieger, Mar 15 2016 *)
Select[Partition[Prime[Range[300]], 3, 1], Mod[#[[2]], 10]==Mod[#[[1]], 10]||Mod[#[[2]], 10]== Mod[#[[3]], 10]&][[;; , 2]] (* Harvey P. Dale, Jul 21 2023 *)
PROG
(PARI) is(n)=isprime(n) && ((nextprime(n+1)-n)%10==0 || (n-precprime(n-1))%10==0) \\ Charles R Greathouse IV, Mar 15 2016
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Francois Alcover, Mar 15 2016
EXTENSIONS
a(15)-a(55) from Charles R Greathouse IV, Mar 15 2016
STATUS
approved