login
Primes p such that p + 32 is also prime and there are seven primes between p and p + 32.
2

%I #27 Aug 16 2024 06:07:11

%S 29,41,416387,626597,6560987,6937937,25658429,25658441,29597411,

%T 49136357,51448361,57405419,90279461,128469149,137943341,162189089,

%U 165531251,175182587,227779679,261672779,290973491,294536141,311725847,334388279,422005247,442768631,503804657

%N Primes p such that p + 32 is also prime and there are seven primes between p and p + 32.

%H Amiram Eldar, <a href="/A086149/b086149.txt">Table of n, a(n) for n = 1..1000</a>

%t cp[x_, y_] := Count[Table[PrimeQ[i], {i, x, y}], True] Do[s=Prime[n]; s1=Prime[n+1]; If[PrimeQ[s+32]&& Equal[cp[s+1, s+d-1], 7], Print[s]], {n, 1, 1000000}]

%t Select[Partition[Prime[Range[98*10^5]],9,1],Last[#]-First[#]==32&] [[All,1]] (* _Harvey P. Dale_, Sep 12 2017 *)

%o (PARI) lista(pmax) = {my(ps = primes(9)); forprime(p = prime(10), pmax, ps = concat(vecextract(ps, "^1"), p); if(ps[9] - ps[1] == 32, print1(ps[1], ", ")));} \\ _Amiram Eldar_, Aug 15 2024

%Y Subsequence of A049489.

%K nonn

%O 1,1

%A _Labos Elemer_, Jul 29 2003

%E Definition clarified by _Harvey P. Dale_, Sep 12 2017

%E a(19)-a(27) from _Amiram Eldar_, Aug 15 2024