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-9 of 9 results.

A158476 Lesser of twin pairs in A086006.

Original entry on oeis.org

107, 71549, 97379, 103067, 136709, 342449, 403829, 686969, 695879, 758267, 795797, 805499, 887399, 941489, 945881, 1023227, 1025747, 1081709, 1081979, 1169027, 1179989, 1261259, 1456919, 1554101, 2110877, 2148659, 2167469, 2433059, 2494439, 2554397, 2623571, 2803121
Offset: 1

Views

Author

Zak Seidov, Mar 20 2009

Keywords

Comments

Primes p such that both p and p+2 are terms in A086006.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[10^6]], PrimeQ[# + 2] && PrimeOmega[2*# - 1] == PrimeOmega[2*# + 1] == 2 && PrimeOmega[2*# + 3] == PrimeOmega[2*# + 5] == 2 &] (* Amiram Eldar, Apr 06 2023 *)
  • PARI
    is(p) = (bigomega(2*p+1) == 2) && (bigomega(2*p-1) == 2);
    lista(max) = {my(q1 = 0, q2, prev = 0); forprime(p = 2, max, q2 = is(p); if(p == prev + 2 && q1 && q2, print1(prev, ", ")); prev = p; q1 = q2);} \\ Amiram Eldar, Apr 06 2023

Extensions

More terms from Amiram Eldar, Apr 06 2023

A056809 Numbers k such that k, k+1 and k+2 are products of two primes.

Original entry on oeis.org

33, 85, 93, 121, 141, 201, 213, 217, 301, 393, 445, 633, 697, 841, 921, 1041, 1137, 1261, 1345, 1401, 1641, 1761, 1837, 1893, 1941, 1981, 2101, 2181, 2217, 2305, 2361, 2433, 2461, 2517, 2641, 2721, 2733, 3097, 3385, 3601, 3693, 3865, 3901, 3957, 4285
Offset: 1

Views

Author

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

Keywords

Comments

Each term is the beginning of a run of three 2-almost primes (semiprimes). No runs exist of length greater than three. For the same reason, each term must be odd: If k were even, then so would be k+2. In fact, one of k or k+2 would be divisible by 4, so must indeed be 4 to have only two prime factors. However, neither 2,3,4 nor 4,5,6 is such a run. - Rick L. Shepherd, May 27 2002
k+1, which is twice a prime, is in A086005. The primes are in A086006. - T. D. Noe, May 31 2006
The squarefree terms are listed in A039833. - Jianing Song, Nov 30 2021

Examples

			121 is in the sequence because 121 = 11^2, 122 = 2*61 and 123 = 3*41, each of which is the product of two primes.
		

Crossrefs

Intersection of A070552 and A092207.

Programs

  • Mathematica
    f[n_] := Plus @@ Transpose[ FactorInteger[n]] [[2]]; Select[Range[10^4], f[ # ] == f[ # + 1] == f[ # + 2] == 2 & ]
    Flatten[Position[Partition[PrimeOmega[Range[5000]],3,1],{2,2,2}]] (* Harvey P. Dale, Feb 15 2015 *)
    SequencePosition[PrimeOmega[Range[5000]],{2,2,2}][[;;,1]] (* Harvey P. Dale, Mar 03 2024 *)
  • PARI
    forstep(n=1,5000,2, if(bigomega(n)==2 && bigomega(n+1)==2 && bigomega(n+2)==2, print1(n,",")))
    
  • PARI
    is(n)=n%4==1 && isprime((n+1)/2) && bigomega(n)==2 && bigomega(n+2)==2 \\ Charles R Greathouse IV, Sep 08 2015
    
  • PARI
    list(lim)=my(v=List(),t); forprime(p=2,(lim+1)\2, if(bigomega(t=2*p-1)==2 && bigomega(t+2)==2, listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Sep 08 2015

Formula

a(n) = A086005(n) - 1 = 2*A086006(n) - 1 = 4*A123255(n) + 1. - Jianing Song, Nov 30 2021

Extensions

Edited and extended by Robert G. Wilson v, May 04 2002

A124936 Numbers k such that k - 1 and k + 1 are semiprimes.

Original entry on oeis.org

5, 34, 50, 56, 86, 92, 94, 120, 122, 142, 144, 160, 184, 186, 202, 204, 214, 216, 218, 220, 236, 248, 266, 288, 290, 300, 302, 304, 320, 322, 328, 340, 392, 394, 412, 414, 416, 446, 452, 470, 472, 516, 518, 528, 534, 536, 544, 552, 580, 582, 590, 634, 668
Offset: 1

Views

Author

Zak Seidov, Nov 13 2006

Keywords

Comments

All but the first term are even.

Crossrefs

Cf. A092207 (k and k+2 are semiprimes), A086005 (k-1, k, k+1 are semiprimes), A086006 (primes p such that 2*p-1 and 2*p+1 are semiprimes), A082130 (2*k-1 and 2*k+1 are semiprimes).

Programs

  • Magma
    IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [1..700] | IsSemiprime(n+1) and IsSemiprime(n-1)]; // Vincenzo Librandi, Mar 30 2015
    
  • Mathematica
    lst={};Do[If[Plus@@Last/@FactorInteger[n-1]==2&&Plus@@Last/@FactorInteger[n+1]==2,AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 01 2009 *)
    Select[Range[2, 700], PrimeOmega[# + 1] == PrimeOmega[# - 1] == 2 &] (* Vincenzo Librandi, Mar 30 2015 *)
  • PARI
    list(lim)=if(lim<5,return([])); my(v=List([5]),x=1,y=1); forfactored(z=7,lim\1+1, if(vecsum(z[2][,2])==2 && vecsum(x[2][,2])==2, listput(v,z[1]-1)); x=y; y=z); Vec(v) \\ Charles R Greathouse IV, May 22 2018
    
  • Python
    from sympy import factorint
    from itertools import count, islice
    def agen(): # generator of terms
        yield 5
        nxt = 0
        for k in count(6, 2):
            prv, nxt = nxt, sum(factorint(k+1).values())
            if prv == nxt == 2: yield k
    print(list(islice(agen(), 53))) # Michael S. Branicky, Nov 26 2022

Formula

a(n) = A092207(n) + 1; at n>=2, a(n) = 2*A082130(n-1).

A086005 Semiprimes sandwiched between semiprimes.

Original entry on oeis.org

34, 86, 94, 122, 142, 202, 214, 218, 302, 394, 446, 634, 698, 842, 922, 1042, 1138, 1262, 1346, 1402, 1642, 1762, 1838, 1894, 1942, 1982, 2102, 2182, 2218, 2306, 2362, 2434, 2462, 2518, 2642, 2722, 2734, 3098, 3386, 3602, 3694, 3866, 3902, 3958, 4286, 4414
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 07 2003

Keywords

Comments

These are some of the balanced semiprimes (see A213025). - Alonso del Arte, Jun 04 2012

Examples

			94 = 47*2: 94 - 1 = 3*31 and 94 + 1 = 5*19, therefore 94 is in the sequence.
		

Crossrefs

Programs

  • Haskell
    a086005 n = a086005_list !! (n-1)
    a086005_list = filter
       (\x -> a064911 (x - 1) == 1 && a064911 (x + 1) == 1) a100484_list
    -- Reinhard Zumkeller, Aug 08 2013, Jun 10 2012
    
  • Mathematica
    u[n_]:=Plus@@Last/@FactorInteger[n]==2;lst={};Do[If[u[n],sp=n;If[u[sp-1]&&u[sp+1],AppendTo[lst,sp]]],{n,8!}];lst  (* Vladimir Joseph Stephan Orlovsky, Nov 16 2009 *)
    (* First run program for A109611 to define semiPrimeQ *) Select[Range[4000], Union[{semiPrimeQ[# - 1], semiPrimeQ[#], semiPrimeQ[# + 1]}] == {True} &] (* Alonso del Arte, Jun 03 2012 *)
    Select[Partition[Range@ 4000, 3, 1], Union@ PrimeOmega@ # == {2} &][[All, 2]] (* Michael De Vlieger, Jun 14 2017 *)
  • Python
    from itertools import count, islice
    from sympy import factorint, isprime
    def agen(): # generator of terms
        nxt = 0
        for k in count(2, 2):
            prv, nxt = nxt, sum(factorint(k+1).values())
            if prv == nxt == 2 and isprime(k//2): yield k
    print(list(islice(agen(), 46))) # Michael S. Branicky, Nov 26 2022

Formula

a(n) = 2*A086006(n).
a(n) = A056809(n)+1. - Zak Seidov, Sep 30 2012

A109373 Semiprimes of the form semiprime + 1.

Original entry on oeis.org

10, 15, 22, 26, 34, 35, 39, 58, 86, 87, 94, 95, 119, 122, 123, 134, 142, 143, 146, 159, 178, 202, 203, 206, 214, 215, 218, 219, 254, 299, 302, 303, 327, 335, 362, 382, 394, 395, 446, 447, 454, 482, 502, 515, 527, 538, 543, 554, 566, 623, 634, 635, 695, 698
Offset: 1

Views

Author

Jonathan Vos Post, Aug 24 2005

Keywords

Examples

			a(1) = 10 because (3*3+1)=(2*5) = 10.
a(2) = 15 because (2*7+1)=(3*5) = 15.
a(3) = 22 because (3*7+1)=(2*11) = 22.
a(4) = 26 because (5*5+1)=(2*13) = 26.
a(5) = 34 because (3*11+1)=(2*17) = 34.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in this sequence.
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 A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.
Subsequence of A088707; A064911.

Programs

  • Haskell
    a109373 n = a109373_list !! (n-1)
    a109373_list = filter ((== 1) . a064911) a088707_list
    -- Reinhard Zumkeller, Feb 20 2012
    
  • Mathematica
    fQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; Select[ Range[ 700], fQ[ # - 1] && fQ[ # ] &] (* Robert G. Wilson v *)
    With[{sps=Select[Range[700],PrimeOmega[#]==2&]},Transpose[Select[ Partition[ sps,2,1],#[[2]]-#[[1]]==1&]][[2]]] (* Harvey P. Dale, Sep 05 2012 *)
  • PARI
    is(n)=bigomega(n)==2 && bigomega(n-1)==2 \\ Charles R Greathouse IV, Jan 31 2017

Formula

a(n) is in this sequence iff a(n) is in A001358 and (a(n)-1) is in A001358.
a(n) = A070552(n) + 1.

Extensions

Extended by Ray Chandler and Robert G. Wilson v, Aug 25 2005
Edited by Ray Chandler, Mar 20 2007

A195685 Primes p for which tau(2p-1) = tau(2p+1) = 4.

Original entry on oeis.org

17, 43, 47, 71, 101, 107, 109, 151, 197, 223, 317, 349, 461, 521, 569, 631, 673, 701, 821, 881, 919, 947, 971, 991, 1051, 1091, 1109, 1153, 1181, 1217, 1231, 1259, 1321, 1361, 1367, 1549, 1693, 1801, 1847, 1933, 1951, 1979, 2143, 2207, 2267, 2297, 2441, 2801
Offset: 1

Views

Author

Timothy L. Tiffin, Sep 22 2011

Keywords

Comments

Sequence terms are a subset of those listed in A086006 and A068497.
The numbers 2p-1, 2p, 2p+1 form a run (indeed, a maximal run) of three consecutive integers each with four positive divisors. The first two examples are 33, 34, 35 and 85, 86, 87. A039833 gives the first number in these maximal 3-integer runs. - Timothy L. Tiffin, Jul 05 2016

Examples

			tau(2*17-1) = tau(33) = tau(3*11) = 4 = tau(5*7) = tau(35) = tau(2*17+1) and tau(2*43-1) = tau(85) = tau(5*17) = 4 = tau(3*29) = tau(87) = tau(2*43+1). - _Timothy L. Tiffin_, Jul 05 2016
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    q:= p-> isprime(p) and tau(2*p-1)=4 and tau(2*p+1)=4:
    select(q, [$1..3000])[];  # Alois P. Heinz, Apr 18 2019
  • Mathematica
    Select[Prime[Range[500]], DivisorSigma[0, 2 # - 1] == DivisorSigma[0, 2 # + 1] == 4 &] (* T. D. Noe, Sep 22 2011 *)
    Select[Mean[#]/2&/@SequencePosition[DivisorSigma[0,Range[6000]],{4,,4}],PrimeQ] (* _Harvey P. Dale, Nov 26 2021 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if ((numdiv(2*p-1) == 4) && (numdiv(2*p+1) == 4), print1(p, ", "))); \\ Michel Marcus, Jul 06 2016

Formula

a(n) = A248201(n)/2. - Torlach Rush, Jun 25 2021

A115393 Numbers n such that n, n-1 and n-2 are semiprimes.

Original entry on oeis.org

35, 87, 95, 123, 143, 203, 215, 219, 303, 395, 447, 635, 699, 843, 923, 1043, 1139, 1263, 1347, 1403, 1643, 1763, 1839, 1895, 1943, 1983, 2103, 2183, 2219, 2307, 2363, 2435, 2463, 2519, 2643, 2723, 2735, 3099, 3387, 3603, 3695, 3867, 3903, 3959, 4287
Offset: 1

Views

Author

Zak Seidov, Mar 08 2006

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k;
       k:= n mod 3;
       if k = 0 then isprime(n/3) and isprime((n-1)/2) and numtheory:-bigomega(n-2)=2
       elif k= 1 then false
       else isprime((n-2)/3) and isprime((n-1)/2) and numtheory:-bigomega(n)=2
       fi
    end proc:
    select(filter, [seq(i,i=3..10000,4)]); # Robert Israel, Jun 11 2020
  • Mathematica
    upto=5000;p=Prime[Range[PrimePi[upto/2]]];lim=Floor[Sqrt[upto]]; sp={};k=0; While[k++;p[[k]]<=lim,sp=Join[sp,p[[k]] *Take[p,{k,PrimePi[upto/p[[k]]]}]]]; sp=Sort[sp];Transpose[Select [Partition[sp,3,1], Last[#]-#[[2]]==#[[2]]-First[#]==1&]][[3]] (* Harvey P. Dale, Mar 21 2011 -- semiprime generating portion of program from A001358 *)

Formula

a(n)=A056809(n)+2=A086005(n)+1=2*A086006(n)+1.

A115394 List of triples of semiprimes: each three numbers are consecutive semiprimes.

Original entry on oeis.org

33, 34, 35, 85, 86, 87, 93, 94, 95, 121, 122, 123, 141, 142, 143, 201, 202, 203, 213, 214, 215, 217, 218, 219, 301, 302, 303, 393, 394, 395, 445, 446, 447, 633, 634, 635, 697, 698, 699, 841, 842, 843, 921, 922, 923, 1041, 1042, 1043, 1137, 1138, 1139, 1261
Offset: 1

Views

Author

Zak Seidov, Mar 08 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Select[Partition[Union[Times@@@Tuples[Prime[Range[150]],{2}]],3,1],#[[3]]-#[[2]]==#[[2]]-#[[1]]==1&]]  (* Harvey P. Dale, Jan 22 2011 *)

Formula

a(3n-2) = A056809(n), a(3n-1) = A086005(n), a(3n) = A086005(n) + 1 = 2*A086006(n) + 1, n=1,2,...

A328058 Primes p such that 2*p-1 is a semiprime.

Original entry on oeis.org

5, 11, 13, 17, 29, 43, 47, 61, 67, 71, 73, 89, 101, 103, 107, 109, 127, 151, 181, 191, 197, 223, 227, 241, 251, 269, 277, 283, 317, 349, 359, 373, 397, 409, 421, 433, 457, 461, 467, 487, 521, 541, 569, 571, 631, 643, 647, 659, 673, 701, 709, 719, 733, 739, 751, 757, 769, 821, 857, 859, 881, 883
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 03 2019

Keywords

Examples

			a(3)=13 is in the sequence because it is prime and 2*13-1=5^2 is a semiprime.
		

Crossrefs

Cf. A000040, A001358. Includes A067756 and A162336.

Programs

  • Magma
    [p: p in PrimesUpTo(1000)| &+[d[2]: d in Factorization(2*p-1)] eq 2]; // Marius A. Burtea, Oct 03 2019
    
  • Maple
    select(t -> isprime(t) and numtheory:-bigomega(2*t-1)=2, [2,seq(i,i=3..10000,2)]);
  • Mathematica
    Select[Prime@ Range@ 153, PrimeOmega[2 # - 1] == 2 &] (* Michael De Vlieger, Oct 03 2019 *)
  • PARI
    isok(p) = isprime(p) && (bigomega(2*p-1) == 2); \\ Michel Marcus, Oct 04 2019
Showing 1-9 of 9 results.