|
|
A270310
|
|
Primes ending with the same decimal digit as the previous or next prime.
|
|
4
|
|
|
139, 149, 181, 191, 241, 251, 283, 293, 337, 347, 409, 419, 421, 431, 547, 557, 577, 587, 631, 641, 691, 701, 709, 719, 787, 797, 811, 821, 829, 839, 887, 907, 919, 929, 1021, 1031, 1039, 1049, 1051, 1061, 1153, 1163, 1171, 1181, 1249, 1259, 1399, 1409, 1471, 1481, 1627, 1637, 1657, 1699, 1709
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|