A290450 Primes with property that the next prime has the same last digit.
139, 181, 241, 283, 337, 409, 421, 547, 577, 631, 691, 709, 787, 811, 829, 887, 919, 1021, 1039, 1051, 1153, 1171, 1249, 1399, 1471, 1627, 1637, 1699, 1723, 1801, 1879, 2017, 2029, 2053, 2089, 2143, 2521, 2647, 2719, 2731, 2767, 2887, 2917, 3001, 3089, 3109, 3361, 3413, 3517, 3547, 3571
Offset: 1
Examples
139 is in the sequence because the immediately following prime is 149, which also ends in 9. But 149 is not in the sequence because the next prime after that one is 151, which ends in 1, not 9.
Links
- Marius A. Burtea, Table of n, a(n) for n = 1..5005
- Evelyn Lamb, "Peculiar Pattern Found in 'Random' Prime Numbers", Nature, March 14, 2016, republished by Scientific American.
- Robert J. Lemke Oliver and Kannan Soundararajan, Unexpected biases in the distribution of consecutive primes, arXiv preprint arXiv:1603.03720 [math.NT], submitted on March 11, 2016.
Programs
-
Magma
f:=func
; a:=[]; for p in PrimesUpTo(4000) do if f(p,1) or f(p,3) or f(p,7) or f(p,9) then Append(~a,p); end if; end for; a; // Marius A. Burtea, Oct 16 2019
-
Mathematica
Select[Partition[Prime[Range[1000]], 2, 1], Mod[#[[1]], 10] == Mod[#[[2]], 10] &][[All, 1]] (* Harvey P. Dale, Aug 21 2017 *) Module[{nn=1000,prs,p},prs=Prime[Range[nn]];p=Divisible[#,10]&/@ Differences[prs];Pick[Most[prs],p]] (* Harvey P. Dale, Aug 22 2017 *)
Comments