A237627
Semiprimes of the form n^3 + n^2 + n + 1.
Original entry on oeis.org
4, 15, 85, 259, 1111, 4369, 47989, 65641, 291919, 2016379, 2214031, 3397651, 3820909, 5864581, 9305311, 13881841, 15687751, 16843009, 19756171, 22030681, 28746559, 62256349, 64160401, 74264821, 79692331, 101412319, 117889591, 172189309, 185518471, 191435329
Offset: 1
85 is in the sequence since 4^3 + 4^2 + 4 + 1 = 85 = 5 * 17, which is a semiprime.
259 is in the sequence since 6^3 + 6^2 + 6 + 1 = 259 = 7 * 37 which is a semiprime.
585 is not in the sequence, because, although it is 8^3 + 8^2 + 8 + 1, it has more than two prime factors.
-
IsSemiprime:=func; [s: n in [1..1000] | IsSemiprime(s) where s is n^3+n^2+n+1]; // Bruno Berselli, Apr 23 2014
-
select(x-> numtheory[bigomega](x)=2, [n^3+n^2+n+1$n=1..1500])[];
-
A237627 = {}; Do[t = n^3 + n^2 + n + 1; If[PrimeOmega[t] == 2, AppendTo[A237627, t]], {n, 1500}]; A237627 (* K. D. Bajpai *)
(* For the b-file: *) n = 0; Do[t = k^3 + k^2 + k + 1; If[PrimeOmega[t] == 2, n++; Print[n, " ", t]], {k, 300000}] (* K. D. Bajpai *)
Select[Table[n^3 + n^2 + n + 1, {n, 500}], PrimeOmega[#] == 2 &] (* Alonso del Arte, Apr 22 2014 *)
-
is(n)=isprime(n^2+1) && isprime(n+1) \\ Charles R Greathouse IV, Aug 25 2014
-
from itertools import islice
from sympy import isprime, nextprime
def A237627_gen(): # generator of terms
p = 1
while (p:=nextprime(p)):
if isprime((p-1)**2+1):
yield p*((p-1)**2+1)
A237627_list = list(islice(A237627_gen(),20)) # Chai Wah Wu, Feb 27 2023
-
A237627 = list(n^3 + n^2 + n + 1 for n in (1..1000) if is_prime(n^2+1) and is_prime(n+1)); print(A237627) # Bruno Berselli, Apr 23 2014 - see comment by Alonso del Arte
A241102
Semiprimes of the form prime(n+1)^3 - prime(n)^3.
Original entry on oeis.org
218, 866, 345602, 477146, 726626, 1280666, 2291546, 3936602, 4113506, 6242402, 7154786, 13177946, 22395746, 26158466, 26763266, 30862946, 43352066, 52925402, 68952602, 74680706, 87646106, 96962402, 109499906, 112909466, 181632026, 192077786, 205335002, 257572226
Offset: 1
a(1) = 201658 = 59^3 - 61^2: Also 201658 = 2*100829. Hence 201658 is semiprime.
a(2) = 563866 = 83^3 - 89^2: Also 563866 = 2*281933. Hence 563866 is semiprime.
Cf.
A001358 (semiprimes: product of two primes).
Cf.
A046388 (odd numbers: p*q ( p and q are primes)).
Cf.
A046315 (odd semiprimes: divisible by exactly 2 primes).
Cf.
A240859 (cubes k^3: k^3 + (k+1)^3 are semiprimes).
Cf.
A240884 (semiprimes: n-th cube + n-th triangular numbers).
-
with(numtheory):KD:= proc() local a,b; a:=ithprime(n)^3 - ithprime(n+1)^2;b:=bigomega(a); if b=2 then RETURN (a); fi; end: seq(KD(), n=1..800);
-
KD = {}; Do[t = Prime[n]^3 - Prime[n + 1]^2; If[PrimeOmega[t] == 2, AppendTo[KD, t]], {n, 500}]; KD
n = 0; Do[t = Prime[k]^3 - Prime[k + 1]^2; If[PrimeOmega[t] == 2, n = n + 1; Print[n, " ", t]], {k, 1, 500000}] (* b- file *)
Select[#[[2]]^3-#[[1]]^3&/@Partition[Prime[Range[1500]],2,1], PrimeOmega[ #] == 2&] (* Harvey P. Dale, Jul 01 2015 *)
Select[Differences[Prime[Range[1500]]^3],PrimeOmega[#]==2&] (* Harvey P. Dale, May 26 2025 *)
-
s=[]; for(n=1, 4000, t=prime(n+1)^3-prime(n)^3; if(bigomega(t)==2, s=concat(s, t))); s \\ Colin Barker, Apr 16 2014
-
from itertools import islice
from sympy import isprime, nextprime
def A241102_gen(): # generator of terms
p, q = 3**3, 5
while True:
if isprime((m:=q**3)-p>>1):
yield m-p
p, q = m, nextprime(q)
A241102_list = list(islice(A241102_gen(),10)) # Chai Wah Wu, Feb 27 2023
A241060
Semiprimes of the form prime(n)^3 - prime(n+1)^2.
Original entry on oeis.org
201658, 563866, 1213162, 2229322, 4627534, 13593838, 29982262, 127004446, 318134506, 641966518, 948880006, 1340689846, 1671022954, 1827766126, 4241032018, 6055076206, 8775783286, 14009110642, 19917191062, 32482037662, 36682577026, 43862470342, 64900170418
Offset: 1
a(1) = 201658 = 59^3 - 61^2: Also 201658 = 2*100829 (product of two primes). Hence 201658 is semiprime.
a(2) = 563866 = 83^3 - 89^2: Also 563866 = 2*281933 (product of two primes). Hence 563866 is semiprime.
-
with(numtheory):KD:= proc() local a,b; a:=ithprime(n)^3 - ithprime(n+1)^2; b:=bigomega(a); if b=2 then RETURN (a); fi; end: seq(KD(), n=1..800);
-
KD = {}; Do[t = Prime[n]^3 - Prime[n + 1]^2; If[PrimeOmega[t] == 2, AppendTo[KD, t]], {n, 500}]; KD
n = 0; Do[t = Prime[k]^3 - Prime[k + 1]^2; If[PrimeOmega[t] == 2, n = n + 1; Print[n, " ", t]], {k, 1, 500000}]
Select[#[[1]]^3-#[[2]]^2&/@Partition[Prime[Range[600]],2,1],PrimeOmega[ #] == 2&] (* Harvey P. Dale, Nov 06 2020 *)
-
s=[]; for(n=1, 10000, t=prime(n)^3-prime(n+1)^2; if(bigomega(t)==2, s=concat(s, t))); s \\ Colin Barker, Apr 16 2014
A240914
Semiprimes of the form S(n) + T(n) where S(n) and T(n) are the n-th square and the n-th triangular numbers.
Original entry on oeis.org
15, 26, 57, 77, 155, 187, 301, 551, 737, 1027, 1457, 1751, 3197, 3337, 5251, 6767, 7597, 8251, 13301, 22387, 24257, 25807, 32047, 34277, 41417, 41917, 48151, 61307, 63757, 66887, 68801, 85801, 103097, 112751, 136957, 141527, 145237, 179747, 180787, 196747
Offset: 1
a(1) = 15: 3^2 + 3/2*(3+1) = 15 = 3*5, which is product of two primes. Hence it is semiprime.
a(3) = 57: 6^2 + 6/2*(6+1) = 57 = 3*19, which is product of two primes. Hence it is semiprime.
-
with(numtheory):KD:= proc() local a,b; a:=(n)^2 + n/2*(n+1);b:=bigomega(a); if b=2 then RETURN (a); fi; end: seq(KD(), n=1..500);
-
KD = {}; Do[t = n^2 + n/2*(n + 1); If[PrimeOmega[t] == 2, AppendTo[KD, t]], {n, 500}]; KD
c=0; Do[t=n^2 + n/2*(n+1); If[PrimeOmega[t]==2,c=c+1; Print[c," ",t]], {n,1,500000}];
Module[{nn=500,s,t},s=Range[nn]^2;t=Accumulate[Range[nn]];Select[ Total/@ Thread[{s,t}],PrimeOmega[#]==2&]] (* or *) Select[ Table[ (n(1+3n))/2,{n,500}],PrimeOmega[#]==2&](* Harvey P. Dale, Feb 07 2018 *)
Showing 1-4 of 4 results.
Comments