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

A359785 Dirichlet inverse of A320655, where A320655(n) is the number of factorizations of n into semiprimes.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 16 2023

Keywords

Crossrefs

Cf. A320655, A322353 (seems to give the absolute values), A359786.

Programs

  • PARI
    A320655(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((2==bigomega(d)&&(d<=m)), s += A320655(n/d, d))); (s));
    memoA359785 = Map();
    A359785(n) = if(1==n,1,my(v); if(mapisdefined(memoA359785,n,&v), v, v = -sumdiv(n,d,if(dA320655(n/d)*A359785(d),0)); mapput(memoA359785,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA320655(n/d) * a(d).

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

A001710 Order of alternating group A_n, or number of even permutations of n letters.

Original entry on oeis.org

1, 1, 1, 3, 12, 60, 360, 2520, 20160, 181440, 1814400, 19958400, 239500800, 3113510400, 43589145600, 653837184000, 10461394944000, 177843714048000, 3201186852864000, 60822550204416000, 1216451004088320000, 25545471085854720000, 562000363888803840000
Offset: 0

Views

Author

Keywords

Comments

For n >= 3, a(n-1) is also the number of ways that a 3-cycle in the symmetric group S_n can be written as a product of 2 long cycles (of length n). - Ahmed Fares (ahmedfares(AT)my-deja.com), Aug 14 2001
a(n) is the number of Hamiltonian circuit masks for an n X n adjacency matrix of an undirected graph. - Chad Brewbaker, Jan 31 2003
a(n-1) is the number of necklaces one can make with n distinct beads: n! bead permutations, divide by two to represent flipping the necklace over, divide by n to represent rotating the necklace. Related to Stirling numbers of the first kind, Stirling cycles. - Chad Brewbaker, Jan 31 2003
Number of increasing runs in all permutations of [n-1] (n>=2). Example: a(4)=12 because we have 12 increasing runs in all the permutations of [3] (shown in parentheses): (123), (13)(2), (3)(12), (2)(13), (23)(1), (3)(2)(1). - Emeric Deutsch, Aug 28 2004
Minimum permanent over all n X n (0,1)-matrices with exactly n/2 zeros. - Simone Severini, Oct 15 2004
The number of permutations of 1..n that have 2 following 1 for n >= 1 is 0, 1, 3, 12, 60, 360, 2520, 20160, ... . - Jon Perry, Sep 20 2008
Starting (1, 3, 12, 60, ...) = binomial transform of A000153: (1, 2, 7, 32, 181, ...). - Gary W. Adamson, Dec 25 2008
First column of A092582. - Mats Granvik, Feb 08 2009
The asymptotic expansion of the higher order exponential integral E(x,m=1,n=3) ~ exp(-x)/x*(1 - 3/x + 12/x^2 - 60/x^3 + 360/x^4 - 2520/x^5 + 20160/x^6 - 81440/x^7 + ...) leads to the sequence given above. See A163931 and A130534 for more information. - Johannes W. Meijer, Oct 20 2009
For n>1: a(n) = A173333(n,2). - Reinhard Zumkeller, Feb 19 2010
Starting (1, 3, 12, 60, ...) = eigensequence of triangle A002260, (a triangle with k terms of (1,2,3,...) in each row given k=1,2,3,...). Example: a(6) = 360, generated from (1, 2, 3, 4, 5) dot (1, 1, 3, 12, 60) = (1 + 2 + 9 + 48 + 300). - Gary W. Adamson, Aug 02 2010
For n>=2: a(n) is the number of connected 2-regular labeled graphs on (n+1) nodes (Cf. A001205). - Geoffrey Critzer, Feb 16 2011.
The Fi1 and Fi2 triangle sums of A094638 are given by the terms of this sequence (n>=1). For the definition of these triangle sums see A180662. - Johannes W. Meijer, Apr 20 2011
Also [1, 1] together with the row sums of triangle A162608. - Omar E. Pol, Mar 09 2012
a(n-1) is, for n>=2, also the number of necklaces with n beads (only C_n symmetry, no turnover) with n-1 distinct colors and signature c[.]^2 c[.]^(n-2). This means that two beads have the same color, and for n=2 the second factor is omitted. Say, cyclic(c[1]c[1]c[2]c[3]..c[n-1]), in short 1123...(n-1), taken cyclically. E.g., n=2: 11, n=3: 112, n=4: 1123, 1132, 1213, n=5: 11234, 11243, 11324, 11342, 11423, 11432, 12134, 12143, 13124, 13142, 14123, 14132. See the next-to-last entry in line n>=2 of the representative necklace partition array A212359. - Wolfdieter Lang, Jun 26 2012
For m >= 3, a(m-1) is the number of distinct Hamiltonian circuits in a complete simple graph with m vertices. See also A001286. - Stanislav Sykora, May 10 2014
In factorial base (A007623) these numbers have a simple pattern: 1, 1, 1, 11, 200, 2200, 30000, 330000, 4000000, 44000000, 500000000, 5500000000, 60000000000, 660000000000, 7000000000000, 77000000000000, 800000000000000, 8800000000000000, 90000000000000000, 990000000000000000, etc. See also the formula based on this observation, given below. - Antti Karttunen, Dec 19 2015
Also (by definition) the independence number of the n-transposition graph. - Eric W. Weisstein, May 21 2017
Number of permutations of n letters containing an even number of even cycles. - Michael Somos, Jul 11 2018
Equivalent to Brewbaker's and Sykora's comments, a(n - 1) is the number of undirected cycles covering n labeled vertices, hence the logarithmic transform of A002135. - Gus Wiseman, Oct 20 2018
For n >= 2 and a set of n distinct leaf labels, a(n) is the number of binary, rooted, leaf-labeled tree topologies that have a caterpillar shape (column k=1 of A306364). - Noah A Rosenberg, Feb 11 2019
Also the clique covering number of the n-Bruhat graph. - Eric W. Weisstein, Apr 19 2019
a(n) is the number of lattices of the form [s,w] in the weak order on S_n, for a fixed simple reflection s. - Bridget Tenner, Jan 16 2020
For n > 3, a(n) = p_1^e_1*...*p_m^e_m, where p_1 = 2 and e_m = 1. There exists p_1^x where x <= e_1 such that p_1^x*p_m^e_m is a primitive Zumkeller number (A180332) and p_1^e_1*p_m^e_m is a Zumkeller number (A083207). Therefore, for n > 3, a(n) = p_1^e_1*p_m^e_m*r, where r is relatively prime to p_1*p_m, is also a Zumkeller number. - Ivan N. Ianakiev, Mar 11 2020
For n>1, a(n) is the number of permutations of [n] that have 1 and 2 as cycle-mates, that is, 1 and 2 are contained in the same cycle of a cyclic representation of permutations of [n]. For example, a(4) counts the 12 permutations with 1 and 2 as cycle-mates, namely, (1 2 3 4), (1 2 4 3), (1 3 2 4), (1 3 4 2), (1 4 2 3), (1 4 3 2), (1 2 3) (4), (1 3 2) (4), (1 2 4 )(3), (1 4 2)(3), (1 2)(3 4), and (1 2)(3)(4). Since a(n+2)=row sums of A162608, our result readily follows. - Dennis P. Walsh, May 28 2020

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 12*x^4 + 60*x^5 + 360*x^6 + 2520*x^7 + ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 87-8, 20. (a), c_n^e(t=1).
  • 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).

Crossrefs

a(n+1)= A046089(n, 1), n >= 1 (first column of triangle), A161739 (q(n) sequence).
Bisections are A002674 and A085990 (essentially).
Row 3 of A265609 (essentially).
Row sums of A307429.

Programs

  • Magma
    [1] cat [Order(AlternatingGroup(n)): n in [1..20]]; // Arkadiusz Wesolowski, May 17 2014
    
  • Maple
    seq(mul(k, k=3..n), n=0..20); # Zerinvary Lajos, Sep 14 2007
  • Mathematica
    a[n_]:= If[n > 2, n!/2, 1]; Array[a, 21, 0]
    a[n_]:= If[n<3, 1, n*a[n-1]]; Array[a, 21, 0]; (* Robert G. Wilson v, Apr 16 2011 *)
    a[ n_]:= If[n<0, 0, n! SeriesCoefficient[(2-x^2)/(2-2x), {x, 0, n}]]; (* Michael Somos, May 22 2014 *)
    a[ n_]:= If[n<0, 0, n! SeriesCoefficient[1 +Sinh[-Log[1-x]], {x, 0, n}]]; (* Michael Somos, May 22 2014 *)
    Numerator[Range[0, 20]!/2] (* Eric W. Weisstein, May 21 2017 *)
    Table[GroupOrder[AlternatingGroup[n]], {n, 0, 20}] (* Eric W. Weisstein, May 21 2017 *)
  • PARI
    {a(n) = if( n<2, n>=0, n!/2)};
    
  • PARI
    a(n)=polcoeff(1+x*sum(m=0,n,m^m*x^m/(1+m*x+x*O(x^n))^m),n) \\ Paul D. Hanna
    
  • PARI
    A001710=n->n!\2+(n<2) \\ M. F. Hasler, Dec 01 2013
    
  • Python
    from math import factorial
    def A001710(n): return factorial(n)>>1 if n > 1 else 1 # Chai Wah Wu, Feb 14 2023
    
  • SageMath
    def A001710(n): return (factorial(n) +int(n<2))//2
    [A001710(n) for n in range(31)] # G. C. Greubel, Sep 28 2024
  • Scheme
    ;; Using memoization-macro definec for which an implementation can be found in http://oeis.org/wiki/Memoization
    (definec (A001710 n) (cond ((<= n 2) 1) (else (* n (A001710 (- n 1))))))
    ;; Antti Karttunen, Dec 19 2015
    

Formula

a(n) = numerator(n!/2) and A141044(n) = denominator(n!/2).
D-finite with recurrence: a(0) = a(1) = a(2) = 1; a(n) = n*a(n-1) for n>2. - Chad Brewbaker, Jan 31 2003 [Corrected by N. J. A. Sloane, Jul 25 2008]
a(0) = 0, a(1) = 1; a(n) = Sum_{k=1..n-1} k*a(k). - Amarnath Murthy, Oct 29 2002
Stirling transform of a(n+1) = [1, 3, 12, 160, ...] is A083410(n) = [1, 4, 22, 154, ...]. - Michael Somos, Mar 04 2004
First Eulerian transform of A000027. See A000142 for definition of FET. - Ross La Haye, Feb 14 2005
From Paul Barry, Apr 18 2005: (Start)
a(n) = 0^n + Sum_{k=0..n} (-1)^(n-k-1)*T(n-1, k)*cos(Pi*(n-k-1)/2)^2.
T(n,k) = abs(A008276(n, k)). (End)
E.g.f.: (2 - x^2)/(2 - 2*x).
E.g.f. of a(n+2), n>=0, is 1/(1-x)^3.
E.g.f.: 1 + sinh(log(1/(1-x))). - Geoffrey Critzer, Dec 12 2010
a(n+1) = (-1)^n * A136656(n,1), n>=1.
a(n) = n!/2 for n>=2 (proof from the e.g.f). - Wolfdieter Lang, Apr 30 2010
a(n) = (n-2)! * t(n-1), n>1, where t(n) is the n-th triangular number (A000217). - Gary Detlefs, May 21 2010
a(n) = ( A000254(n) - 2* A001711(n-3) )/3, n>2. - Gary Detlefs, May 24 2010
O.g.f.: 1 + x*Sum_{n>=0} n^n*x^n/(1 + n*x)^n. - Paul D. Hanna, Sep 13 2011
a(n) = if n < 2 then 1, otherwise Pochhammer(n,n)/binomial(2*n,n). - Peter Luschny, Nov 07 2011
a(n) = Sum_{k=0..floor(n/2)} s(n,n-2*k) where s(n,k) are Stirling number of the first kind, A048994. - Mircea Merca, Apr 07 2012
a(n-1), n>=3, is M_1([2,1^(n-2)])/n = (n-1)!/2, with the M_1 multinomial numbers for the given n-1 part partition of n. See the second to last entry in line n>=3 of A036038, and the above necklace comment by W. Lang. - Wolfdieter Lang, Jun 26 2012
G.f.: A(x) = 1 + x + x^2/(G(0)-2*x) where G(k) = 1 - (k+1)*x/(1 - x*(k+3)/G(k+1)); (continued fraction). - Sergei N. Gladkovskii, Dec 26 2012.
G.f.: 1 + x + (Q(0)-1)*x^2/(2*(sqrt(x)+x)), where Q(k) = 1 + (k+2)*sqrt(x)/(1 - sqrt(x)/(sqrt(x) + 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 15 2013
G.f.: 1 + x + (x*Q(x)-x^2)/(2*(sqrt(x)+x)), where Q(x) = Sum_{n>=0} (n+1)!*x^n*sqrt(x)*(sqrt(x) + x*(n+2)). - Sergei N. Gladkovskii, May 15 2013
G.f.: 1 + x/2 + (Q(0)-1)*x/(2*(sqrt(x)+x)), where Q(k) = 1 + (k+1)*sqrt(x)/(1 - sqrt(x)/(sqrt(x) + 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 15 2013
G.f.: 1 + x + x^2*G(0)/2, where G(k) = 1 + 1/(1 - x/(x + 1/(k+3)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
G.f.: 1+x + x^2*W(0), where W(k) = 1 - x*(k+3)/( x*(k+3) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 26 2013
From Antti Karttunen, Dec 19 2015: (Start)
a(0)=a(1)=1; after which, for even n: a(n) = (n/2) * (n-1)!, and for odd n: a(n) = (n-1)/2 * ((n-1)! + (n-2)!). [The formula was empirically found after viewing these numbers in factorial base, A007623, and is easily proved by considering formulas from Lang (Apr 30 2010) and Detlefs (May 21 2010) shown above.]
For n >= 1, a(2*n+1) = a(2*n) + A153880(a(2*n)). [Follows from above.] (End)
Inverse Stirling transform of a(n) is (-1)^(n-1)*A009566(n). - Anton Zakharov, Aug 07 2016
a(n) ~ sqrt(Pi/2)*n^(n+1/2)/exp(n). - Ilya Gutkovskiy, Aug 07 2016
a(n) = A006595(n-1)*n/A000124(n) for n>=2. - Anton Zakharov, Aug 23 2016
a(n) = A001563(n-1) - A001286(n-1) for n>=2. - Anton Zakharov, Sep 23 2016
From Peter Bala, May 24 2017: (Start)
The o.g.f. A(x) satisfies the Riccati equation x^2*A'(x) + (x - 1)*A(x) + 1 - x^2 = 0.
G.f.: A(x) = 1 + x + x^2/(1 - 3*x/(1 - x/(1 - 4*x/(1 - 2*x/(1 - 5*x/(1 - 3*x/(1 - ... - (n + 2)*x/(1 - n*x/(1 - ... ))))))))) (apply Stokes, 1982).
A(x) = 1 + x + x^2/(1 - 2*x - x/(1 - 3*x/(1 - 2*x/(1 - 4*x/(1 - 3*x/(1 - 5*x/(1 - ... - n*x/(1 - (n+2)*x/(1 - ... ))))))))). (End)
H(x) = (1 - (1 + x)^(-2)) / 2 = x - 3*x^2/2! + 12*x^3/3! - ..., an e.g.f. for the signed sequence here (n!/2!), ignoring the first two terms, is the compositional inverse of G(x) = (1 - 2*x)^(-1/2) - 1 = x + 3*x^2/2! + 15*x^3/3! + ..., an e.g.f. for A001147. Cf. A094638. H(x) is the e.g.f. for the sequence (-1)^m * m!/2 for m = 2,3,4,... . Cf. A001715 for n!/3! and A001720 for n!/4!. Cf. columns of A094587, A173333, and A213936 and rows of A138533. - Tom Copeland, Dec 27 2019
From Amiram Eldar, Jan 08 2023: (Start)
Sum_{n>=0} 1/a(n) = 2*(e-1).
Sum_{n>=0} (-1)^n/a(n) = 2/e. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Aug 20 2001
Further terms from Simone Severini, Oct 15 2004

A339846 Number of even-length factorizations of n into factors > 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 3, 0, 2, 0, 2, 1, 1, 0, 4, 1, 1, 1, 2, 0, 3, 0, 3, 1, 1, 1, 5, 0, 1, 1, 4, 0, 3, 0, 2, 2, 1, 0, 6, 1, 2, 1, 2, 0, 4, 1, 4, 1, 1, 0, 6, 0, 1, 2, 6, 1, 3, 0, 2, 1, 3, 0, 8, 0, 1, 2, 2, 1, 3, 0, 6, 3, 1, 0, 6, 1, 1, 1, 4, 0, 6, 1, 2, 1, 1, 1, 10, 0, 2, 2, 5, 0, 3, 0, 4, 3
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

			The a(n) factorizations for n = 12, 16, 24, 36, 48, 72, 96, 120:
  2*6  2*8      3*8      4*9      6*8      8*9      2*48         2*60
  3*4  4*4      4*6      6*6      2*24     2*36     3*32         3*40
       2*2*2*2  2*12     2*18     3*16     3*24     4*24         4*30
                2*2*2*3  3*12     4*12     4*18     6*16         5*24
                         2*2*3*3  2*2*2*6  6*12     8*12         6*20
                                  2*2*3*4  2*2*2*9  2*2*3*8      8*15
                                           2*2*3*6  2*2*4*6      10*12
                                           2*3*3*4  2*3*4*4      2*2*5*6
                                                    2*2*2*12     2*3*4*5
                                                    2*2*2*2*2*3  2*2*2*15
                                                                 2*2*3*10
		

Crossrefs

The case of set partitions (or n squarefree) is A024430.
The case of partitions (or prime powers) is A027187.
The ordered version is A174725, odd: A174726.
The odd-length factorizations are counted by A339890.
A001055 counts factorizations, with strict case A045778.
A001358 lists semiprimes, with squarefree case A006881.
A027187 counts partitions of even length, ranked by A028260.
A058696 counts partitions of even numbers, ranked by A300061.
A316439 counts factorizations by product and length.
A340102 counts odd-length factorizations into odd factors.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n=1, 1, g(n$2, 0)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 30 2020
  • 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],EvenQ@Length[#]&]],{n,100}]
  • PARI
    A339846(n, m=n, e=1) = if(1==n, e, sumdiv(n, d, if((d>1)&&(d<=m), A339846(n/d, d, 1-e)))); \\ Antti Karttunen, Oct 22 2023

Formula

a(n) + A339890(n) = A001055(n).

Extensions

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

A320656 Number of factorizations of n into squarefree semiprimes. Number of multiset partitions of the multiset of prime factors of n, into strict pairs.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 18 2018

Keywords

Examples

			The a(4620) = 6 factorizations into squarefree semiprimes:
  4620 = (6*10*77)
  4620 = (6*14*55)
  4620 = (6*22*35)
  4620 = (10*14*33)
  4620 = (10*21*22)
  4620 = (14*15*22)
The a(4620) = 6 multiset partitions into strict pairs:
  {{1,2},{1,3},{4,5}}
  {{1,2},{1,4},{3,5}}
  {{1,2},{1,5},{3,4}}
  {{1,3},{1,4},{2,5}}
  {{1,3},{2,4},{1,5}}
  {{1,4},{2,3},{1,5}}
The a(69300) = 10 factorizations into squarefree semiprimes:
  69300 = (6*6*35*55)
  69300 = (6*10*15*77)
  69300 = (6*10*21*55)
  69300 = (6*10*33*35)
  69300 = (6*14*15*55)
  69300 = (6*15*22*35)
  69300 = (10*10*21*33)
  69300 = (10*14*15*33)
  69300 = (10*15*21*22)
  69300 = (14*15*15*22)
The a(69300) = 10 multiset partitions into strict pairs:
  {{1,2},{1,2},{3,4},{3,5}}
  {{1,2},{1,3},{2,3},{4,5}}
  {{1,2},{1,3},{2,4},{3,5}}
  {{1,2},{1,3},{2,5},{3,4}}
  {{1,2},{1,4},{2,3},{3,5}}
  {{1,2},{2,3},{1,5},{3,4}}
  {{1,3},{1,3},{2,4},{2,5}}
  {{1,3},{1,4},{2,3},{2,5}}
  {{1,3},{2,3},{2,4},{1,5}}
  {{1,4},{2,3},{2,3},{1,5}}.
The a(210) = 3 factorizations into squarefree semiprimes: 210 = (6*35) = (10*21) = (14*15). - _Antti Karttunen_, Nov 02 2022
		

Crossrefs

Programs

  • Mathematica
    bepfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[bepfacs[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],SquareFreeQ[#]&&PrimeOmega[#]==2&]}]];
    Table[Length[bepfacs[n]],{n,100}]
  • PARI
    A320656(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((d>1)&&(d<=m)&&issquarefree(d)&&2==bigomega(d), s += A320656(n/d, d))); (s)); \\ Antti Karttunen, Nov 02 2022

Formula

a(A002110(n)) = A123023(n). - Antti Karttunen, Nov 02 2022

Extensions

Data section extended up to a(120) and the secondary offset added by Antti Karttunen, Nov 02 2022

A320911 Numbers with an even number of prime factors (counted with multiplicity) that can be factored into squarefree semiprimes.

Original entry on oeis.org

1, 6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 36, 38, 39, 46, 51, 55, 57, 58, 60, 62, 65, 69, 74, 77, 82, 84, 85, 86, 87, 90, 91, 93, 94, 95, 100, 106, 111, 115, 118, 119, 122, 123, 126, 129, 132, 133, 134, 140, 141, 142, 143, 145, 146, 150, 155, 156, 158, 159
Offset: 1

Views

Author

Gus Wiseman, Oct 23 2018

Keywords

Comments

A squarefree semiprime (A006881) is a product of any two distinct primes.
Also numbers with an even number x of prime factors, whose prime multiplicities do not exceed x/2.

Examples

			360 is in the sequence because it can be factored into squarefree semiprimes as (6*6*10).
4620 is in the sequence, and can be factored into squarefree semiprimes in 6 ways: (6*10*77), (6*14*55), (6*22*35), (10*14*33), (10*21*22), (14*15*22).
		

Crossrefs

Programs

  • Mathematica
    sqfsemfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[sqfsemfacs[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],And[SquareFreeQ[#],PrimeOmega[#]==2]&]}]];
    Select[Range[100],And[EvenQ[PrimeOmega[#]],sqfsemfacs[#]!={}]&]

A065043 Characteristic function of the numbers with an even number of prime factors (counted with multiplicity): a(n) = 1 if n = A028260(k) for some k then 1 else 0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 05 2001

Keywords

Crossrefs

Characteristic function of A028260 (positions of 1's). Cf. also A026424 (positions of 0's) and A320655.
One less than A007421.
Cf. also A066829, A353374.

Programs

  • Maple
    A065043 := proc(n)
        if type(numtheory[bigomega](n),'even') then
            1;
        else
            0;
        end if;
    end proc: # R. J. Mathar, Jun 26 2013
  • Mathematica
    Table[(LiouvilleLambda[n]+1)/2,{n,1,20}] (* Enrique Pérez Herrero, Jul 07 2012 *)
  • PARI
    { for (n=1, 1000, a=1 - bigomega(n)%2; write("b065043.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 04 2009
    
  • PARI
    A065043(n) = (1 - (bigomega(n)%2)); \\ Antti Karttunen, Apr 19 2022
    
  • Python
    from operator import ixor
    from functools import reduce
    from sympy import factorint
    def A065043(n): return (reduce(ixor, factorint(n).values(),0)&1)^1 # Chai Wah Wu, Jan 01 2023

Formula

a(n) = 1 - A001222(n) mod 2.
a(n) = A007421(n) - 1.
a(n) = 1 - A066829(n).
a(A028260(k)) = 1 and a(A026424(k)) = 0 for all k.
Dirichlet g.f.: (zeta(s)^2 + zeta(2*s))/(2*zeta(s)). - Enrique Pérez Herrero, Jul 06 2012
a(n) = (A008836(n) + 1)/2. - Enrique Pérez Herrero, Jul 07 2012
a(n) = A001222(2n) mod 2. - Wesley Ivan Hurt, Jun 22 2013
G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^2)/(1 - x^n). - Ilya Gutkovskiy, Apr 25 2017
From Antti Karttunen, Dec 01 2022: (Start)
For x, y >= 1, a(x*y) = 1 - abs(a(x)-a(y)).
a(n) = a(A046523(n)) = A356163(A003961(n)).
a(n) = A000035(A356163(n)+A347102(n)).
a(n) = A010052(n) + A353669(n).
a(n) = A353555(n) + A353557(n).
a(n) = A358750(n) + A358752(n).
a(n) = A353374(n) + A358775(n).
a(n) >= A356170(n).
(End)

Extensions

Corrected by Charles R Greathouse IV, Sep 02 2009

A338898 Concatenated sequence of prime indices of semiprimes (A001358).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 1, 3, 1, 4, 2, 3, 2, 4, 1, 5, 3, 3, 1, 6, 2, 5, 1, 7, 3, 4, 1, 8, 2, 6, 1, 9, 4, 4, 2, 7, 3, 5, 2, 8, 1, 10, 1, 11, 3, 6, 2, 9, 1, 12, 4, 5, 1, 13, 3, 7, 1, 14, 2, 10, 4, 6, 2, 11, 1, 15, 3, 8, 1, 16, 2, 12, 3, 9, 1, 17, 4, 7, 5, 5, 1, 18, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 15 2020

Keywords

Comments

This is a triangle with two columns and weakly increasing rows, namely {A338912(n), A338913(n)}.
A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of semiprimes together with their prime indices begins:
      4: {1,1}     46: {1,9}      91: {4,6}     141: {2,15}
      6: {1,2}     49: {4,4}      93: {2,11}    142: {1,20}
      9: {2,2}     51: {2,7}      94: {1,15}    143: {5,6}
     10: {1,3}     55: {3,5}      95: {3,8}     145: {3,10}
     14: {1,4}     57: {2,8}     106: {1,16}    146: {1,21}
     15: {2,3}     58: {1,10}    111: {2,12}    155: {3,11}
     21: {2,4}     62: {1,11}    115: {3,9}     158: {1,22}
     22: {1,5}     65: {3,6}     118: {1,17}    159: {2,16}
     25: {3,3}     69: {2,9}     119: {4,7}     161: {4,9}
     26: {1,6}     74: {1,12}    121: {5,5}     166: {1,23}
     33: {2,5}     77: {4,5}     122: {1,18}    169: {6,6}
     34: {1,7}     82: {1,13}    123: {2,13}    177: {2,17}
     35: {3,4}     85: {3,7}     129: {2,14}    178: {1,24}
     38: {1,8}     86: {1,14}    133: {4,8}     183: {2,18}
     39: {2,6}     87: {2,10}    134: {1,19}    185: {3,12}
		

Crossrefs

A112798 restricted to rows of length 2 gives this triangle.
A115392 is the row number for the first appearance of each positive integer.
A176506 gives row differences.
A338899 is the squarefree version.
A338912 is column 1.
A338913 is column 2.
A001221 counts a number's distinct prime indices.
A001222 counts a number's prime indices.
A001358 lists semiprimes.
A004526 counts 2-part partitions.
A006881 lists squarefree semiprimes.
A037143 lists primes and semiprimes.
A046315 and A100484 list odd and even semiprimes.
A046388 and A100484 list odd and even squarefree semiprimes.
A065516 gives first differences of semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A270650 and A270652 give the prime indices of squarefree semiprimes.
A320655 counts factorizations into semiprimes.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Join@@primeMS/@Select[Range[100],PrimeOmega[#]==2&]

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

A320892 Numbers with an even number of prime factors (counted with multiplicity) that cannot be factored into distinct semiprimes.

Original entry on oeis.org

16, 64, 81, 96, 144, 160, 224, 256, 324, 352, 384, 400, 416, 486, 544, 576, 608, 625, 640, 729, 736, 784, 864, 896, 928, 960, 992, 1024, 1184, 1215, 1296, 1312, 1344, 1376, 1408, 1440, 1504, 1536, 1600, 1664, 1696, 1701, 1888, 1936, 1944, 1952, 2016, 2025
Offset: 1

Views

Author

Gus Wiseman, Oct 23 2018

Keywords

Comments

A semiprime (A001358) is a product of any two not necessarily distinct primes.
If A025487(k) is in the sequence then so is every number with the same prime signature. - David A. Corneth, Oct 23 2018
Numbers for which A001222(n) is even and A322353(n) is zero. - Antti Karttunen, Dec 06 2018

Examples

			A complete list of all factorizations of 1296 into semiprimes is:
  1296 = (4*4*9*9)
  1296 = (4*6*6*9)
  1296 = (6*6*6*6)
None of these is strict, so 1296 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    strsemfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[strsemfacs[n/d],Min@@#>d&]],{d,Select[Rest[Divisors[n]],PrimeOmega[#]==2&]}]];
    Select[Range[1000],And[EvenQ[PrimeOmega[#]],strsemfacs[#]=={}]&]
  • PARI
    A322353(n, m=n, facs=List([])) = if(1==n, my(u=apply(bigomega,Vec(facs))); (0==length(u)||(2==vecmin(u)&&2==vecmax(u))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A322353(n/d, d-1, newfacs))); (s));
    isA300892(n) = if(bigomega(n)%2,0,(0==A322353(n))); \\ Antti Karttunen, Dec 06 2018
Showing 1-10 of 63 results. Next