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 33 results. Next

A140235 Partial sum of non-semiprimes A100959.

Original entry on oeis.org

1, 3, 6, 11, 18, 26, 37, 49, 62, 78, 95, 113, 132, 152, 175, 199, 226, 254, 283, 313, 344, 376, 412, 449, 489, 530, 572, 615, 659, 704, 751, 799, 849, 901, 954, 1008, 1064, 1123, 1183, 1244, 1307, 1371, 1437, 1504, 1572, 1642, 1713, 1785, 1858, 1933, 2009
Offset: 1

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A051352 is to primes A000040. Equivalently, this is to non-semiprimes A100959 as A051349 is to nonprimes A018252.

Examples

			a(5) = 18 = 1 + 2 + 3 + 5 + 7.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Range[100],PrimeOmega[#]!=2&]] (* Harvey P. Dale, Aug 22 2021 *)

Formula

a(n) = Sum{k=1..n} A100959(k).

Extensions

Corrected and edited by Giovanni Resta, Jun 20 2016

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 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, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

A064911 If n is semiprime (or 2-almost prime) then 1 else 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Patrick De Geest, Oct 13 2001

Keywords

Crossrefs

Programs

  • Haskell
    a064911 = a010051 . a032742 -- Reinhard Zumkeller, Mar 13 2011
    
  • Maple
    with(numtheory):
    a:= n-> `if`(bigomega(n)=2, 1, 0):
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 16 2011
  • Mathematica
    Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
  • PARI
    a(n)=bigomega(n)==2 \\ Charles R Greathouse IV, Mar 13 2011

Formula

a(n) = 1 iff n is in A001358 (semiprimes), a(n) = 0 iff n is in A100959 (non-semiprimes). - Reinhard Zumkeller, Nov 24 2004
Dirichlet g.f.: (primezeta(2s) + primezeta(s)^2)/2. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = A057427(A174956(n)); a(n)*A072000(n) = A174956(n). - Reinhard Zumkeller, Apr 03 2010
a(n) = A010051(A032742(n)) (i.e., largest proper divisor is prime). - Reinhard Zumkeller, Mar 13 2011
From Antti Karttunen, Apr 24 2018 & Apr 22 2022: (Start)
a(n) = A280710(n) + A302048(n) = A101040(n) - A010051(n).
a(n) = A353478(n) + A353480(n) = A353477(n) + A353478(n) + A353479(n).
a(n) = A353475(n) + A353476(n).
(End)
a(n) = [Omega(n) = 2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jul 22 2025

Extensions

Edited by M. F. Hasler, Oct 18 2017

A340653 Number of balanced factorizations of n.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 1, 2, 1, 2, 0, 0, 1, 1, 0, 0, 1, 2, 1, 3, 1, 1, 0, 0, 0, 2, 1, 0, 0, 1, 1, 3, 1, 2, 2, 0, 1, 2, 0, 2, 0, 2, 1, 1, 0, 1, 0, 0, 1, 2, 1, 0, 2, 1, 0, 3, 1, 2, 0, 3, 1, 3, 1, 0, 2, 2, 0, 3, 1, 2, 1, 0, 1, 2, 0, 0, 0, 1, 1, 2, 0, 2, 0, 0, 0, 3, 1, 2, 2, 2, 1, 3, 1, 1, 3, 0, 1, 3, 1, 3, 0, 2, 1, 3, 0, 2, 2, 0, 0, 4
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2021

Keywords

Comments

A factorization into factors > 1 is balanced if it is empty or its length is equal to its maximum Omega (A001222).

Examples

			The balanced factorizations for n = 120, 144, 192, 288, 432, 768:
  3*5*8    2*8*9    3*8*8      4*8*9      6*8*9      8*8*12
  2*2*30   3*6*8    4*6*8      6*6*8      2*8*27     2*2*8*24
  2*3*20   2*4*18   2*8*12     2*8*18     3*8*18     2*3*8*16
  2*5*12   2*6*12   4*4*12     3*8*12     4*4*27     2*4*4*24
           3*4*12   2*2*2*24   4*4*18     4*6*18     2*4*6*16
                    2*2*3*16   4*6*12     4*9*12     3*4*4*16
                               2*12*12    6*6*12     2*2*12*16
                               2*2*2*36   2*12*18    2*2*2*2*48
                               2*2*3*24   3*12*12    2*2*2*3*32
                               2*3*3*16   2*2*2*54
                                          2*2*3*36
                                          2*3*3*24
                                          3*3*3*16
		

Crossrefs

Positions of zeros are A001358.
Positions of nonzero terms are A100959.
The co-balanced version is A340596.
Taking maximum factor instead of maximum Omega gives A340599.
The cross-balanced version is A340654.
The twice-balanced version is A340655.
A001055 counts factorizations.
A045778 counts strict factorizations.
A316439 counts factorizations by product and length.
A320655 counts factorizations into semiprimes.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 lists Heinz numbers of balanced partitions.
- A340597 have an alt-balanced factorization.
- A340598 counts balanced set partitions.
- A340600 counts unlabeled balanced multiset partitions.
- A340656 have no twice-balanced factorizations.
- A340657 have a twice-balanced factorization.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],#=={}||Length[#]==Max[PrimeOmega/@#]&]],{n,100}]
  • PARI
    A340653(n, m=n, mbo=0, e=0) = if(1==n, mbo==e, sumdiv(n, d, if((d>1)&&(d<=m), A340653(n/d, d, max(mbo,bigomega(d)), 1+e)))); \\ Antti Karttunen, Oct 22 2023

Extensions

Data section extended up to a(120) by Antti Karttunen, Oct 22 2023

A065119 Numbers k such that the k-th cyclotomic polynomial is a trinomial.

Original entry on oeis.org

3, 6, 9, 12, 18, 24, 27, 36, 48, 54, 72, 81, 96, 108, 144, 162, 192, 216, 243, 288, 324, 384, 432, 486, 576, 648, 729, 768, 864, 972, 1152, 1296, 1458, 1536, 1728, 1944, 2187, 2304, 2592, 2916, 3072, 3456, 3888, 4374, 4608, 5184, 5832, 6144, 6561, 6912, 7776, 8748, 9216
Offset: 1

Views

Author

Len Smiley, Nov 12 2001

Keywords

Comments

Appears to be numbers of form 2^a * 3^b, a >= 0, b > 0. - Lekraj Beedassy, Sep 10 2004
This is true: see link "Cyclotomic trinomials". - Robert Israel, Jul 14 2015
3-smooth numbers (A003586) which are not powers of 2 (A000079). - Amiram Eldar, Nov 10 2020
These are the conjugates of semiprimes, where conjugation is A122111; or Heinz numbers of conjugates of length-2 partitions. - Gus Wiseman, Nov 09 2023
A multiplicative semigroup: if m and n are in the sequence, then so is m*n. - Antti Karttunen, Jul 13 2024

Examples

			The 54th cyclotomic polynomial is x^18 - x^9 + 1 which is trinomial, so 54 is in the sequence.
From _Gus Wiseman_, Nov 09 2023: (Start)
The terms and conjugate semiprimes, showing their respective Heinz partitions, begin:
    3: (2)              4: (1,1)
    6: (2,1)            6: (2,1)
    9: (2,2)            9: (2,2)
   12: (2,1,1)         10: (3,1)
   18: (2,2,1)         15: (3,2)
   24: (2,1,1,1)       14: (4,1)
   27: (2,2,2)         25: (3,3)
   36: (2,2,1,1)       21: (4,2)
   48: (2,1,1,1,1)     22: (5,1)
   54: (2,2,2,1)       35: (4,3)
   72: (2,2,1,1,1)     33: (5,2)
   81: (2,2,2,2)       49: (4,4)
   96: (2,1,1,1,1,1)   26: (6,1)
(End)
		

References

  • Jean-Marie De Koninck and Armel Mercier, 1001 Problèmes en Théorie Classique Des Nombres, Problem 733, pp. 74 and 310, Ellipses Paris, 2004.

Crossrefs

Differs at the 18th term from A063996.
For primes (A008578) we have conjugates A000079.
For triprimes (A014612) we have conjugates A080193.
A001358 lists semiprimes, squarefree A006881, complement A100959.

Programs

  • Maple
    with(numtheory): a := []; for m from 1 to 3000 do if nops([coeffs(cyclotomic(m,x))])=3 then a := [op(a),m] fi od; print(a);
  • Mathematica
    max = 5000; Sort[Flatten[Table[2^a 3^b, {a, 0, Floor[Log[2, max]]}, {b, Floor[Log[3, max/2^a]]}]]] (* Alonso del Arte, May 19 2016 *)
  • PARI
    isok(n)=my(vp = Vec(polcyclo(n))); sum(k=1, #vp, vp[k] != 0) == 3; \\ Michel Marcus, Jul 11 2015
    
  • PARI
    list(lim)=my(v=List(),N); for(n=1,logint(lim\1,3), N=3^n; while(N<=lim, listput(v,N); N<<=1)); Set(v) \\ Charles R Greathouse IV, Aug 07 2015

Formula

A206787(a(n)) = 4. - Reinhard Zumkeller, Feb 12 2012
a(n) = A033845(n)/2 = 3 * A003586(n). - Robert Israel, Jul 14 2015
Sum_{n>=1} 1/a(n) = 1. - Amiram Eldar, Nov 10 2020

Extensions

Offset set to 1 and more terms from Michel Marcus, Jul 11 2015

A340597 Numbers with an alt-balanced factorization.

Original entry on oeis.org

4, 12, 18, 27, 32, 48, 64, 72, 80, 96, 108, 120, 128, 144, 160, 180, 192, 200, 240, 256, 270, 288, 300, 320, 360, 384, 400, 405, 432, 448, 450, 480, 500, 540, 576, 600, 640, 648, 672, 675, 720, 750, 768, 800, 864, 896, 900, 960, 972, 1000, 1008, 1024, 1080
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2021

Keywords

Comments

We define a factorization into factors > 1 to be alt-balanced if its length is equal to its greatest factor.

Examples

			The sequence of terms together with their prime signatures begins:
      4: (2)        180: (2,2,1)    450: (1,2,2)
     12: (2,1)      192: (6,1)      480: (5,1,1)
     18: (1,2)      200: (3,2)      500: (2,3)
     27: (3)        240: (4,1,1)    540: (2,3,1)
     32: (5)        256: (8)        576: (6,2)
     48: (4,1)      270: (1,3,1)    600: (3,1,2)
     64: (6)        288: (5,2)      640: (7,1)
     72: (3,2)      300: (2,1,2)    648: (3,4)
     80: (4,1)      320: (6,1)      672: (5,1,1)
     96: (5,1)      360: (3,2,1)    675: (3,2)
    108: (2,3)      384: (7,1)      720: (4,2,1)
    120: (3,1,1)    400: (4,2)      750: (1,1,3)
    128: (7)        405: (4,1)      768: (8,1)
    144: (4,2)      432: (4,3)      800: (5,2)
    160: (5,1)      448: (6,1)      864: (5,3)
For example, there are two alt-balanced factorizations of 480, namely (2*3*4*4*5) and (2*2*2*2*5*6), so 480 in the sequence.
		

Crossrefs

Numbers with a balanced factorization are A100959.
These factorizations are counted by A340599.
The twice-balanced version is A340657.
A001055 counts factorizations.
A045778 counts strict factorizations.
A316439 counts factorizations by product and length.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 lists Heinz numbers of balanced partitions.
- A340596 counts co-balanced factorizations.
- A340598 counts balanced set partitions.
- A340600 counts unlabeled balanced multiset partitions.
- A340653 counts balanced factorizations.
- A340654 counts cross-balanced factorizations.
- A340655 counts twice-balanced factorizations.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],Select[facs[#],Length[#]==Max[#]&]!={}&]

A174956 0 unless n is the k-th semiprime when a(n) = k.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 0, 3, 4, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 7, 8, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 11, 12, 13, 0, 0, 14, 15, 0, 0, 0, 0, 0, 0, 16, 0, 0, 17, 0, 18, 0, 0, 0, 19, 0, 20, 21, 0, 0, 0, 22, 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 0, 25, 0, 0, 26, 0, 0, 0, 0, 27, 0, 0, 28, 29, 30, 0, 0, 0, 31, 0, 32, 33
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 03 2010

Keywords

Comments

a(A001358(n)) = n; a(A100959(n)) = 0.

Crossrefs

Cf. A049084.

Programs

  • Haskell
    import Data.List (unfoldr)
    a174956 n = a174956_list !! (fromInteger n - 1)
    a174956_list = unfoldr x (1, 1, a001358_list) where
       x (i, z, ps'@(p:ps)) | i == p = Just (z, (i + 1, z + 1, ps))
                            | i /= p = Just (0, (i + 1, z, ps'))
    -- Reinhard Zumkeller, Oct 27 2012
    
  • Mathematica
    nn = 100; With[{tbl = Table[If[PrimeOmega[n] == 2, 1, 0], {n, nn}]},
    Table[If[tbl[[i]] == 0, 0, Total[Take[tbl, i]]], {i, nn}]] (* Harvey P. Dale, Oct 13 2012 *)
  • PARI
    first(n)=my(v=List(),u=vector(n)); forprime(p=2,n\2, forprime(q=2,min(p,n\p), listput(v,p*q))); v=Set(v); for(i=1,#v, u[v[i]]=i); u \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = A064911(n)*A072000(n).

A230595 Number of ways to write n as n = x*y, where x and y are primes, 1 <= x <= n, 1 <= y <= n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2
Offset: 1

Views

Author

Jaroslav Krizek, Oct 27 2013

Keywords

Comments

Dirichlet convolution of A010051(n) with itself, where A010051 = characteristic function of primes (A000040).
Dirichlet convolution of functions b(n) and c(n) is function a(n) = Sum_(d|n) b(d) * c(n/d).
a(n) = 0, 1 or 2. a(n) = 0 for numbers n from A100959 (non-semiprimes); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A006881 (product of two distinct primes).

Examples

			For n = 6: a(6) = Sum_(d|6) A010051(d) * A010051(6/d) = 0*0 + 1*1 + 1*1 + 1*0 = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Map[Times @@ Boole@ {PrimeQ@ #, PrimeQ[n/#]} &, FactorInteger[n][[All, 1]]], {n, 95}] (* Michael De Vlieger, Jul 29 2017 *)
  • PARI
    a(n)=sumdiv(n,d,isprime(d)*isprime(n/d)) \\ Ralf Stephan, Oct 30 2013
    
  • PARI
    a(n) = my(f=factor(f)); (vecsum(f[, 2])==2) * #f~ \\ David A. Corneth, Jul 28 2017
    
  • PARI
    first(n) = my(v = vector(n)); forprime(p = 2, sqrtint(n), v[p^2] = 1; forprime(q = p + 1, n \ p, v[p*q] = 2)); v \\ David A. Corneth, Jul 28 2017
    
  • Python
    from sympy import factorint
    def A230595(n): return 0 if sum(f:=factorint(n).values())!=2 else len(f) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = Sum_(d|n) A010051(d) * A010051(n/d).
Dirichlet g.f.: primezeta(s)^2. - Benedict W. J. Irwin, Jul 11 2018

A367096 Irregular triangle read by rows where row n lists the semiprime divisors of n. Alternatively, row n lists the semiprime divisors of A002808(n).

Original entry on oeis.org

4, 6, 4, 9, 10, 4, 6, 14, 15, 4, 6, 9, 4, 10, 21, 22, 4, 6, 25, 26, 9, 4, 14, 6, 10, 15, 4, 33, 34, 35, 4, 6, 9, 38, 39, 4, 10, 6, 14, 21, 4, 22, 9, 15, 46, 4, 6, 49, 10, 25, 51, 4, 26, 6, 9, 55, 4, 14, 57, 58, 4, 6, 10, 15, 62, 9, 21, 4, 65, 6, 22, 33, 4, 34
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2023

Keywords

Comments

On the first interpretation, the first three rows are empty. On the second, the first row is (4).

Examples

			The semiprime divisors of 30 are {6,10,15}, so row 30 is (6,10,15). Without empty rows, this is row 19.
Triangle begins (empty rows indicated by dots):
   1: .
   2: .
   3: .
   4: 4
   5: .
   6: 6
   7: .
   8: 4
   9: 9
  10: 10
  11: .
  12: 4,6
Without empty rows:
   1: 4
   2: 6
   3: 4
   4: 9
   5: 10
   6: 4,6
   7: 14
   8: 15
   9: 4
  10: 6,9
  11: 4,10
  12: 21
		

Crossrefs

For all divisors we have A027750.
Square terms are counted by A056170.
Row sums are A076290.
Squarefree terms are counted by A079275.
Row lengths are A086971, firsts A220264.
A000005 counts divisors.
A001222 counts prime factors (or prime indices), distinct A001221.
A001358 lists semiprimes, squarefree A006881, complement A100959.

Programs

  • Mathematica
    Table[Select[Divisors[n],PrimeOmega[#]==2&],{n,100}]
  • PARI
    row(n) = select(x -> bigomega(x) == 2, divisors(n)); \\ Amiram Eldar, May 02 2025

A367097 Least positive integer whose multiset of prime indices has exactly n distinct semi-sums.

Original entry on oeis.org

1, 4, 12, 30, 60, 210, 330, 660, 2730, 3570, 6270, 12540, 53130, 79170, 110670, 221340, 514140, 1799490, 2284590, 4196010, 6750870, 13501740, 37532220, 97350330, 131362770, 189620970, 379241940, 735844830, 1471689660
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
We define a semi-sum of a multiset to be any sum of a 2-element submultiset. This is different from sums of pairs of elements. For example, 2 is the sum of a pair of elements of {1}, but there are no semi-sums.
From David A. Corneth, Nov 15 2023: (Start)
Terms are cubefree.
bigomega(a(n)) = A001222(a(n)) >= A002024(n) + 1 = floor(sqrt(2n) + 1/2) + 1 for n > 0. (End)

Examples

			The prime indices of 60 are {1,1,2,3}, with four semi-sums {2,3,4,5}, and 60 is the first number whose prime indices have four semi-sums, so a(4) = 60.
The terms together with their prime indices begin:
       1: {}
       4: {1,1}
      12: {1,1,2}
      30: {1,2,3}
      60: {1,1,2,3}
     210: {1,2,3,4}
     330: {1,2,3,5}
     660: {1,1,2,3,5}
    2730: {1,2,3,4,6}
    3570: {1,2,3,4,7}
    6270: {1,2,3,5,8}
   12540: {1,1,2,3,5,8}
   53130: {1,2,3,4,5,9}
   79170: {1,2,3,4,6,10}
  110670: {1,2,3,4,7,11}
  221340: {1,1,2,3,4,7,11}
  514140: {1,1,2,3,5,8,13}
		

Crossrefs

The non-binary version is A259941, firsts of A299701.
These are the positions of first appearances in A366739.
A001222 counts prime factors (or prime indices), distinct A001221.
A001358 lists semiprimes, squarefree A006881, complement A100959.
A056239 adds up prime indices, row sums of A112798.
A299702 ranks knapsack partitions, counted by A108917.
A366738 counts semi-sums of partitions, strict A366741.
Semiprime divisors are listed by A367096 and have:
- square count: A056170
- sum: A076290
- squarefree count: A079275
- count: A086971
- firsts: A220264

Programs

  • Mathematica
    nn=1000;
    w=Table[Length[Union[Total/@Subsets[prix[n],{2}]]],{n,nn}];
    spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&];
    v=Table[Position[w,k][[1,1]],{k,0,spnm[w]}]
  • Python
    from itertools import count
    from sympy import factorint, primepi
    from sympy.utilities.iterables import multiset_combinations
    def A367097(n): return next(k for k in count(1) if len({sum(s) for s in multiset_combinations({primepi(i):j for i,j in factorint(k).items()},2)}) == n) # Chai Wah Wu, Nov 13 2023

Formula

2 | a(n) for n > 0. - David A. Corneth, Nov 13 2023

Extensions

a(17)-a(22) from Chai Wah Wu, Nov 13 2023
a(23)-a(28) from David A. Corneth, Nov 13 2023
Showing 1-10 of 33 results. Next