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.

Showing 1-8 of 8 results.

A070552 Semiprimes k such that k+1 is also a semiprime.

Original entry on oeis.org

9, 14, 21, 25, 33, 34, 38, 57, 85, 86, 93, 94, 118, 121, 122, 133, 141, 142, 145, 158, 177, 201, 202, 205, 213, 214, 217, 218, 253, 298, 301, 302, 326, 334, 361, 381, 393, 394, 445, 446, 453, 481, 501, 514, 526, 537, 542, 553, 565, 622, 633, 634, 694, 697
Offset: 1

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), May 03 2002

Keywords

Comments

A064911(a(n))*A064911(a(n)+1) = 1. - Reinhard Zumkeller, Dec 03 2009

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [4..700] | IsSemiprime(n) and IsSemiprime(n+1) ]; // Vincenzo Librandi, Jan 22 2016
    
  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1}||Last/@FactorInteger[n]=={2};lst={};Do[If[f[n]&&f[n+1],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *)
    Flatten[Position[Partition[Table[If[PrimeOmega[n]==2,1,0],{n,700}],2,1],{1,1}]] (* Harvey P. Dale, Feb 04 2015 *)
    Select[Range[700], PrimeOmega[#] == PrimeOmega[# + 1] == 2 &] (* Vincenzo Librandi, Jan 22 2016 *)
  • PARI
    forprime(p=3,1e3,if(bigomega(2*p-1)==2,print1(2*p-1", "));if(bigomega(2*p+1)==2,print1(2*p", "))) \\ Charles R Greathouse IV, Nov 09 2011
    
  • PARI
    is(n)=if(n%2, isprime((n+1)/2) && bigomega(n)==2, isprime(n/2) && bigomega(n+1)==2) \\ Charles R Greathouse IV, Sep 08 2015
    
  • Python
    from sympy import factorint
    def is_semiprime(n): return sum(e for e in factorint(n).values()) == 2
    def ok(n): return is_semiprime(n) and is_semiprime(n+1)
    print(list(filter(ok, range(698)))) # Michael S. Branicky, Sep 14 2021

Formula

a(n) >> n log n since either n or n+1 is in A100484. - Charles R Greathouse IV, Jul 21 2015
a(n) = A109373(n) - 1. - Zak Seidov Dec 19 2018

Extensions

More terms from Vladeta Jovovic, May 03 2002

A109287 4-almost primes equal to p*q + 1, where p and q are (not necessarily distinct) primes.

Original entry on oeis.org

16, 36, 40, 56, 88, 135, 156, 184, 204, 210, 220, 248, 250, 260, 296, 306, 315, 328, 330, 340, 342, 372, 414, 459, 472, 490, 516, 536, 546, 580, 584, 636, 650, 686, 690, 708, 714, 732, 735, 738, 804, 808, 819, 836, 850, 852, 870, 872, 940, 950, 966, 975, 996
Offset: 1

Views

Author

Keywords

Comments

4-almost primes of the form semiprime + 1.

Examples

			a(1) = 16 because (3*5+1)=(2^4) = 16.
a(2) = 36 because (5*7+1)=((2^2)*(3^2)) = 36.
a(3) = 40 because (3*13+1)=((2^3)*5) = 40.
a(4) = 56 because (5*11+1)=((2^3)*7) = 56.
a(5) = 88 because (3*29+1)=((2^3)*11) = 88.
a(6) = 135 because (2*67+1)=((3^3)*5) = 135.
a(7) = 156 because (5*31+1)=((2^2)*3*13) = 156.
a(8) = 184 because (3*61+1)=((2^3)*23) = 184.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 4-almost primes are in A014613.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in A109067.
4-almost primes of the form semiprime + 1 are in this sequence.
5-almost primes of the form semiprime + 1 are in A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.
Similar to A076153; after A076153(0)=3 next difference is A076153(100)=1792 whereas A109287(100)=1794.

Programs

  • Mathematica
    bo[n_] := Plus @@ Last /@ FactorInteger[n]; Select[Range[1000], bo[ # ] == 4 && bo[ # - 1] == 2 &] (* Ray Chandler, Aug 27 2005 *)
  • PARI
    is(n)=bigomega(n)==4 && bigomega(n-1)==2 \\ Charles R Greathouse IV, Sep 16 2015

Formula

a(n) is in this sequence iff a(n) is in A014613 and (a(n)-1) is in A001358.

Extensions

Extended by Ray Chandler, Aug 27 2005
Edited by Ray Chandler, Mar 20 2007

A268043 Numbers k such that k^3 - 1 and k^3 + 1 are both semiprimes.

Original entry on oeis.org

6, 1092, 1932, 2730, 4158, 6552, 11172, 25998, 30492, 55440, 76650, 79632, 85092, 102102, 150990, 152082, 152418, 166782, 211218, 235662, 236208, 248640, 264600, 298410, 300300, 301182, 317772, 380310, 387198, 441798, 476028, 488418
Offset: 1

Views

Author

Vincenzo Librandi, Jan 25 2016

Keywords

Comments

Obviously, k+1 and k-1 are always prime numbers.
If k is a term then m = (k - 1) * (k^2 + k + 1) is a term of A169635, i.e., A001157(m) = A001157(m+2) (De Koninck, 2002). - Amiram Eldar, Apr 19 2024

Examples

			a(1) = 6 because 6^3-1 = 215 = 5*43 and 6^3+1 = 217 = 7*31, therefore 215, 217 are both semiprimes.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [2..300000] | IsSemiprime(n^3+1) and IsSemiprime(n^3-1) ];
    
  • Mathematica
    Select[Range[500000], PrimeOmega[#^3 - 1] == PrimeOmega[#^3 + 1] == 2 &]
    Select[Range[10^6], And @@ PrimeQ[{# - 1, # + 1, #^2 - # + 1, #^2 + # + 1}] &] (* Amiram Eldar, Apr 19 2024 *)
  • PARI
    isok(n) = (bigomega(n^3-1) == 2) && (bigomega(n^3+1) == 2); \\ Michel Marcus, Jan 26 2016
    
  • PARI
    is(n) = isprime(n - 1) && isprime(n + 1) && isprime(n^2 - n + 1) && isprime(n^2 + n + 1); \\ Amiram Eldar, Apr 19 2024

A088707 Semiprimes + 1.

Original entry on oeis.org

5, 7, 10, 11, 15, 16, 22, 23, 26, 27, 34, 35, 36, 39, 40, 47, 50, 52, 56, 58, 59, 63, 66, 70, 75, 78, 83, 86, 87, 88, 92, 94, 95, 96, 107, 112, 116, 119, 120, 122, 123, 124, 130, 134, 135, 142, 143, 144, 146, 147, 156, 159, 160, 162, 167, 170, 178, 179, 184, 186
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 11 2003

Keywords

Comments

a(n) = A001358(n) + 1.

Crossrefs

Cf. A005385 (primes), A109373 (semiprimes), A065516 (first differences).

Programs

A109067 3-almost primes of the form semiprime + 1.

Original entry on oeis.org

27, 50, 52, 63, 66, 70, 75, 78, 92, 116, 124, 130, 147, 170, 186, 188, 195, 207, 222, 236, 238, 255, 266, 268, 275, 279, 290, 292, 310, 322, 356, 363, 366, 387, 399, 404, 412, 418, 423, 428, 438, 452, 455, 470, 474, 483, 494, 498, 506, 518, 530, 534, 539, 555
Offset: 1

Views

Author

Jonathan Vos Post, Aug 24 2005

Keywords

Examples

			a(1) = 27 because (2*13+1)=(3^3) = 27.
a(2) = 50 because (7*7+1)=(2*5^2) = 50.
a(3) = 52 because (3*17+1)=(2^2*13) = 52.
a(4) = 63 because (2*31+1)=(3^2*7) = 63.
a(5) = 66 because (5*13+1)=(2*3*11) = 66.
a(6) = 70 because (3*23+1)=(2*5*7) = 70.
a(7) = 75 because (2*37+1)=(3*5^2) = 75.
a(8) = 78 because (7*11+1)=(2*3*13) = 78.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 3-almost primes are in A014612.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in this sequence.
4-almost primes of the form semiprime + 1 are in A109287.
5-almost primes of the form semiprime + 1 are in A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger[n];Select[Range[600], f[ # ] == 3 && f[ # - 1] == 2 &] (* Ray Chandler, Mar 20 2007 *)
    Select[Select[Range[600],PrimeOmega[#]==2&]+1,PrimeOmega[#]==3&] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    list(lim)=my(v=List(),t); forprime(p=2,lim, forprime(q=2,min(p,lim\p), if(bigomega(t=p*q+1)==3, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 01 2017

Formula

a(n) is in this sequence iff a(n) is in A014612 and a(n)-1 is in A001358.

Extensions

Edited and extended by Ray Chandler, Mar 20 2007

A109383 5-almost primes of the form semiprime + 1.

Original entry on oeis.org

112, 120, 162, 300, 304, 378, 392, 396, 408, 520, 552, 567, 592, 612, 630, 656, 675, 680, 688, 696, 700, 750, 780, 918, 924, 944, 952, 980, 990, 1044, 1100, 1116, 1136, 1140, 1160, 1168, 1170, 1242, 1264, 1272, 1300, 1323, 1352, 1372, 1380, 1386, 1416, 1470
Offset: 1

Views

Author

Jonathan Vos Post, Aug 25 2005

Keywords

Examples

			a(1) = 112 because (3*37)+1 = (2^4) * 7 = 112.
a(2) = 120 because (7*17)+1 = (2^3) * 3 * 5 = 120.
a(3) = 162 because (7*23)+1 = 2 * (3^4) = 162.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 5-almost primes are in A014614.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in A109067.
4-almost primes of the form semiprime + 1 are in A109287.
5-almost primes of the form semiprime + 1 are in this sequence.
Least n-almost prime of the form semiprime + 1 are in A128665.

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger[n];Select[Range[1500], f[ # ] == 5 && f[ # - 1] == 2 &] (* Ray Chandler, Mar 20 2007 *)
  • PARI
    v=vector(10000);i=0; for(n=1,9e99, if(issemi(n)&bigomega(n+1)==5, v[i++]=n+1;if(i==#v, return))); v \\ Charles R Greathouse IV, Feb 14 2011

Formula

a(n) is in this sequence iff a(n) is in A014614 and (a(n)-1) is in A001358.

Extensions

Extended by Ray Chandler, Mar 20 2007

A128665 Least n-almost prime of the form semiprime + 1.

Original entry on oeis.org

5, 10, 27, 16, 112, 96, 288, 896, 512, 1536, 2048, 10240, 12288, 36864, 49152, 98304, 196608, 393216, 1769472, 1572864, 3145728, 6291456, 8388608, 41943040, 50331648, 234881024, 201326592, 905969664, 805306368, 6039797760, 3221225472, 6442450944, 19327352832, 64424509440, 173946175488, 257698037760, 137438953472, 412316860416, 1236950581248, 3848290697216, 2199023255552, 10995116277760, 29686813949952
Offset: 1

Views

Author

Ray Chandler, Mar 19 2007

Keywords

Crossrefs

Extensions

a(28)-a(43) from Donovan Johnson, Nov 24 2010

A131457 a(n+1) is the next semiprime such that a(n+1)-1 divides (a(1)...a(n))^2.

Original entry on oeis.org

4, 9, 10, 21, 22, 25, 26, 33, 34, 35, 46, 49, 51, 55, 57, 58, 65, 69, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 161, 166, 169, 177, 178, 183, 185, 187, 201, 202, 203, 205, 206, 209, 213
Offset: 1

Views

Author

Jonathan Vos Post, Oct 21 2007

Keywords

Comments

This is to semiprimes A001358 as A007459 is to primes A000040.

Examples

			a(1) = 4 because 4 = 2^2 is the first semiprime.
a(2) = 9 because 9 = 3^2 is the next semiprime after 4, where 9-1=8 divides 4^2 = 16.
a(3) = 10 because 10 = 2*5 is the next semiprime after 9 where 10-9=9 divides (4*9)^2.
a(4) = 21 because 21 = 3*7 is the next semiprime after 10, where 10-1=9 divides (4*9*10)^2.
a(5) = 22 because 22 = 2*11 is the next semiprime after 21, where 21-1=20 divides (4*9*10*21)^2.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true ; else false; fi ; end: A131457 := proc(n) option remember ; local a,prevpr; if n =1 then 4; else prevpr := (mul(A131457(i),i=1..n-1))^2 ; a := A131457(n-1)+1 ; while not isA001358(a) or prevpr mod (a-1) <> 0 do a := a+1 ; od; RETURN(a) ; fi ; end: seq(A131457(n),n=1..80) ; # R. J. Mathar, Oct 30 2007
  • Mathematica
    semiprimeQ[n_] := PrimeOmega[n] == 2;
    a[n_] := a[n] = Module[{k, prevpr}, If[n == 1, 4, prevpr = Product[a[i], {i, 1, n-1}]^2; k = a[n-1]+1; While[!semiprimeQ[k] || Mod[prevpr, k-1] != 0, k++]; Return[k]]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jan 28 2024, after R. J. Mathar *)

Extensions

Corrected and extended by R. J. Mathar, Oct 30 2007
Showing 1-8 of 8 results.