cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A270310 Primes ending with the same decimal digit as the previous or next prime.

This page as a plain text file.
%I A270310 #20 Jul 21 2023 19:19:02
%S A270310 139,149,181,191,241,251,283,293,337,347,409,419,421,431,547,557,577,
%T A270310 587,631,641,691,701,709,719,787,797,811,821,829,839,887,907,919,929,
%U A270310 1021,1031,1039,1049,1051,1061,1153,1163,1171,1181,1249,1259,1399,1409,1471,1481,1627,1637,1657,1699,1709
%N A270310 Primes ending with the same decimal digit as the previous or next prime.
%H A270310 Charles R Greathouse IV, <a href="/A270310/b270310.txt">Table of n, a(n) for n = 1..10000</a>
%H A270310 Robert J. Lemke Oliver and Kannan Soundararajan, <a href="http://arxiv.org/abs/1603.03720">Unexpected biases in the distribution of consecutive primes</a>, arXiv:1603.03720 [math.NT], 2016.
%F A270310 a(n) = prime(A270311(n)).
%t A270310 Select[Prime@ Range@ 300, Function[k, Or[k == Mod[NextPrime@ #, 10], k == Mod[NextPrime[#, -1], 10]]]@ Mod[#, 10] &] (* _Michael De Vlieger_, Mar 15 2016 *)
%t A270310 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 *)
%o A270310 (PARI) is(n)=isprime(n) && ((nextprime(n+1)-n)%10==0 || (n-precprime(n-1))%10==0) \\ _Charles R Greathouse IV_, Mar 15 2016
%Y A270310 Cf. A270311.
%K A270310 base,easy,nonn
%O A270310 1,1
%A A270310 _Francois Alcover_, Mar 15 2016
%E A270310 a(15)-a(55) from _Charles R Greathouse IV_, Mar 15 2016