A257933 Prime p such that sqrt(p+2) is semiprime (A001358).
79, 223, 439, 1087, 1223, 2399, 3023, 4759, 5927, 8647, 14159, 14639, 21023, 24023, 25919, 28559, 31327, 33487, 42023, 47087, 56167, 61007, 64007, 67079, 70223, 71287, 89399, 90599, 91807, 95479, 104327, 112223, 116279, 126023, 137639, 152879, 172223, 199807
Offset: 1
Keywords
Examples
Prime 79 is in the sequence because sqrt(79+2) = 9 = 3*3 which is semiprime. Prime 1223 is in the sequence because sqrt(1223+2) = 35 = 5*7 which is semiprime.
Links
- Peter J. C. Moses and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1000 terms from Moses)
Programs
-
Mathematica
Select[Prime@Range@18000,PrimeOmega[Sqrt[#+2]]==2&]//Quiet (* Ivan N. Ianakiev, May 13 2015 *)
-
PARI
issemi(n)=bigomega(n)==2 is(n)=isprime(n) && issquare(n+2,&n) && issemi(n) \\ Charles R Greathouse IV, May 13 2015
-
PARI
list(lim)=my(v=List(), k=sqrt(lim+2), t); forprime(p=2, sqrt(k), forprime(q=p, k\p, if(isprime(t=(p*q)^2-2), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, May 13 2015
-
Perl
use ntheory ":all"; forprimes { say if is_power($+2,2) && scalar(factor(sqrtint($+2)))==2 } 1e7; # Dana Jacobsen, May 13 2015
-
Perl
use ntheory ":all"; sub list { my($lim,$k,$t,$p,%v)=shift; $k=sqrt($lim+2); forprimes { $p=$; forprimes { $t=($p*$)**2-2; $v{$t}++ if is_prime($t); } $p,int($k/$p); } int(sqrt($k)); my @v=sort{$a<=>$b} keys %v; @v; } say for list(1e10); # Translation of PARI, Dana Jacobsen, May 13 2015
Formula
Trivially a(n) >> n^2 log^2 n/(log log n)^2. - Charles R Greathouse IV, May 13 2015
Extensions
More terms from Peter J. C. Moses, May 13 2015
Comments