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-10 of 13 results. Next

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).

A055212 Number of composite divisors of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 3, 0, 3, 0, 3, 1, 1, 0, 5, 1, 1, 2, 3, 0, 4, 0, 4, 1, 1, 1, 6, 0, 1, 1, 5, 0, 4, 0, 3, 3, 1, 0, 7, 1, 3, 1, 3, 0, 5, 1, 5, 1, 1, 0, 8, 0, 1, 3, 5, 1, 4, 0, 3, 1, 4, 0, 9, 0, 1, 3, 3, 1, 4, 0, 7, 3, 1, 0, 8, 1, 1, 1, 5, 0, 8, 1, 3, 1, 1, 1, 9, 0, 3, 3, 6, 0, 4, 0, 5, 4
Offset: 1

Views

Author

Leroy Quet, Jun 23 2000

Keywords

Comments

Trivially, there is only one run of three consecutive 0's. However, there are infinitely many runs of three consecutive 1's and they are at positions A056809(n), A086005(n), and A115393(n) for n >= 1. - Timothy L. Tiffin, Jun 21 2021

Examples

			a[20] = 3 because the composite divisors of 20 are 4, 10, 20.
		

Crossrefs

Complement of A083399.

Programs

Formula

a(n) = A033273(n) - 1.
a(n) = tau(n)-omega(n)-1, where tau=A000005 and omega=A001221. - Reinhard Zumkeller, Jun 13 2003
G.f.: -x/(1 - x) + Sum_{k>=1} (x^k - x^prime(k))/((1 - x^k)*(1 - x^prime(k))). - Ilya Gutkovskiy, Mar 21 2017
Sum_{k=1..n} a(k) ~ n*log(n) - n*log(log(n)) + (2*gamma - 2 - B)*n, where gamma is Euler's constant (A001620) and B is Mertens's constant (A077761). - Amiram Eldar, Dec 07 2023

A086006 Primes p such that 2*p-1 and 2*p+1 are semiprimes.

Original entry on oeis.org

17, 43, 47, 61, 71, 101, 107, 109, 151, 197, 223, 317, 349, 421, 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
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 07 2003

Keywords

Comments

a(n) = A086005(n)/2.

Examples

			101 is prime and 2*101-1=201=3*67, 2*101+1=203=7*29, therefore 101 is a term.
It is the sixth term and a(6)=101=A086005(6)/2.
		

Crossrefs

Programs

  • Haskell
    a086006 = flip div 2 . a086005  -- Reinhard Zumkeller, Aug 08 2013
  • Mathematica
    Select[Prime[Range[400]],PrimeOmega[2#-1]==PrimeOmega[2#+1]==2&] (* Harvey P. Dale, Jun 23 2016 *)
  • PARI
    isok(n) = isprime(n) && (bigomega(2*n+1) == 2) && (bigomega(2*n-1) == 2) \\ Michel Marcus, Aug 01 2013
    

Formula

A064911(2*a(n)-1) * A064911(2*a(n)+1) = 1. - Reinhard Zumkeller, Aug 08 2013

A335600 The poor sandwiches sequence (see Comments lines for definition).

Original entry on oeis.org

2, 1, 110, 10, 1101, 11010, 3, 330, 30, 3303, 33030, 4, 440, 40, 4404, 44040, 5, 550, 50, 5505, 55050, 6, 660, 60, 6606, 66060, 7, 770, 70, 7707, 77070, 8, 880, 80, 8808, 88080, 9, 990, 90, 9909, 99090, 11, 101, 1010, 22, 20, 202, 220, 2022, 2020, 33, 303, 3030, 44, 404, 4040, 55, 505, 5050, 66, 606, 6060, 77
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jun 15 2020

Keywords

Comments

Imagine we would have a pair of adjacent integers in the sequence like [1951, 2020]. The sandwich would then be made of the rightmost digit of a(n), the leftmost digit of a(n+1) and, in between, the absolute difference of those two digits. The pair [1951, 2020] would then produce the (poor) sandwich 112. (Why poor? Because a rich sandwich would insert the sum of the digits instead of their absolute difference - that is 132 in this example). Please note that the pair [2020, 1951] would produce the poor and genuine sandwich 011 (we keep the leading zero: these are sandwiches after all, not integers).
Now we want the sequence to be the lexicographically earliest sequence of distinct positive terms such that the successive sandwiches emerging from the sequence rebuild it, digit after digit.

Examples

			The first successive sandwiches are: 211, 101, 011, 011, 101, 033,...
The first one (211) is visible between a(1) = 2 and a(2) = 1; we get the sandwich by inserting the difference 1 between 2 and 1.
The second sandwich (101) is visible between a(2) = 1 and a(3) = 110; we get this sandwich by inserting the difference 0 between 1 and 1.
The third sandwich (011) is visible between a(3) = 110 and a(4) = 10; we get this sandwich by inserting the difference 1 between 0 and 1; etc.
The successive sandwiches rebuild, digit by digit, the starting sequence.
		

Crossrefs

Cf. A086005 (Semiprimes sandwiched between semiprimes).

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

A213025 Balanced semiprimes (of order one): semiprimes which are the average of the previous semiprime and the following semiprime.

Original entry on oeis.org

34, 86, 94, 122, 142, 185, 194, 202, 214, 218, 262, 289, 302, 314, 321, 358, 371, 394, 407, 413, 415, 422, 446, 471, 489, 493, 497, 517, 535, 562, 581, 586, 626, 634, 669, 687, 698, 734, 785, 791, 815, 838, 842, 922, 982, 989, 1042, 1057, 1079, 1135, 1138
Offset: 1

Views

Author

Gerasimov Sergey, Jun 03 2012

Keywords

Comments

Semiprimes that are the average of three successive semiprimes.
First term not also in A086005 is 185. - Alonso del Arte, Jun 04 2012

Examples

			194 is in the sequence because 194 = (187 + 194 + 201)/3 = (A001358(61) + A001358(62) + A001358(63))/3.
		

Crossrefs

Cf. A086005 (subsequence), A001358, A006562, A065516, A212820.

Programs

  • Haskell
    a213025 n = a213025_list !! (n-1)
    a213025_list = f a001358_list where
       f (x:sps'@(y:z:sps)) | 2 * y == (x + z) = y : f sps'
                            | otherwise        = f sps'
    -- Reinhard Zumkeller, Jun 10 2012
  • Maple
    with(numtheory):
    prevsp:= proc(n) local k; for k from n-1 by -1
               while isprime(k) or bigomega(k)<>2 do od; k end:
    nextsp:= proc(n) local k; for k from n+1
               while isprime(k) or bigomega(k)<>2 do od; k end:
    a:= proc(n) option remember; local s;
          s:= `if`(n=1, 4, a(n-1));
          do s:= nextsp(s);
             if s=(prevsp(s)+nextsp(s))/2 then break fi
          od; s
        end:
    seq (a(n), n=1..100);  # Alois P. Heinz, Jun 03 2012
  • Mathematica
    bspQ[{a_,b_,c_}]:=b==(a+c)/2; With[{sp=Select[Range[1200],PrimeOmega[#] == 2&]}, Transpose[Select[Partition[sp,3,1],bspQ]][[2]]] (* Harvey P. Dale, Nov 18 2012 *)
    Select[Partition[Select[Range[1200],PrimeOmega[#]==2&],3,1],Mean[#]==#[[2]]&][[;;,2]] (* Harvey P. Dale, Jul 31 2025 *)

Formula

2*sp_(n) = sp_(n - 1) + sp_(n + 1).
a(n) = (1/3) * (sp(i) + sp(i + 1) + sp(i + 2)), for some i(n).

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.

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

A202319 Lesser of two semiprimes sandwiched each between semiprimes thus forming a twin semiprime-triple.

Original entry on oeis.org

214, 143098, 194758, 206134, 273418, 684898, 807658, 1373938, 1391758, 1516534, 1591594, 1610998, 1774798, 1882978, 1891762, 2046454, 2051494, 2163418, 2163958, 2338054, 2359978, 2522518, 2913838, 3108202, 4221754, 4297318, 4334938, 4866118, 4988878, 5108794
Offset: 1

Views

Author

V.J. Pohjola, Dec 16 2011

Keywords

Comments

Conjecture: For every natural number k there are infinitely many semiprime pairs sp and sp' both sandwiched between semiprimes such that sp' - sp = 4k.
Note: For the case k=1 the pair of two consecutive semiprime triples will be called twin semiprime-triple with an analogy to twin prime.
The number centered between the triples of a twin semiprime-triple must be divisible by 36. Let m be the middle of such a twin semiprime-triple. It is trivial that m is divisible by 4, and that it is congruent to 0, 4, or 5 (mod 9). If it were congruent to 4, then m-1 and m+2 would both be divisible by 3, hence equal to 3 times a prime. But then those two primes would differ by 1, impossible except for primes 2, 3, which can be checked separately. A similar argument eliminates the case m == 5 (mod 9), so m must be divisible by 9. Conjecture by the author, proved by Franklin T. Adams-Watters, Dec 18 2011.
Members of this sequence must be twice the lesser of a twin prime. - Franklin T. Adams-Watters, Dec 18 2011
A number is in the sequence if and only if it has the form 6k-2, with 2k+-1 being twin primes, 3k+-1 twin primes, and 6k+-1 semiprimes. - Peter Munn, Oct 28 2017
By arguments similar to the above proof that m = a(n)+2 is divisible by 36, it can be shown that (a(n)+2)/36 == {-1, 0, 1} (mod 5) == {-1, 0, 1} (mod 7) and that a(n) == {214, 502, 538, 718, 754, 1042, 1258} (mod 1260). - Jon E. Schoenfield, Feb 26 2022

Examples

			The first twin semiprime-triple is {{213,214,215},{217,218,219}} whereby a(1)=214.
The fifteenth semiprime-triple is {{1891761,1891762,1891763},{1891765,1891766,1891767}} whereby a(15)=1891762.
The separating numbers 216 and 1891764 are divisible by 36.
		

Crossrefs

Cf. A086005, A056809, A001359 Analogs: a(n) and A001359, a(n)+2 and A014574, a(n)+4 and A006512.

Programs

  • Mathematica
    (* Run first to define sp *) nn = 10^8; p = Prime[Range[PrimePi[nn/2]]]; lim = Floor[Sqrt[nn]]; sp = {}; k = 0; While[k++; p[[k]] <= lim, sp = Join[sp, p[[k]]*Take[p, {k, PrimePi[nn/p[[k]]]}]]]; sp = Sort[sp]; lsp = Length[sp]; b = {}; Do[If[sp[[n]] == sp[[n - 1]] + 1 && sp[[n]] == sp[[n + 1]] - 1, AppendTo[b, sp[[n - 1]]]], {n, 2, lsp-1}]; lb = Length[b]; triples = {}; Do[If[b[[i]] == b[[i - 1]] + 4, AppendTo[triples, b[[i - 1]]]], {i, 2, lb}]; triples+1 (* V.J.Pohjola, Dec 18 2011 *)
    SequencePosition[PrimeOmega[Range[5200000]],{2,2,2,,2,2,2}][[All,1]]+1 (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jul 06 2017 *)
Showing 1-10 of 13 results. Next