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.

A006881 Squarefree semiprimes: Numbers that are the product of two distinct primes.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k) + sigma(k) = 2*(k+1). - Benoit Cloitre, Mar 02 2002
Numbers k such that tau(k) = omega(k)^omega(k). - Benoit Cloitre, Sep 10 2002 [This comment is false. If k = 900 then tau(k) = omega(k)^omega(k) = 27 but 900 = (2*3*5)^2 is not the product of two distinct primes. - Peter Luschny, Jul 12 2023]
Could also be called 2-almost primes. - Rick L. Shepherd, May 11 2003
From the Goldston et al. reference's abstract: "lim inf [as n approaches infinity] [(a(n+1) - a(n))] <= 26. If an appropriate generalization of the Elliott-Halberstam Conjecture is true, then the above bound can be improved to 6." - Jonathan Vos Post, Jun 20 2005
The maximal number of consecutive integers in this sequence is 3 - there cannot be 4 consecutive integers because one of them would be divisible by 4 and therefore would not be product of distinct primes. There are several examples of 3 consecutive integers in this sequence. The first one is 33 = 3 * 11, 34 = 2 * 17, 35 = 5 * 7; (see A039833). - Matias Saucedo (solomatias(AT)yahoo.com.ar), Mar 15 2008
Number of terms less than or equal to 10^k for k >= 0 is A036351(k). - Robert G. Wilson v, Jun 26 2012
Are these the numbers k whose difference between the sum of proper divisors of k and the arithmetic derivative of k is equal to 1? - Omar E. Pol, Dec 19 2012
Intersection of A001358 and A030513. - Wesley Ivan Hurt, Sep 09 2013
A237114(n) (smallest semiprime k^prime(n)+1) is a term, for n != 2. - Jonathan Sondow, Feb 06 2014
a(n) are the reduced denominators of p_2/p_1 + p_4/p_3, where p_1 != p_2, p_3 != p_4, p_1 != p_3, and the p's are primes. In other words, (p_2*p_3 + p_1*p_4) never shares a common factor with p_1*p_3. - Richard R. Forberg, Mar 04 2015
Conjecture: The sums of two elements of a(n) forms a set that includes all primes greater than or equal to 29 and all integers greater than or equal to 83 (and many below 83). - Richard R. Forberg, Mar 04 2015
The (disjoint) union of this sequence and A001248 is A001358. - Jason Kimberley, Nov 12 2015
A263990 lists the subsequence of a(n) where a(n+1)=1+a(n). - R. J. Mathar, Aug 13 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Zervos, Marie: Sur une classe de nombres composés. Actes du Congrès interbalkanique de mathématiciens 267-268 (1935)

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A030229, A051709, A001221 (omega(n)), A001222 (bigomega(n)), A001358 (semiprimes), A005117 (squarefree), A007304 (squarefree 3-almost primes), A213952, A039833, A016105 (subsequences), A237114 (subsequence, n != 2).
Subsequence of A007422.
Cf. A259758 (subsequence), A036351, A363923.

Programs

  • Haskell
    a006881 n = a006881_list !! (n-1)
    a006881_list = filter chi [1..] where
       chi n = p /= q && a010051 q == 1 where
          p = a020639 n
          q = n `div` p
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Magma
    [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1,n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015
    
  • Maple
    N:= 1001: # to get all terms < N
    Primes:= select(isprime, [2,seq(2*k+1,k=1..floor(N/2))]):
    {seq(seq(p*q,q=Primes[1..ListTools:-BinaryPlace(Primes,N/p)]),p=Primes)} minus {seq(p^2,p=Primes)};
    # Robert Israel, Jul 23 2014
    # Alternative, using A001221:
    isA006881 := proc(n)
         if numtheory[bigomega](n) =2 and A001221(n) = 2 then
            true ;
        else
            false ;
        end if;
    end proc:
    A006881 := proc(n) if n = 1 then 6; else for a from procname(n-1)+1 do if isA006881(a) then return a; end if; end do: end if;
    end proc: # R. J. Mathar, May 02 2010
    # Alternative:
    with(NumberTheory): isA006881 := n -> is(NumberOfPrimeFactors(n, 'distinct') = 2 and NumberOfPrimeFactors(n) = 2):
    select(isA006881, [seq(1..205)]); # Peter Luschny, Jul 12 2023
  • Mathematica
    mx = 205; Sort@ Flatten@ Table[ Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[ mx/Prime[n]]}] (* Robert G. Wilson v, Dec 28 2005, modified Jul 23 2014 *)
    sqFrSemiPrimeQ[n_] := Last@# & /@ FactorInteger@ n == {1, 1}; Select[Range[210], sqFrSemiPrimeQ] (* Robert G. Wilson v, Feb 07 2012 *)
    With[{upto=250},Select[Sort[Times@@@Subsets[Prime[Range[upto/2]],{2}]],#<=upto&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    for(n=1,214,if(bigomega(n)==2&&omega(n)==2,print1(n,",")))
    
  • PARI
    for(n=1,214,if(bigomega(n)==2&&issquarefree(n),print1(n,",")))
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrt(lim), forprime(q=p+1, lim\p, listput(v,p*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • Python
    from sympy import factorint
    def ok(n): f=factorint(n); return len(f) == 2 and sum(f[p] for p in f) == 2
    print(list(filter(ok, range(1, 206)))) # Michael S. Branicky, Jun 10 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A006881(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 15 2024
  • Sage
    def A006881_list(n) :
        R = []
        for i in (6..n) :
            d = prime_divisors(i)
            if len(d) == 2 :
                if d[0]*d[1] == i :
                    R.append(i)
        return R
    A006881_list(205)  # Peter Luschny, Feb 07 2012
    

Formula

A000005(a(n)^(k-1)) = A000290(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
A109810(a(n)) = 4; A178254(a(n)) = 6. - Reinhard Zumkeller, May 24 2010
A056595(a(n)) = 3. - Reinhard Zumkeller, Aug 15 2011
a(n) = A096916(n) * A070647(n). - Reinhard Zumkeller, Sep 23 2011
A211110(a(n)) = 3. - Reinhard Zumkeller, Apr 02 2012
Sum_{n >= 1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012
A050326(a(n)) = 2. - Reinhard Zumkeller, May 03 2013
sopf(a(n)) = a(n) - phi(a(n)) + 1 = sigma(a(n)) - a(n) - 1. - Wesley Ivan Hurt, May 18 2013
d(a(n)) = 4. Omega(a(n)) = 2. omega(a(n)) = 2. mu(a(n)) = 1. - Wesley Ivan Hurt, Jun 28 2013
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Aug 22 2013
A089233(a(n)) = 1. - Reinhard Zumkeller, Sep 04 2013
From Peter Luschny, Jul 12 2023: (Start)
For k > 1: k is a term <=> k^A001221(k) = k*A007947(k).
For k > 1: k is a term <=> k^A001222(k) = k*A007947(k).
For k > 1: k is a term <=> A363923(k) = k. (End)
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Jan 13 2025

Extensions

Name expanded (based on a comment of Rick L. Shepherd) by Charles R Greathouse IV, Sep 16 2015

A039833 Smallest of three consecutive squarefree numbers k, k+1, k+2 of the form p*q where p and q are distinct primes.

Original entry on oeis.org

33, 85, 93, 141, 201, 213, 217, 301, 393, 445, 633, 697, 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, 4413, 4533, 4593, 4881, 5601
Offset: 1

Views

Author

Keywords

Comments

Equivalently: k, k+1 and k+2 all have 4 divisors.
There cannot be four consecutive squarefree numbers as one of them is divisible by 2^2 = 4.
These 3 consecutive squarefree numbers of the form p*q have altogether 6 prime factors always including 2 and 3. E.g., if k = 99985, the six prime factors are {2,3,5,19997,33329,49993}. The middle term is even and not divisible by 3.
Nonsquare terms of A056809. First terms of A056809 absent here are A056809(4)=121=11^2, A056809(14)=841=29^2, A056809(55)=6241=79^2.
Cf. A179502 (Numbers k with the property that k^2, k^2+1 and k^2+2 are all semiprimes). - Zak Seidov, Oct 27 2015
The numbers k, k+1, k+2 have the form 2p-1, 2p, 2p+1 where p is an odd prime. A195685 gives the sequence of odd primes that generates these maximal runs of three consecutive integers with four positive divisors. - Timothy L. Tiffin, Jul 05 2016
a(n) is always 1 or 9 mod 12. - Charles R Greathouse IV, Mar 19 2022

Examples

			33, 34 and 35 all have 4 divisors.
85 is a term as 85 = 17*5, 86 = 43*2, 87 = 29*3.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B18.
  • David Wells, Curious and interesting numbers, Penguin Books, 1986, p. 114.

Crossrefs

Programs

  • Haskell
    a039833 n = a039833_list !! (n-1)
    a039833_list = f a006881_list where
       f (u : vs@(v : w : xs))
         | v == u+1 && w == v+1 = u : f vs
         | otherwise            = f vs
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Mathematica
    lst = {}; Do[z = n^3 + 3*n^2 + 2*n; If[PrimeOmega[z/n] == PrimeOmega[z/(n + 2)] == 4 && PrimeNu[z] == 6, AppendTo[lst, n]], {n, 1, 5601, 2}]; lst (* Arkadiusz Wesolowski, Dec 11 2011 *)
    okQ[n_]:=Module[{cl={n,n+1,n+2}},And@@SquareFreeQ/@cl && Union[ DivisorSigma[ 0,cl]]=={4}]; Select[Range[1,6001,2],okQ] (* Harvey P. Dale, Dec 17 2011 *)
    SequencePosition[DivisorSigma[0,Range[6000]],{4,4,4}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 17 2017 *)
  • PARI
    is(n)=n%4==1 && factor(n)[,2]==[1,1]~ && factor(n+1)[,2]==[1,1]~ && factor(n+2)[,2]==[1,1]~ \\ Charles R Greathouse IV, Aug 29 2016
    
  • PARI
    is(n)=my(t=n%12); if(t==1, isprime((n+2)/3) && isprime((n+1)/2) && factor(n)[,2]==[1,1]~, t==9 && isprime(n/3) && isprime((n+1)/2) && factor(n+2)[,2]==[1,1]~) \\ Charles R Greathouse IV, Mar 19 2022

Formula

A008966(a(n)) * A064911(a(n)) * A008966(a(n)+1) * A064911(a(n)+1) * A008966(a(n)+2) * A064911(a(n)+2) = 1. - Reinhard Zumkeller, Feb 26 2011

Extensions

Additional comments from Amarnath Murthy, Vladeta Jovovic, Labos Elemer and Benoit Cloitre, May 08 2002

A109288 Semiprimes equal to p*q + 1, where p and q are distinct primes.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Aug 20 2005

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=60},Take[Select[Union[Times@@#+1&/@Subsets[Prime[Range[2nn]],{2}]],PrimeOmega[#]==2&],nn]] (* Harvey P. Dale, Apr 28 2018 *)
    Select[Range[1000], !IntegerQ[Sqrt[#-1]] && PrimeOmega[#] == PrimeOmega[#-1] == 2 &] (* Amiram Eldar, Aug 08 2025 *)
  • PARI
    for(i=1,1000,if(bigomega(i)==2&&bigomega(i+1)==2&&issquare(i)==0,print1(i+1,","))) \\ Lambert Klasen (lambert.klasen(AT)gmx.net), Aug 21 2005

Formula

a(n) = A263990(n) + 1. - Amiram Eldar, Aug 08 2025

Extensions

More terms from Lambert Klasen (lambert.klasen(AT)gmx.net), Aug 21 2005

A263951 Square numbers in A070552.

Original entry on oeis.org

9, 25, 121, 361, 841, 3481, 3721, 5041, 6241, 10201, 17161, 19321, 32761, 39601, 73441, 121801, 143641, 167281, 201601, 212521, 271441, 323761, 326041, 398161, 410881, 436921, 546121, 564001, 674041, 776161, 863041, 982081, 1062961, 1079521, 1104601, 1142761, 1190281, 1274641, 1324801
Offset: 1

Views

Author

Zak Seidov, Oct 30 2015

Keywords

Comments

All terms are == 1 (mod 8). For n > 2, a(n) == 1 (mod 120).
This sequence is a subsequence of A247687 and it contains the squares of all those primes p for which the areas of the 3 regions in the symmetric representation of p^2 (p once and (p^2 + 1)/2 twice), are primes; i.e., p^2 and p^2 + 1 are semiprimes (see A070552). The sequence of those primes p is A048161. Cf. A237593. - Hartmut F. W. Hoft, Aug 06 2020

Crossrefs

Programs

  • Mathematica
    a263951[n_] := Select[Map[Prime[#]^2&, Range[n]], PrimeQ[(#+1)/2]&]
    a263951[190] (* Hartmut F. W. Hoft, Aug 06 2020 *)
  • PARI
    forprime(p=3, 2000, if(isprime((p^2+1)/2), print1(p^2, ", "))) \\ Altug Alkan, Oct 30 2015

Formula

a(n) = A048161(n)^2.
From Hartmut F. W. Hoft, Aug 06 2020: (Start)
a(n) = 2 * A067755(n) + 1, n >= 1.
a(n+2) = 120 * A068485(n) + 1, n >= 1. (End)

A318896 Numbers k such that k and k+1 are the product of exactly four distinct primes.

Original entry on oeis.org

7314, 8294, 8645, 11570, 13629, 13845, 15105, 15554, 16554, 17390, 17654, 18290, 19005, 20405, 20769, 21489, 22010, 22154, 23001, 23114, 23529, 24530, 24765, 24870, 24969, 25346, 26690, 26894, 26961, 27434, 27965, 28105, 29145, 29210, 29414, 29469, 29666, 30414
Offset: 1

Views

Author

Seiichi Manyama, Sep 05 2018

Keywords

Comments

This sequence is different from A140078. For example, A140078(4) = 9009 = 3^2 * 7 * 11 * 13 is not a term.

Examples

			n | a(n)                    | a(n)+1
--+-------------------------+-------------------------
1 | 7314 = 2 *  3 * 23 * 53 | 7315 = 5 * 7 * 11 *  19
2 | 8294 = 2 * 11 * 13 * 29 | 8295 = 3 * 5 *  7 *  79
3 | 8645 = 5 *  7 * 13 * 19 | 8646 = 2 * 3 * 11 * 131
		

Crossrefs

Subsequence of A140078.

Programs

  • PARI
    is(n) = omega(n)==4 && omega(n+1)==4 && bigomega(n)==4 && bigomega(n+1)==4 \\ Felix Fröhlich, Sep 05 2018
    
  • PARI
    is(n) = factor(n)[, 2]~ == [1, 1, 1, 1] && factor(n+1)[, 2]~ == [1, 1, 1, 1] \\ David A. Corneth, Sep 06 2018

A086263 Smaller of two consecutive squarefree numbers having equal numbers of prime factors.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 14 2003

Keywords

Comments

a(k) is a term of A075039 iff a(k)+1 = a(k+1).
If a prime divides a(n) then it does not divide a(n) + 1. If a prime divides a(n) + 1, then it does not divide a(n). The sets of prime divisors of a(n) and a(n) + 1 are disjoint. - Torlach Rush, Jan 13 2018

Examples

			230 = 2*5*23 and 230+1 = 3*7*11, therefore 230 is a term.
		

Crossrefs

Cf. A005117, A263990 (2 prime factors), A215217 (3 prime factors), A318896 (4 prime factors), A318964 (5 prime factors), A001221, A001222, A075039.

Programs

  • Mathematica
    Select[Range[2, 634], SquareFreeQ[#] && SquareFreeQ[# + 1] && Length[FactorInteger[#]] == Length[FactorInteger[# + 1]] &] (* T. D. Noe, Jun 26 2013 *)
    #[[1,1]]&/@Select[Partition[Table[{n,If[SquareFreeQ[n],1,0], PrimeOmega[ n]},{n,700}],2,1],#[[1,2]]==#[[2,2]]==1&&#[[1,3]]==#[[2,3]]&] (* Harvey P. Dale, Dec 13 2014 *)
  • PARI
    for(n=1,10^3, if ( issquarefree(n) && issquarefree(n+1) && (omega(n)==omega(n+1)) , print1(n,", "))); \\ Joerg Arndt, Jun 26 2013

Formula

A001221(a(n)) = A001222(a(n)) = A001221(a(n)+1) = A001222(a(n)+1).

A318964 Numbers k such that both k and k+1 are the product of exactly five distinct primes.

Original entry on oeis.org

378014, 421134, 483405, 486590, 486794, 489345, 507129, 545258, 549185, 558789, 558830, 634809, 637329, 663585, 667029, 690234, 720290, 776985, 782690, 823745, 824109, 853005, 853034, 855645, 873885, 883245, 892905, 935714, 945230, 968253, 987734, 999005, 1005081, 1013726
Offset: 1

Views

Author

Seiichi Manyama, Sep 06 2018

Keywords

Examples

			n | a(n)                           | a(n)+1
--+--------------------------------+--------------------------------
1 | 378014 = 2 * 7 * 13 * 31 *  67 | 378015 = 3 *  5 * 11 * 29 * 79
2 | 421134 = 2 * 3 *  7 * 37 * 271 | 421135 = 5 * 11 * 13 * 19 * 31
3 | 483405 = 3 * 5 * 13 * 37 *  67 | 483406 = 2 *  7 * 11 * 43 * 73
		

Crossrefs

Subsequence of A140079.

Programs

  • PARI
    is(n) = omega(n)==5 && omega(n+1)==5 && bigomega(n)==5 && bigomega(n+1)==5 \\ Felix Fröhlich, Sep 06 2018

A173967 Sums of two consecutive numbers that are nonsquare semiprimes.

Original entry on oeis.org

29, 43, 67, 69, 77, 115, 171, 173, 187, 189, 237, 245, 267, 283, 285, 291, 317, 355, 403, 405, 411, 427, 429, 435, 437, 507, 597, 603, 605, 653, 669, 763, 787, 789, 891, 893, 907, 963, 1003, 1029, 1053, 1075, 1085, 1107, 1131, 1245, 1267, 1269, 1389, 1395
Offset: 1

Views

Author

Keywords

Examples

			14=2*7; 15=3*5; 14+15=29,
21=3*7; 22=2*11; 21+22=43,..
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1};lst={};Do[If[f[n],If[f[n+1],AppendTo[lst,2*n+1]]],{n,7!}];lst

Formula

a(n) = A263990(n) + A109288(n). - Andrey Zabolotskiy, Apr 07 2025

Extensions

New name from Andrey Zabolotskiy, Apr 07 2025
Showing 1-8 of 8 results.