The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328452 Primes p such that p=prime(k), prime(k+1), and prime(k+2) end in the same digit. 1
1627, 3089, 4297, 4831, 6481, 6793, 8543, 11027, 11867, 13421, 13649, 14177, 17509, 17807, 18839, 18859, 20359, 20411, 22501, 22511, 22963, 22973, 24923, 25189, 26449, 26459, 27367, 27541, 28309, 29443, 29453, 31081, 32203, 32381, 34919, 35171, 35281, 36343, 36353, 37087, 37223, 37243, 38923 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
(p,q,r) = (1627,1637,1657), are three primes which are consecutive and end in the same digit. Hence, p=1627 is a member of this sequence.
MAPLE
q:= 3: r:= 5: count:= 0: R:= NULL:
while count < 100 do
p:= q; q:= r; r:= nextprime(r);
if p-q mod 10 = 0 and q-r mod 10 = 0 then count:= count+1; R:= R, p; fi
od:
R; # Robert Israel, May 08 2020
MATHEMATICA
First /@ Select[Partition[Prime@ Range@ 4105, 3, 1], Length@ Union@ Mod[#, 10] == 1 &] (* Giovanni Resta, Oct 16 2019 *)
PROG
(Magma) f:=func<p, m|p mod 10 eq m and NextPrime(p) mod 10 eq m and NextPrime(NextPrime(p)) mod 10 eq m>; a:=[]; for p in PrimesUpTo(40000) 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
(PARI) isok(p) = {if (isprime(p), my(d = p % 10); my(q = nextprime(p+1), r = nextprime(q+1)); (d == (q % 10)) && (d == (r % 10)); ); } \\ Michel Marcus, Oct 17 2019
CROSSREFS
Sequence in context: A186846 A198510 A241493 * A202985 A063891 A254849
KEYWORD
nonn,base
AUTHOR
Philip Mizzi, Oct 15 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 07:05 EDT 2024. Contains 372666 sequences. (Running on oeis4.)