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!)
A181602 Primes p such that p-1 is a semiprime and p+2 is prime or prime squared. 6

%I #31 Sep 08 2022 08:45:54

%S 5,7,11,23,47,59,107,167,179,227,347,359,839,1019,1319,1367,1487,1619,

%T 2027,2207,2999,3119,3167,3467,4127,4259,4547,4787,4799,5099,5639,

%U 5879,6659,6779,6827,7559,8819,10007,10607,11699,12107,12539,14387,14867

%N Primes p such that p-1 is a semiprime and p+2 is prime or prime squared.

%C Except for the second term, a(n)+1 is divisible by 6.

%C [Proof: a(n)=p is a prime, with p-1=q*r and two primes q<=r by definition. Omitting the special case p=2, p is odd, p+1 is even, so p+1=q*r+2 = 2(1+q*r/2). To show that p+1 is divisible by 6 we show that it is divisible by 2 and by 3; divisibility by 2 has already been shown in the previous sentence. (1+q*r/2 must be integer, so q*r/2 must be integer, so the smaller prime q of the semiprime must be q=2, so p=2*r+1. This shows that p=a(n) are a subset of A005383.) First subcase of the definition is that p+2 is also prime. Then p is a smaller twin prime and by a comment in A003627, p+1 is divisible by 3. Second subcase of the definition is that p+2 = s^2 with s a prime. s can be 3*k+1 or 3*k+2 --p=7 is the exception-- which leads to s^2 = 9*k^2+6*k+1 or s^2=9*k^2+12*k+4, so p+1 = 9*k^2+6*k or 9*k^2+12*k+3, and in both cases p+1 is divisible by 3.]

%C In consequence, except for the first three terms, first differences a(n+1)-a(n) are also divisible by 6.

%H Vincenzo Librandi, <a href="/A181602/b181602.txt">Table of n, a(n) for n = 1..1000</a>

%t semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; fQ[n_] := Block[{fi = FactorInteger@n}, Length@ fi == 1 && fi[[1, 2]] == 1 || fi[[1, 2]] == 2]; Select[ Prime@ Range@ 1293, semiPrimeQ[ # - 1] && fQ[ # + 2] &] (* _Robert G. Wilson v_, Nov 06 2010 *)

%t Select[Prime[Range[2000]],PrimeOmega[#-1]==2&&Or@@PrimeQ[{#+2, Sqrt[ #+2]}]&] (* _Harvey P. Dale_, Aug 12 2012 *)

%o (Magma) [ p: p in PrimesInInterval(3,15000) | &+[ k[2]: k in Factorization(p-1) ] eq 2 and (IsPrime(p+2) or (q^2 eq p+2 and IsPrime(q) where q is Isqrt(p+2))) ]; // _Klaus Brockhaus_, Nov 03 2010

%Y Cf. A001358 (semiprimes), A001248 (squares of primes).

%Y Cf. A173176, A172487, A172240, A181669.

%K nonn

%O 1,1

%A _Giovanni Teofilatto_, Nov 01 2010

%E Corrected (29 removed) and extended by _Klaus Brockhaus_, _Robert G. Wilson v_ and _R. J. Mathar_, Nov 03 2010

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)