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!)
A078500 Primes occurring only twice in a decade. 2

%I #16 Sep 08 2022 08:45:08

%S 23,29,31,37,53,59,61,67,83,89,151,157,163,167,173,179,233,239,251,

%T 257,263,269,271,277,281,283,331,337,347,349,353,359,373,379,383,389,

%U 401,409,443,449,491,499,503,509,521,523,541,547,563,569,571,577,593,599

%N Primes occurring only twice in a decade.

%C Only 6 such primes will occur in the 21st century.

%H Alois P. Heinz, <a href="/A078500/b078500.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Table[Prime[Range[PrimePi[n*10]+1,PrimePi[n*10+10]]],{n,60}],Length[ #] == 2&]//Flatten (* _Harvey P. Dale_, Aug 09 2020 *)

%o (PARI) decade2pr(n1,n2) = { if(n1==0,n1=10); forstep(x=n1,n2,10, if(isprime(x+1) && isprime(x+3) && !isprime(x+7) && !isprime(x+9), print1(x+1" "x+3" ");); if(isprime(x+1) && isprime(x+7) && !isprime(x+3) && !isprime(x+9), print1(x+1" "x+7" ");); if(isprime(x+1) && isprime(x+9) && !isprime(x+3) && !isprime(x+7), print1(x+1" "x+9" ");); if(isprime(x+3) && isprime(x+7) && !isprime(x+1) && !isprime(x+9), print1(x+3" "x+7" ");); if(isprime(x+3) && isprime(x+9) && !isprime(x+1) && !isprime(x+7), print1(x+3" "x+9" ");); if(isprime(x+7) && isprime(x+9) && !isprime(x+1) && !isprime(x+3), print1(x+7" "x+9" ");); ); }

%o (Magma) &cat [PrimesInInterval(10*n+1, 10*n+9): n in [0..50] | #PrimesInInterval(10*n+1, 10*n+9) eq 2]; // _Bruno Berselli_, Sep 05 2012

%Y Cf. A078494.

%K nonn,easy,base

%O 1,1

%A _Cino Hilliard_, Jan 04 2003

%E Offset changed to 1 by _Alois P. Heinz_, Jul 22 2014

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 August 1 23:38 EDT 2024. Contains 374819 sequences. (Running on oeis4.)