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.

A328452 Primes p such that p=prime(k), prime(k+1), and prime(k+2) end in the same digit.

This page as a plain text file.
%I A328452 #25 Sep 08 2022 08:46:24
%S A328452 1627,3089,4297,4831,6481,6793,8543,11027,11867,13421,13649,14177,
%T A328452 17509,17807,18839,18859,20359,20411,22501,22511,22963,22973,24923,
%U A328452 25189,26449,26459,27367,27541,28309,29443,29453,31081,32203,32381,34919,35171,35281,36343,36353,37087,37223,37243,38923
%N A328452 Primes p such that p=prime(k), prime(k+1), and prime(k+2) end in the same digit.
%H A328452 Robert Israel, <a href="/A328452/b328452.txt">Table of n, a(n) for n = 1..10000</a>
%e A328452 (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.
%p A328452 q:= 3: r:= 5: count:= 0: R:= NULL:
%p A328452 while count < 100 do
%p A328452    p:= q; q:= r; r:= nextprime(r);
%p A328452    if p-q mod 10 = 0 and q-r mod 10 = 0 then count:= count+1; R:= R, p; fi
%p A328452 od:
%p A328452 R; # _Robert Israel_, May 08 2020
%t A328452 First /@ Select[Partition[Prime@ Range@ 4105, 3, 1], Length@ Union@ Mod[#, 10] == 1 &] (* _Giovanni Resta_, Oct 16 2019 *)
%o A328452 (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
%o A328452 (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
%Y A328452 Cf. A000040, A290450, A054681.
%K A328452 nonn,base
%O A328452 1,1
%A A328452 _Philip Mizzi_, Oct 15 2019