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.

Previous Showing 11-20 of 250 results. Next

A008480 Number of ordered prime factorizations of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 2, 2, 1, 4, 1, 2, 1, 3, 1, 6, 1, 1, 2, 2, 2, 6, 1, 2, 2, 4, 1, 6, 1, 3, 3, 2, 1, 5, 1, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 12, 1, 2, 3, 1, 2, 6, 1, 3, 2, 6, 1, 10, 1, 2, 3, 3, 2, 6, 1, 5, 1, 2, 1, 12, 2, 2, 2, 4, 1, 12, 2, 3, 2, 2, 2, 6, 1, 3, 3, 6, 1
Offset: 1

Views

Author

Keywords

Comments

a(n) depends only on the prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3,1).
Multinomial coefficients in prime factorization order. - Max Alekseyev, Nov 07 2006
The Dirichlet inverse is given by A080339, negating all but the A080339(1) element in A080339. - R. J. Mathar, Jul 15 2010
Number of (distinct) permutations of the multiset of prime factors. - Joerg Arndt, Feb 17 2015
Number of not divisible chains in the divisor lattice of n. - Peter Luschny, Jun 15 2013

References

  • A. Knopfmacher, J. Knopfmacher, and R. Warlimont, "Ordered factorizations for integers and arithmetical semigroups", in Advances in Number Theory, (Proc. 3rd Conf. Canadian Number Theory Assoc., 1991), Clarendon Press, Oxford, 1993, pp. 151-165.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 292-295.

Crossrefs

Cf. A124010, record values and where they occur: A260987, A260633.
Absolute values of A355939.

Programs

  • Haskell
    a008480 n = foldl div (a000142 $ sum es) (map a000142 es)
                where es = a124010_row n
    -- Reinhard Zumkeller, Nov 18 2015
    
  • Maple
    a:= n-> (l-> add(i, i=l)!/mul(i!, i=l))(map(i-> i[2], ifactors(n)[2])):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 26 2018
  • Mathematica
    Prepend[ Array[ Multinomial @@ Last[ Transpose[ FactorInteger[ # ] ] ]&, 100, 2 ], 1 ]
    (* Second program: *)
    a[n_] := With[{ee = FactorInteger[n][[All, 2]]}, Total[ee]!/Times @@ (ee!)]; Array[a, 101] (* Jean-François Alcover, Sep 15 2019 *)
  • PARI
    a(n)={my(sig=factor(n)[,2]); vecsum(sig)!/vecprod(apply(k->k!, sig))} \\ Andrew Howroyd, Nov 17 2018
    
  • Python
    from math import prod, factorial
    from sympy import factorint
    def A008480(n): return factorial(sum(f:=factorint(n).values()))//prod(map(factorial,f)) # Chai Wah Wu, Aug 05 2023
  • Sage
    def A008480(n):
        S = [s[1] for s in factor(n)]
        return factorial(sum(S)) // prod(factorial(s) for s in S)
    [A008480(n) for n in (1..101)]  # Peter Luschny, Jun 15 2013
    

Formula

If n = Product (p_j^k_j) then a(n) = ( Sum (k_j) )! / Product (k_j !).
Dirichlet g.f.: 1/(1-B(s)) where B(s) is D.g.f. of characteristic function of primes.
a(p^k) = 1 if p is a prime.
a(A002110(n)) = A000142(n) = n!.
a(n) = A050382(A101296(n)). - R. J. Mathar, May 26 2017
a(n) = 1 <=> n in { A000961 }. - Alois P. Heinz, May 26 2018
G.f. A(x) satisfies: A(x) = x + A(x^2) + A(x^3) + A(x^5) + ... + A(x^prime(k)) + ... - Ilya Gutkovskiy, May 10 2019
a(n) = C(k, n) for k = A001222(n) where C(k, n) is defined as the k-fold Dirichlet convolution of A001221(n) with itself, and where C(0, n) is the multiplicative identity with respect to Dirichlet convolution.
The average order of a(n) is asymptotic (up to an absolute constant) to 2A sqrt(2*Pi) log(n) / sqrt(log(log(n))) for some absolute constant A > 0. - Maxie D. Schmidt, May 28 2021
The sums of a(n) for n <= x and k >= 1 such that A001222(n)=k have asymptotic order of the form x*(log(log(x)))^(k+1/2) / ((2k+1) * (k-1)!). - Maxie D. Schmidt, Feb 12 2021
Other DGFs include: (1+P(s))^(-1) in terms of the prime zeta function for Re(s) > 1 where the + version weights the sequence by A008836(n), see the reference by Fröberg on P(s). - Maxie D. Schmidt, Feb 12 2021
The bivariate DGF (1+zP(s))^(-1) has coefficients a(n) / n^s (-1)^(A001221(n)) z^(A001222(n)) for Re(s) > 1 and 0 < |z| < 2 - Maxie D. Schmidt, Feb 12 2021
The distribution of the distinct values of the sequence for n<=x as x->infinity satisfy a CLT-type Erdős-Kac theorem analog proved by M. D. Schmidt, 2021. - Maxie D. Schmidt, Feb 12 2021
a(n) = abs(A355939(n)). - Antti Karttunen and Vaclav Kotesovec, Jul 22 2022
a(n) = A130675(n)/A112624(n). - Amiram Eldar, Mar 08 2024

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 17 2007

A007304 Sphenic numbers: products of 3 distinct primes.

Original entry on oeis.org

30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 345, 354, 357, 366, 370, 374, 385, 399, 402, 406, 410, 418, 426, 429, 430, 434, 435, 438
Offset: 1

Views

Author

Keywords

Comments

Note the distinctions between this and "n has exactly three prime factors" (A014612) or "n has exactly three distinct prime factors." (A033992). The word "sphenic" also means "shaped like a wedge" [American Heritage Dictionary] as in dentation with "sphenic molars." - Jonathan Vos Post, Sep 11 2005
Also the volume of a sphenic brick. A sphenic brick is a rectangular parallelepiped whose sides are components of a sphenic number, namely whose sides are three distinct primes. Example: The distinct prime triple (3,5,7) produces a 3x5x7 unit brick which has volume 105 cubic units. 3-D analog of 2-D A037074 Product of twin primes, per Cino Hilliard's comment. Compare with 3-D A107768 Golden 3-almost primes = Volumes of bricks (rectangular parallelepipeds) each of whose faces has golden semiprime area. - Jonathan Vos Post, Jan 08 2007
Sum(n>=1, 1/a(n)^s) = (1/6)*(P(s)^3 - P(3*s) - 3*(P(s)*P(2*s)-P(3*s))), where P is prime zeta function. - Enrique Pérez Herrero, Jun 28 2012
Also numbers n with A001222(n)=3 and A001221(n)=3. - Enrique Pérez Herrero, Jun 28 2012
n = 265550 is the smallest n with a(n) (=1279789) < A006881(n) (=1279793). - Peter Dolland, Apr 11 2020

Examples

			From _Gus Wiseman_, Nov 05 2020: (Start)
Also Heinz numbers of strict integer partitions into three parts, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). These partitions are counted by A001399(n-6) = A069905(n-3), with ordered version A001399(n-6)*6. The sequence of terms together with their prime indices begins:
     30: {1,2,3}     182: {1,4,6}     286: {1,5,6}
     42: {1,2,4}     186: {1,2,11}    290: {1,3,10}
     66: {1,2,5}     190: {1,3,8}     310: {1,3,11}
     70: {1,3,4}     195: {2,3,6}     318: {1,2,16}
     78: {1,2,6}     222: {1,2,12}    322: {1,4,9}
    102: {1,2,7}     230: {1,3,9}     345: {2,3,9}
    105: {2,3,4}     231: {2,4,5}     354: {1,2,17}
    110: {1,3,5}     238: {1,4,7}     357: {2,4,7}
    114: {1,2,8}     246: {1,2,13}    366: {1,2,18}
    130: {1,3,6}     255: {2,3,7}     370: {1,3,12}
    138: {1,2,9}     258: {1,2,14}    374: {1,5,7}
    154: {1,4,5}     266: {1,4,8}     385: {3,4,5}
    165: {2,3,5}     273: {2,4,6}     399: {2,4,8}
    170: {1,3,7}     282: {1,2,15}    402: {1,2,19}
    174: {1,2,10}    285: {2,3,8}     406: {1,4,10}
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • "Sphenic", The American Heritage Dictionary of the English Language, Fourth Edition, Houghton Mifflin Company, 2000.

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A162143 (a(n)^2).
For the following, NNS means "not necessarily strict".
A014612 is the NNS version.
A046389 is the restriction to odds (NNS: A046316).
A075819 is the restriction to evens (NNS: A075818).
A239656 gives first differences.
A285508 lists terms of A014612 that are not squarefree.
A307534 is the case where all prime indices are odd (NNS: A338471).
A337453 is a different ranking of ordered triples (NNS: A014311).
A338557 is the case where all prime indices are even (NNS: A338556).
A001399(n-6) counts strict 3-part partitions (NNS: A001399(n-3)).
A005117 lists squarefree numbers.
A008289 counts strict partitions by sum and length.
A220377 counts 3-part pairwise coprime strict partitions (NNS: A307719).

Programs

  • Haskell
    a007304 n = a007304_list !! (n-1)
    a007304_list = filter f [1..] where
    f u = p < q && q < w && a010051 w == 1 where
    p = a020639 u; v = div u p; q = a020639 v; w = div v q
    -- Reinhard Zumkeller, Mar 23 2014
    
  • Maple
    with(numtheory): a:=proc(n) if bigomega(n)=3 and nops(factorset(n))=3 then n else fi end: seq(a(n),n=1..450); # Emeric Deutsch
    A007304 := proc(n)
        option remember;
        local a;
        if n =1 then
            30;
        else
            for a from procname(n-1)+1 do
                if bigomega(a)=3 and nops(factorset(a))=3 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Dec 06 2016
    is_a := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 3 and n = mul(P) end:
    A007304List := upto -> select(is_a, [seq(1..upto)]):  # Peter Luschny, Apr 14 2025
  • Mathematica
    Union[Flatten[Table[Prime[n]*Prime[m]*Prime[k], {k, 20}, {n, k+1, 20}, {m, n+1, 20}]]]
    Take[ Sort@ Flatten@ Table[ Prime@i Prime@j Prime@k, {i, 3, 21}, {j, 2, i - 1}, {k, j - 1}], 53] (* Robert G. Wilson v *)
    With[{upto=500},Sort[Select[Times@@@Subsets[Prime[Range[Ceiling[upto/6]]],{3}],#<=upto&]]] (* Harvey P. Dale, Jan 08 2015 *)
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==3&] (* Gus Wiseman, Nov 05 2020 *)
  • PARI
    for(n=1,1e4,if(bigomega(n)==3 && omega(n)==3,print1(n", "))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,(lim)^(1/3),forprime(q=p+1,sqrt(lim\p),t=p*q;forprime(r=q+1,lim\t,listput(v,t*r))));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrtnint(lim\=1,3), forprime(q=p+1, sqrtint(lim\p), t=p*q; forprime(r=q+1, lim\t, listput(v, t*r)))); Set(v) \\ Charles R Greathouse IV, Jan 21 2025
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A007304(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024
    
  • SageMath
    def is_a(n):
        P = prime_divisors(n)
        return len(P) == 3 and prod(P) == n
    print([n for n in range(1, 439) if is_a(n)]) # Peter Luschny, Apr 14 2025

Formula

A008683(a(n)) = -1.
A000005(a(n)) = 8. - R. J. Mathar, Aug 14 2009
A002033(a(n)-1) = 13. - Juri-Stepan Gerasimov, Oct 07 2009, R. J. Mathar, Oct 14 2009
A178254(a(n)) = 36. - Reinhard Zumkeller, May 24 2010
A050326(a(n)) = 5, subsequence of A225228. - Reinhard Zumkeller, May 03 2013
a(n) ~ 2n log n/(log log n)^2. - Charles R Greathouse IV, Sep 14 2015

Extensions

More terms from Robert G. Wilson v, Jan 04 2006
Comment concerning number of divisors corrected by R. J. Mathar, Aug 14 2009

A003238 Number of rooted trees with n vertices in which vertices at the same level have the same degree.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 27, 40, 41, 53, 61, 77, 78, 104, 105, 134, 147, 175, 176, 227, 233, 275, 294, 350, 351, 438, 439, 516, 545, 624, 640, 774, 775, 881, 924, 1069, 1070, 1265, 1266, 1444, 1521, 1698, 1699
Offset: 1

Views

Author

Keywords

Comments

Also, number of sequences of positive integers b_1, b_2, ..., b_k such that 1 + b_1*(1 + b_2*(...(1 + b_k) ... )) = n. If you take mu(b_1)*mu(b_2)*...*mu(b_k) for each sequence you get 1's 0's and -1's. Add them up and you get the terms for A007554. - Christian G. Bower, Oct 15 1998
Note that this applies also to planar rooted trees and other similar objects (mountain ranges, parenthesizations) encoded by A014486. - Antti Karttunen, Sep 07 2000
Equals sum of (n-1)-th row terms of triangle A152434. - Gary W. Adamson, Dec 04 2008
Equals the eigensequence of A051731, the inverse binomial transform. - Gary W. Adamson, Dec 26 2008
From Emeric Deutsch, Aug 18 2012: (Start)
The considered rooted trees are called generalized Bethe trees; in the Goldberg-Livshitz reference they are called uniform trees.
Also, a(n) = number of partitions of n-1 in which each part is divisible by the next. Example: a(5)=5 because we have 4, 31, 22, 211, and 1111.
There is a simple bijection between generalized Bethe trees with n+1 vertices and partitions of n in which each part is divisible by the next (the parts are given by the number of edges at the successive levels). We have the correspondences: number of edges --- sum of parts; root degree --- last part; number of leaves --- first part; height --- number of parts. (End)
a(n+1) = a(n) + 1 if and only if n is prime. - Jon Perry, Nov 24 2012
According to the MathOverflow link, log(a(n)) ~ log(4)*log(n)^2, and a more precise asymptotic expansion is similar to that of A018819 and hence A000123, so the conjecture in the Formula section is partly correct. - Andrey Zabolotskiy, Jan 22 2017

Examples

			a(4) = 3 because we have the path P(4), the tree Y, and the star \|/ . - _Emeric Deutsch_, Aug 18 2012
The planted achiral trees with up to 7 nodes are:
 1  -
 1  (-)
 2  (--),     ((-))
 3  (---),    ((--)),      (((-)))
 5  (----),   ((-)(-)),    ((---)),    (((--))),     ((((-))))
 6  (-----),  ((----)),    (((-)(-))), (((---))),    ((((--)))), (((((-)))))
10 (------), ((-)(-)(-)), ((--)(--)), (((-))((-))), ((-----)),  (((----))), ((((-)(-)))), ((((---)))), (((((--))))), ((((((-)))))). - _Gus Wiseman_, Jan 12 2017
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A122934 (offset by 1).

Programs

  • Haskell
    a003238 n = a003238_list !! (n-1)
    a003238_list = 1 : f 1 where
       f x = (sum (map a003238 $ a027750_row x)) : f (x + 1)
    -- Reinhard Zumkeller, Dec 20 2014
    
  • JavaScript
    a = new Array();
    for (i = 1; i < 50; i++) a[i] = 1;
    for (i = 3; i < 50; i++) for (j = 2; j < i; j++) if (i % j == 1) a[i] += a[j];
    document.write(a + "
    "); // Jon Perry, Nov 20 2012
  • Maple
    with(numtheory): aa := proc (n) if n = 0 then 1 else add(aa(divisors(n)[i]-1), i = 1 .. tau(n)) end if end proc: a := proc (n) options operator, arrow: aa(n-1) end proc: seq(a(n), n = 1 .. 48); # Emeric Deutsch, Aug 18 2012
    A003238:= proc(n) option remember; uses numtheory; add(A003238(m),m=divisors(n-1)) end proc;
    A003238(1):= 1;
    [seq(A003238(n),n=1..48)]; # Robert Israel, Mar 10 2014
  • Mathematica
    (* b = A068336 *) b[1] = 1; b[n_] := b[n] = 1 + Sum[b[k], {k, Divisors[n-1]}]; a[n_] := b[n]/2; a[1] = 1; Table[ a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 20 2011, after Ralf Stephan *)
    achi[n_]:=If[n===1,1,Total[achi/@Divisors[n-1]]];Array[achi,50] (* Gus Wiseman, Jan 12 2017 *)
  • PARI
    seq(n) = {my(v=vector(n)); v[1]=1; for(i=2, n, v[i]=sumdiv(i-1, d, v[d])); v} \\ Andrew Howroyd, Jun 08 2025

Formula

Shifts one place left under inverse Moebius transform: a(n+1) = Sum_{k|n} a(k).
Conjecture: log(a(n)) is asymptotic to c*log(n)^2 where 0.4 < c < 0.5 - Benoit Cloitre, Apr 13 2004
For n > 1, a(n) = (1/2) * A068336(n) and Sum_{k = 1..n} a(k) = A003318(n). - Ralf Stephan, Mar 27 2004
Generating function P(x) for the sequence with offset 2 obeys P(x) = x^2*(1 + Sum_{n >= 1} P(x^n)/x^n). [Harary & Robinson]. - R. J. Mathar, Sep 28 2011
a(n) = 1 + sum of a(i) such that n == 1 (mod i). - Jon Perry, Nov 20 2012
From Ilya Gutkovskiy, Apr 28 2019: (Start)
G.f.: x * (1 + Sum_{n>=1} a(n)*x^n/(1 - x^n)).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n)/n)) = Sum_{n>=1} a(n+1)*x^n/n. (End)

Extensions

Description improved by Christian G. Bower, Oct 15 1998

A000123 Number of binary partitions: number of partitions of 2n into powers of 2.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 20, 26, 36, 46, 60, 74, 94, 114, 140, 166, 202, 238, 284, 330, 390, 450, 524, 598, 692, 786, 900, 1014, 1154, 1294, 1460, 1626, 1828, 2030, 2268, 2506, 2790, 3074, 3404, 3734, 4124, 4514, 4964, 5414, 5938, 6462, 7060, 7658, 8350, 9042, 9828
Offset: 0

Views

Author

Keywords

Comments

Also, a(n) = number of "non-squashing" partitions of 2n (or 2n+1), that is, partitions 2n = p_1 + p_2 + ... + p_k with 1 <= p_1 <= p_2 <= ... <= p_k and p_1 + p_2 + ... + p_i <= p_{i+1} for all 1 <= i < k [Hirschhorn and Sellers].
Row sums of A101566. - Paul Barry, Jan 03 2005
Equals infinite convolution product of [1,2,2,2,2,2,2,2,2] aerated A000079 - 1 times, i.e., [1,2,2,2,2,2,2,2,2] * [1,0,2,0,2,0,2,0,2] * [1,0,0,0,2,0,0,0,2]. - Mats Granvik and Gary W. Adamson, Aug 04 2009
Which can be further decomposed to the infinite convolution product of finally supported sequences, namely [1,1] aerated A000079 - 1 times with multiplicity A000027 + 1 times, i.e., [1,1] * [1,1] * [1,0,1] * [1,0,1] * [1,0,1] * ... (next terms are [1,0,0,0,1] 4 times, etc.). - Eitan Y. Levine, Jun 18 2023
Given A018819 = A000123 with repeats, polcoeff (1, 1, 2, 2, 4, 4, ...) * (1, 1, 1, ...) = (1, 2, 4, 6, 10, ...) = (1, 0, 2, 0, 4, 0, 6, ...) * (1, 2, 2, 2, ...). - Gary W. Adamson, Dec 16 2009
Let M = an infinite lower triangular matrix with (1, 2, 2, 2, ...) in every column shifted down twice. A000123 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. Replacing (1, 2, 2, 2, ...) with (1, 3, 3, 3, ...) and following the same procedure, we obtain A171370: (1, 3, 6, 12, 18, 30, 42, 66, 84, 120, ...). - Gary W. Adamson, Dec 06 2009
First differences of the sequence are (1, 2, 2, 4, 4, 6, 6, 10, ...), A018819, i.e., the sequence itself with each term duplicated except for the first one (unless a 0 is prefixed before taking the first differences), as shown by the formula a(n) - a(n-1) = a(floor(n/2)), valid for all n including n = 0 if we let a(-1) = 0. - M. F. Hasler, Feb 19 2019
Sum over k <= n of number of partitions of k into powers of 2, A018819. - Peter Munn, Feb 21 2020

Examples

			For non-squashing partitions and binary partitions see the example in A018819.
For n=3, the a(3)=6 admitted partitions of 2n=6 are 1+1+1+1+1+1, 1+1+1+1+2, 1+1+2+2, 2+2+2, 1+1+4 and 2+4. - _R. J. Mathar_, Aug 11 2021
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.
  • R. F. Churchhouse, Binary partitions, pp. 397-400 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • N. G. de Bruijn, On Mahler's partition problem, Indagationes Mathematicae, vol. X (1948), 210-220.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • H. Gupta, A simple proof of the Churchhouse conjecture concerning binary partitions, Indian J. Pure Appl. Math. 3 (1972), 791-794.
  • H. Gupta, A direct proof of the Churchhouse conjecture concerning binary partitions, Indian J. Math. 18 (1976), 1-5.
  • 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

Cf. A000041, A002033, A002487, A002577, A005704-A005706, A023359, A040039, A100529. Partial sums and bisection of A018819.
A column of A072170. Row sums of A089177. Twice A033485.
Cf. A145515. - Alois P. Heinz, Apr 16 2009
Cf. A171370. - Gary W. Adamson, Dec 06 2009

Programs

  • Haskell
    import Data.List (transpose)
    a000123 n = a000123_list !! n
    a000123_list = 1 : zipWith (+)
       a000123_list (tail $ concat $ transpose [a000123_list, a000123_list])
    -- Reinhard Zumkeller, Nov 15 2012, Aug 01 2011
    
  • Magma
    [1] cat [n eq 1 select n+1 else Self(n-1) + Self(n div 2): n in [1..70]]; // Vincenzo Librandi, Dec 17 2016
    
  • Maple
    A000123 := proc(n) option remember; if n=0 then 1 else A000123(n-1)+A000123(floor(n/2)); fi; end; [ seq(A000123(i),i=0..50) ];
    # second Maple program: more efficient for large n; try: a( 10^25 );
    g:= proc(b, n) option remember; `if`(b<0, 0, `if`(b=0 or
          n=0, 1, `if`(b>=n, add((-1)^(t+1)*binomial(n+1, t)
          *g(b-t, n), t=1..n+1), g(b-1, n)+g(2*b, n-1))))
        end:
    a:= n-> (t-> g(n/2^(t-1), t))(max(ilog2(2*n), 1)):
    seq(a(n), n=0..60); # Alois P. Heinz, Apr 16 2009, revised Apr 14 2016
  • Mathematica
    a[0] = 1; a[n_] := a[n] = a[Floor[n/2]] + a[n-1]; Array[a,49,0] (* Jean-François Alcover, Apr 11 2011, after M. F. Hasler *)
    Fold[Append[#1, Total[Take[Flatten[Transpose[{#1, #1}]], #2]]] &, {1}, Range[2, 49]] (* Birkas Gyorgy, Apr 18 2011 *)
  • PARI
    {a(n) = my(A, m); if( n<1, n==0, m=1; A = 1 + O(x); while(m<=n, m*=2; A = subst(A, x, x^2) * (1+x) / (1-x)); polcoeff(A, n))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, a(n\2) + a(n-1))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    A123=[];A000123(n)={ n<3 && return(2^n); if( n<=#A123, A123[n] && return(A123[n]); A123[n-1] && return( A123[n] = A123[n-1]+A000123(n\2) ), n>2*#A123 && A123=concat(A123,vector((n-#A123)\2))); A123[if(n>#A123,1,n)]=2*sum(k=1,n\2-1,A000123(k),1)+(n%2+1)*A000123(n\2)} \\ Stores results in global vector A123 dynamically resized to at most 3n/4 when size is less than n/2. Gives a(n*10^6) in ~ n sec. - M. F. Hasler, Apr 30 2009
    
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n,2^valuation(2*m,2)*x^m/m)+x*O(x^n)),n)} \\ Paul D. Hanna, Oct 30 2012
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A000123(n): return 1 if n == 0 else A000123(n-1) + A000123(n//2) # Chai Wah Wu, Jan 18 2022

Formula

a(n) = A018819(2*n).
a(n) = a(n-1) + a(floor(n/2)). For proof see A018819.
2 * a(n) = a(n+1) + a(n-1) if n is even. - Michael Somos, Jan 07 2011
G.f.: (1-x)^(-1) Product_{n>=0} (1 - x^(2^n))^(-1).
a(n) = Sum_{i=0..n} a(floor(i/2)) [O'Shea].
a(n) = (1/n)*Sum_{k=1..n} (A038712(k)+1)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Aug 22 2002
Conjecture: Limit_{n ->infinity} (log(n)*a(2n))/(n*a(n)) = c = 1.63... - Benoit Cloitre, Jan 26 2003 [The constant c is equal to 2*log(2) = 1.38629436... =A016627. - Vaclav Kotesovec, Aug 07 2019]
G.f. A(x) satisfies A(x^2) = ((1-x)/(1+x)) * A(x). - Michael Somos, Aug 25 2003
G.f.: Product_{k>=0} (1+x^(2^k))/(1-x^(2^k)) = (Product_{k>=0} (1+x^(2^k))^(k+1) )/(1-x) = Product_{k>=0} (1+x^(2^k))^(k+2). - Joerg Arndt, Apr 24 2005
From Philippe Flajolet, Sep 06 2008: (Start)
The asymptotic rate of growth is known precisely - see De Bruijn's paper. With p(n) the number of partitions of n into powers of two, the asymptotic formula of de Bruijn is: log(p(2*n)) = 1/(2*L2)*(log(n/log(n)))^2 + (1/2 + 1/L2 + LL2/L2)*log(n) - (1 + LL2/L2)*log(log(n)) + Phi(log(n/log(n))/L2), where L2=log(2), LL2=log(log(2)) and Phi(x) is a certain periodic function with period 1 and a tiny amplitude.
Numerically, Phi(x) appears to have a mean value around 0.66. An expansion up to O(1) term had been obtained earlier by Kurt Mahler. (End)
G.f.: exp( Sum_{n>=1} 2^A001511(n) * x^n/n ), where 2^A001511(n) is the highest power of 2 that divides 2*n. - Paul D. Hanna, Oct 30 2012
(n/2)*a(n) = Sum_{k = 0..n-1} (n-k)/A000265(n-k)*a(k). - Peter Bala, Mar 03 2019
Conjectures from Mikhail Kurkov, May 04 2025: (Start)
Sum_{k=0..n} a(2^m*k)*A106400(n-k) = A125790(m,2*n) for m >= 0, n >= 0.
Sum_{k=0..n} a(2^m*(2*k+1))*A106400(n-k) = A125790(m+1,2*n+1) for m >= 0, n >= 0.
More generally, if we define b(n,m,p,q) = Sum_{k=0..n} a(2^m*(2*p*k+2*q+1))*A106400(n-k) for m >= 0, p > 0, q >= 0, n >= 0, then it also looks like that we have b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,(q-1)/2), b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,q/2)*(-1)^(m+k+1) for m >= 0, p > 0, q >= 0, n >= 0. (End)
Conjecture: Sum_{i>=0} a(2^m*i + k)*x^i = f(k,x) / Product_{q>=0} (1 - x^(2^q)) for m > 0, 2^(m-1) <= k < 2^m where f(k,x) is g.f. for k-th row of A381810. - Mikhail Kurkov, May 17 2025

Extensions

More terms from Robin Trew (trew(AT)hcs.harvard.edu)
Values up to a(10^4) checked with given PARI code by M. F. Hasler, Apr 30 2009

A067824 a(1) = 1; for n > 1, a(n) = 1 + Sum_{0 < d < n, d|n} a(d).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 16, 2, 6, 6, 16, 2, 16, 2, 16, 6, 6, 2, 40, 4, 6, 8, 16, 2, 26, 2, 32, 6, 6, 6, 52, 2, 6, 6, 40, 2, 26, 2, 16, 16, 6, 2, 96, 4, 16, 6, 16, 2, 40, 6, 40, 6, 6, 2, 88, 2, 6, 16, 64, 6, 26, 2, 16, 6, 26, 2, 152, 2, 6, 16, 16, 6, 26, 2, 96, 16, 6, 2, 88, 6, 6, 6, 40, 2, 88, 6, 16, 6, 6, 6, 224, 2, 16, 16, 52
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 08 2002

Keywords

Comments

By a result of Karhumaki and Lifshits, this is also the number of polynomials p(x) with coefficients in {0,1} that divide x^n-1 and such that (x^n-1)/ {(x-1)p(x)} has all coefficients in {0,1}.
The number of tiles of a discrete interval of length n (an interval of Z). - Eric H. Rivals (rivals(AT)lirmm.fr), Mar 13 2007
Bodini and Rivals proved this is the number of tiles of a discrete interval of length n and also is the number (A107067) of polynomials p(x) with coefficients in {0,1} that divide x^n-1 and such that (x^n-1)/ {(x-1)p(x)} has all coefficients in {0,1} (Bodini, Rivals, 2006). This structure of such tiles is also known as Krasner's factorization (Krasner and Ranulac, 1937). The proof also gives an algorithm to recognize if a set is a tile in optimal time and in this case, to compute the smallest interval it can tile (Bodini, Rivals, 2006). - Eric H. Rivals (rivals(AT)lirmm.fr), Mar 13 2007
Number of lone-child-avoiding rooted achiral (or generalized Bethe) trees with positive integer leaves summing to n, where a rooted tree is lone-child-avoiding if all terminal subtrees have at least two branches, and achiral if all branches directly under any given node are equal. For example, the a(6) = 6 trees are 6, (111111), (222), ((11)(11)(11)), (33), ((111)(111)). - Gus Wiseman, Jul 13 2018. Updated Aug 22 2020.
From Gus Wiseman, Aug 20 2020: (Start)
Also the number of strict chains of divisors starting with n. For example, the a(n) chains for n = 1, 2, 4, 6, 8, 12 are:
1 2 4 6 8 12
2/1 4/1 6/1 8/1 12/1
4/2 6/2 8/2 12/2
4/2/1 6/3 8/4 12/3
6/2/1 8/2/1 12/4
6/3/1 8/4/1 12/6
8/4/2 12/2/1
8/4/2/1 12/3/1
12/4/1
12/4/2
12/6/1
12/6/2
12/6/3
12/4/2/1
12/6/2/1
12/6/3/1
(End)
a(n) is the number of chains including n of the divisor lattice of divisors of n, which is to say, a(n) is the number of (d_1,d_2,...,d_k) such that d_1 < d_2 < ... < d_k = n and d_i divides d_{i+1} for 1 <= i <= k-1. Using this definition, the recurrence a(n) = 1 + Sum_{0 < d < n, d|n} a(d) is evident by enumerating the preceding element of n in the chains. If we count instead the chains whose LCM of members is n, then a(1) would be 2 because the empty chain is included, and we would obtain 2*A074206(n). - Jianing Song, Aug 21 2024

Examples

			a(12) = 1 + a(6) + a(4) + a(3) + a(2) + a(1)
= 1+(1+a(3)+a(2)+a(1))+(1+a(2)+a(1))+(1+a(1))+(1+a(1))+(1)
= 1+(1+(1+a(1))+(1+a(1))+1)+(1+(1+a(1))+1)+(1+1)+(1+1)+(1)
= 1+(1+(1+1)+(1+1)+1)+(1+(1+1)+1)+(1+1)+(1+1)+(1)
= 1 + 6 + 4 + 2 + 2 + 1 = 16.
		

References

  • Olivier Bodini and Eric Rivals. Tiling an Interval of the Discrete Line. In M. Lewenstein and G. Valiente, editors, Proc. of the 17th Annual Symposium on Combinatorial Pattern Matching (CPM), volume 4009 of Lecture Notes in Computer Science, pages 117-128. Springer Verlag, 2006.
  • Juhani Karhumaki, Yury Lifshits and Wojciech Rytter, Tiling Periodicity, in Combinatorial Pattern Matching, Lecture Notes in Computer Science, Volume 4580/2007, Springer-Verlag.

Crossrefs

Cf. A122408 (fixed points).
Inverse Möbius transform of A074206.
A001055 counts factorizations.
A008480 counts maximal chains of divisors starting with n.
A074206 counts chains of divisors from n to 1.
A253249 counts nonempty chains of divisors.
A337070 counts chains of divisors starting with A006939(n).
A337071 counts chains of divisors starting with n!.
A337256 counts chains of divisors.
Cf. A001221, A001222, A002033, A124010, A337074, A337105, A378223, A378225 (Dirichlet inverse).

Programs

  • Haskell
    a067824 n = 1 + sum (map a067824 [d | d <- [1..n-1], mod n d == 0])
    -- Reinhard Zumkeller, Oct 13 2011
    
  • Maple
    a:= proc(n) option remember;
          1+add(a(d), d=numtheory[divisors](n) minus {n})
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 17 2021
  • Mathematica
    a[1]=1; a[n_] := a[n] = 1+Sum[If[Mod[n,d]==0, a[d], 0], {d, 1, n-1}]; Array[a,100] (* Jean-François Alcover, Apr 28 2011 *)
  • PARI
    A=vector(100);A[1]=1; for(n=2,#A,A[n]=1+sumdiv(n,d,A[d])); A \\ Charles R Greathouse IV, Nov 20 2012

Formula

a(n) = 2*A074206(n), n>1. - Vladeta Jovovic, Jul 03 2005
a(p^k) = 2^k for primes p. - Reinhard Zumkeller, Sep 03 2006
a(n) = Sum_{d|n} A002033(d-1) = Sum_{d|n} A074206(d). - Gus Wiseman, Jul 13 2018
Dirichlet g.f.: zeta(s) / (2 - zeta(s)). - Álvar Ibeas, Dec 30 2018
G.f. A(x) satisfies: A(x) = x/(1 - x) + Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, May 18 2019

Extensions

Entry revised by N. J. A. Sloane, Aug 27 2006

A126796 Number of complete partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 8, 10, 16, 20, 31, 39, 55, 71, 100, 125, 173, 218, 291, 366, 483, 600, 784, 971, 1244, 1538, 1957, 2395, 3023, 3693, 4605, 5604, 6942, 8397, 10347, 12471, 15235, 18309, 22267, 26619, 32219, 38414, 46216, 54941, 65838, 77958, 93076, 109908
Offset: 0

Views

Author

Brian Hopkins, Feb 20 2007

Keywords

Comments

A partition of n is complete if every number 1 to n can be represented as a sum of parts of the partition. This generalizes perfect partitions, where the representation for each number must be unique.
A partition is complete iff each part is no more than 1 more than the sum of all smaller parts. (This includes the smallest part, which thus must be 1.) - Franklin T. Adams-Watters, Mar 22 2007
For n > 0: a(n) = sum of n-th row in A261036 and also a(floor(n/2)) = A261036(n,floor((n+1)/2)). - Reinhard Zumkeller, Aug 08 2015
a(n+1) is the number of partitions of n such that each part is no more than 2 more than the sum of all smaller parts (generalizing Adams-Watters's criterion). Bijection: each partition counted by a(n+1) must contain a 1, removing that gives a desired partition of n. - Brian Hopkins, May 16 2017
A partition (x_1, ..., x_k) is complete if and only if 1, x_1, ..., x_k is a "regular sequence" (see A003513 for definition). As a result, the number of complete partitions with n parts is given by A003513(n+1). - Nathaniel Johnston, Jun 29 2023

Examples

			There are a(5) = 4 complete partitions of 5:
  [1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 2, 2], and [1, 1, 3].
G.f.: 1 = 1*(1-x) + 1*x*(1-x)*(1-x^2) + 1*x^2*(1-x)*(1-x^2)*(1-x^3) + 2*x^3*(1-x)*(1-x^2)*(1-x^3)*(1-x^4) + 2*x^4*(1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5) + ...
From _Gus Wiseman_, Oct 14 2023: (Start)
The a(1) = 1 through a(8) = 10 partitions:
  (1)  (11)  (21)   (211)   (221)    (321)     (421)      (3221)
             (111)  (1111)  (311)    (2211)    (2221)     (3311)
                            (2111)   (3111)    (3211)     (4211)
                            (11111)  (21111)   (4111)     (22211)
                                     (111111)  (22111)    (32111)
                                               (31111)    (41111)
                                               (211111)   (221111)
                                               (1111111)  (311111)
                                                          (2111111)
                                                          (11111111)
(End)
		

Crossrefs

For parts instead of sums we have A000009 (sc. coverings), ranks A055932.
The strict case is A188431, complement A365831.
These partitions have ranks A325781.
First column k = 0 of A365923.
The complement is counted by A365924, ranks A365830.

Programs

  • Haskell
    import Data.MemoCombinators (memo3, integral, Memo)
    a126796 n = a126796_list !! n
    a126796_list = map (pMemo 1 1) [0..] where
       pMemo = memo3 integral integral integral p
       p   0 = 1
       p s k m
         | k > min m s = 0
         | otherwise   = pMemo (s + k) k (m - k) + pMemo s (k + 1) m
    -- Reinhard Zumkeller, Aug 07 2015
  • Maple
    isCompl := proc(p,n) local m,pers,reps,f,lst,s; reps := {}; pers := combinat[permute](p); for m from 1 to nops(pers) do lst := op(m,pers); for f from 1 to nops(lst) do s := add( op(i,lst),i=1..f); reps := reps union {s}; od; od; for m from 1 to n do if not m in reps then RETURN(false); fi; od; RETURN(true); end: A126796 := proc(n) local prts, res,p; prts := combinat[partition](n); res :=0; for p from 1 to nops(prts) do if isCompl(op(p,prts),n) then res := res+1; fi; od; RETURN(res); end: for n from 1 to 40 do printf("%d %d ",n,A126796(n)); od; # R. J. Mathar, Feb 27 2007
    # At the beginning of the 2nd Maple program replace the current 15 by any other positive integer n in order to obtain a(n). - Emeric Deutsch, Mar 04 2007
    with(combinat): a:=proc(n) local P,b,k,p,S,j: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: end: seq(a(n),n=1..30); # Emeric Deutsch, Mar 04 2007
    with(combinat): n:=15: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: b; # Emeric Deutsch, Mar 04 2007
  • Mathematica
    T[n_, k_] := T[n, k] = If[k <= 1, 1, If[n < 2k-1, T[n, Floor[(n+1)/2]], T[n, k-1] + T[n-k, k]]];
    a[n_] := T[n, Floor[(n+1)/2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 11 2017, after Franklin T. Adams-Watters *)
    nmz[y_]:=Complement[Range[Total[y]], Total/@Subsets[y]]; Table[Length[Select[IntegerPartitions[n], nmz[#]=={}&]],{n,0,15}] (* Gus Wiseman, Oct 14 2023 *)
  • PARI
    {T(n,k)=if(k<=1,1,if(n<2*k-1,T(n,floor((n+1)/2)),T(n,k-1)+T(n-k,k)))}
    {a(n)=T(n,floor((n+1)/2))} /* If modified to save earlier results, this would be efficient. */ /* Franklin T. Adams-Watters, Mar 22 2007 */
    
  • PARI
    /* As coefficients in g.f.: */
    {a(n)=local(A=[1,1]);for(i=1,n+1,A=concat(A,0);A[#A]=polcoeff(1-sum(m=1,#A,A[m]*x^m*prod(k=1,m,1-x^k +x*O(x^#A))),#A) );A[n+1]}
    for(n=0,50,print1(a(n),",")) /* Paul D. Hanna, Mar 06 2012 */
    

Formula

G.f.: 1 = Sum_{n>=0} a(n)*x^n*Product_{k=1..n+1} (1-x^k). - Paul D. Hanna, Mar 08 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n) * (1 - (sqrt(3/2)/Pi + 25*Pi/(24*sqrt(6))) / sqrt(n) + (25/16 - 1679*Pi^2/6912)/n). - Vaclav Kotesovec, May 24 2018, extended Nov 02 2019
a(n) = A000041(n) - A365924(n). - Gus Wiseman, Oct 14 2023

Extensions

More terms from R. J. Mathar, Feb 27 2007
More terms from Emeric Deutsch, Mar 04 2007
Further terms from Franklin T. Adams-Watters and David W. Wilson, Mar 22 2007

A339890 Number of odd-length factorizations of n into factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

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

Crossrefs

The case of set partitions (or n squarefree) is A024429.
The case of partitions (or prime powers) is A027193.
The ordered version is A174726 (even: A174725).
The remaining (even-length) factorizations are counted by A339846.
A000009 counts partitions into odd parts, ranked by A066208.
A001055 counts factorizations, with strict case A045778.
A027193 counts partitions of odd length, ranked by A026424.
A058695 counts partitions of odd numbers, ranked by A300063.
A160786 counts odd-length partitions of odd numbers, ranked by A300272.
A316439 counts factorizations by product and length.
A340101 counts factorizations into odd factors.
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<2, 0, g(n$2, 1)):
    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],OddQ@Length[#]&]],{n,100}]

Formula

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

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

A253249 Number of nonempty chains in the divides relation on the divisors of n.

Original entry on oeis.org

1, 3, 3, 7, 3, 11, 3, 15, 7, 11, 3, 31, 3, 11, 11, 31, 3, 31, 3, 31, 11, 11, 3, 79, 7, 11, 15, 31, 3, 51, 3, 63, 11, 11, 11, 103, 3, 11, 11, 79, 3, 51, 3, 31, 31, 11, 3, 191, 7, 31, 11, 31, 3, 79, 11, 79, 11, 11, 3, 175, 3, 11, 31, 127, 11, 51, 3, 31, 11, 51
Offset: 1

Views

Author

Geoffrey Critzer, Jun 04 2015

Keywords

Comments

For prime p, a(p)=3.
a(2^k) = 2^(k+1)-1.
For integers of the form n = p_1*p_2*...*p_k we have a(n) = A007047(k).
The value of a(n) depends only on the exponents in the prime factorization of n.

Examples

			a(10) = 11 because we have: {1}, {2}, {5}, {10}, {1|2}, {1|5}, {1|10}, {2|10}, {5|10}, {1|2|10}, {1|5|10}.
		

Crossrefs

Cf. A002033, A007047, A074206, A107311, A378219 (Dirichlet inverse).

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember: 1+ `if`(n=1, 0,
           add(b(d), d=divisors(n) minus {n}))
        end:
    a:= n-> add(b(d), d=divisors(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 04 2015
  • Mathematica
    Table[Total[Table[Length[Select[Subsets[Divisors[n], {k}],Apply[And, Map[Apply[Divisible, #] &,Partition[Reverse[#], 2, 1]]] &]], {k, 1,PrimeOmega[n] + 1}]], {n, 1, 100}]

Formula

Dirichlet g.f.: zeta(s)^2*A(s) where A(s) is the Dirichlet g.f. for A074206. - Geoffrey Critzer, May 23 2018
Sum_{k=1..n} a(k) ~ -4*n^r / (r*Zeta'(r)), where r = A107311 = 1.728647238998183618135103... is the root of the equation zeta(r) = 2. - Vaclav Kotesovec, Jan 31 2019
a(n) = 4*A002033(n-1) - 1 for n > 1. - Geoffrey Critzer, Aug 19 2020

A047968 a(n) = Sum_{d|n} p(d), where p(d) = A000041 = number of partitions of d.

Original entry on oeis.org

1, 3, 4, 8, 8, 17, 16, 30, 34, 52, 57, 99, 102, 153, 187, 261, 298, 432, 491, 684, 811, 1061, 1256, 1696, 1966, 2540, 3044, 3876, 4566, 5846, 6843, 8610, 10203, 12610, 14906, 18491, 21638, 26508, 31290, 38044, 44584, 54133, 63262, 76241
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Inverse Moebius transform of A000041.
Row sums of triangle A137587. - Gary W. Adamson, Jan 27 2008
Row sums of triangle A168021. - Omar E. Pol, Nov 20 2009
Row sums of triangle A168017. Row sums of triangle A168018. - Omar E. Pol, Nov 25 2009
Sum of the partition numbers of the divisors of n. - Omar E. Pol, Feb 25 2014
Conjecture: for n > 6, a(n) is strictly increasing. - Franklin T. Adams-Watters, Apr 19 2014
Number of constant multiset partitions of multisets spanning an initial interval of positive integers with multiplicities an integer partition of n. - Gus Wiseman, Sep 16 2018

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, hence the partition numbers of the divisors of 10 are 1, 2, 7, 42, so a(10) = 1 + 2 + 7 + 42 = 52. - _Omar E. Pol_, Feb 26 2014
From _Gus Wiseman_, Sep 16 2018: (Start)
The a(6) = 17 constant multiset partitions:
  (111111)  (111)(111)    (11)(11)(11)  (1)(1)(1)(1)(1)(1)
  (111222)  (12)(12)(12)
  (111122)  (112)(112)
  (112233)  (123)(123)
  (111112)
  (111123)
  (111223)
  (111234)
  (112234)
  (112345)
  (123456)
(End)
		

Crossrefs

Programs

  • Maple
    with(combinat): with(numtheory): a := proc(n) c := 0: l := sort(convert(divisors(n), list)): for i from 1 to nops(l) do c := c+numbpart(l[i]) od: RETURN(c): end: for j from 1 to 60 do printf(`%d, `, a(j)) od: # Zerinvary Lajos, Apr 14 2007
  • Mathematica
    a[n_] := Sum[ PartitionsP[d], {d, Divisors[n]}]; Table[a[n], {n, 1, 44}] (* Jean-François Alcover, Oct 03 2013 *)

Formula

G.f.: Sum_{k>0} (-1+1/Product_{i>0} (1-z^(k*i))). - Vladeta Jovovic, Jun 22 2003
G.f.: sum(n>0,A000041(n)*x^n/(1-x^n)). - Mircea Merca, Feb 24 2014.
a(n) = A168111(n) + A000041(n). - Omar E. Pol, Feb 26 2014
a(n) = Sum_{y is a partition of n} A000005(GCD(y)). - Gus Wiseman, Sep 16 2018
Previous Showing 11-20 of 250 results. Next