login
The prime ending in 7 is the only prime in a decade.
1

%I #16 Sep 08 2022 08:46:03

%S 97,127,307,367,397,457,487,557,587,727,787,797,877,907,937,967,1087,

%T 1117,1447,1567,1597,1637,1657,1777,1847,1987,2437,2467,2617,2647,

%U 2707,2767,2777,2887,2897,2917,2927,3037,3137,3217,3407,3457,3607,3727,3847

%N The prime ending in 7 is the only prime in a decade.

%C Primes of the form 10n+7 such that 10n+1, 10n+3, and 10n+9 are composite. - _Charles R Greathouse IV_, Sep 06 2012

%H V. Raman, <a href="/A216311/b216311.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ 4n log n. - _Charles R Greathouse IV_, Sep 06 2012

%t t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 7}, AppendTo[t, ps[[1]]]], {n, 0, 529}]; t (* _T. D. Noe_, Sep 04 2012 *)

%o (Magma) [p: p in PrimesUpTo(4000) | p mod 10 eq 7 and IsOne(#PrimesInInterval(10*t+1, 10*t+9)) where t is Floor(p/10)]; // _Bruno Berselli_, Sep 14 2012

%Y Subsequence of A030432.

%Y Cf. A032352, A007811, A078494.

%K nonn,base,easy

%O 1,1

%A _V. Raman_, Sep 03 2012