cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A241102 Semiprimes of the form prime(n+1)^3 - prime(n)^3.

This page as a plain text file.
%I A241102 #16 May 26 2025 11:19:27
%S A241102 218,866,345602,477146,726626,1280666,2291546,3936602,4113506,6242402,
%T A241102 7154786,13177946,22395746,26158466,26763266,30862946,43352066,
%U A241102 52925402,68952602,74680706,87646106,96962402,109499906,112909466,181632026,192077786,205335002,257572226
%N A241102 Semiprimes of the form prime(n+1)^3 - prime(n)^3.
%C A241102 All the terms in the sequence are even semiprimes.
%C A241102 All the terms in the sequence are congruent to 2 mod 3.
%H A241102 K. D. Bajpai, <a href="/A241102/b241102.txt">Table of n, a(n) for n = 1..4048</a>
%e A241102 a(1) = 201658 = 59^3 - 61^2: Also 201658 = 2*100829. Hence 201658 is semiprime.
%e A241102 a(2) = 563866 = 83^3 - 89^2: Also 563866 = 2*281933. Hence 563866 is semiprime.
%p A241102 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);
%t A241102 KD = {}; Do[t = Prime[n]^3 - Prime[n + 1]^2; If[PrimeOmega[t] == 2, AppendTo[KD, t]], {n, 500}]; KD
%t A241102 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 *)
%t A241102 Select[#[[2]]^3-#[[1]]^3&/@Partition[Prime[Range[1500]],2,1], PrimeOmega[ #] == 2&] (* _Harvey P. Dale_, Jul 01 2015 *)
%t A241102 Select[Differences[Prime[Range[1500]]^3],PrimeOmega[#]==2&] (* _Harvey P. Dale_, May 26 2025 *)
%o A241102 (PARI) 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
%o A241102 (Python)
%o A241102 from itertools import islice
%o A241102 from sympy import isprime, nextprime
%o A241102 def A241102_gen(): # generator of terms
%o A241102     p, q = 3**3, 5
%o A241102     while True:
%o A241102         if isprime((m:=q**3)-p>>1):
%o A241102             yield m-p
%o A241102         p, q = m, nextprime(q)
%o A241102 A241102_list = list(islice(A241102_gen(),10)) # _Chai Wah Wu_, Feb 27 2023
%Y A241102 Cf. A001358 (semiprimes: product of two primes).
%Y A241102 Cf. A046388 (odd numbers: p*q ( p and q are primes)).
%Y A241102 Cf. A046315 (odd semiprimes: divisible by exactly 2 primes).
%Y A241102 Cf. A240859 (cubes k^3:  k^3 + (k+1)^3  are semiprimes).
%Y A241102 Cf. A240884 (semiprimes: n-th cube + n-th triangular numbers).
%K A241102 nonn
%O A241102 1,1
%A A241102 _K. D. Bajpai_, Apr 16 2014