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-9 of 9 results.

A001055 The multiplicative partition function: number of ways of factoring n with all factors greater than 1 (a(1) = 1 by convention).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 5, 1, 4, 1, 4, 2, 2, 1, 7, 2, 2, 3, 4, 1, 5, 1, 7, 2, 2, 2, 9, 1, 2, 2, 7, 1, 5, 1, 4, 4, 2, 1, 12, 2, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 11, 1, 2, 4, 11, 2, 5, 1, 4, 2, 5, 1, 16, 1, 2, 4, 4, 2, 5, 1, 12, 5, 2, 1, 11, 2, 2, 2, 7, 1, 11, 2, 4, 2, 2, 2, 19, 1, 4, 4, 9, 1, 5, 1
Offset: 1

Views

Author

Keywords

Comments

From David W. Wilson, Feb 28 2009: (Start)
By a factorization of n we mean a multiset of integers > 1 whose product is n.
For example, 6 is the product of 2 such multisets, {2, 3} and {6}, so a(6) = 2.
Similarly 8 is the product of 3 such multisets, {2, 2, 2}, {2, 4} and {8}, so a(8) = 3.
1 is the product of 1 such multiset, namely the empty multiset {}, whose product is by definition the multiplicative identity 1. Hence a(1) = 1. (End)
a(n) = # { k | A064553(k) = n }. - Reinhard Zumkeller, Sep 21 2001; Benoit Cloitre and N. J. A. Sloane, May 15 2002
Number of members of A025487 with n divisors. - Matthew Vandermast, Jul 12 2004
See sequence A162247 for a list of the factorizations of n and a program for generating the factorizations for any n. - T. D. Noe, Jun 28 2009
So a(n) gives the number of different prime signatures that can be found among the integers that have n divisors. - Michel Marcus, Nov 11 2015
For n > 0, also the number of integer partitions of n with product n, ranked by A301987. For example, the a(12) = 4 partitions are: (12), (6,2,1,1,1,1), (4,3,1,1,1,1,1), (3,2,2,1,1,1,1,1). See also A380218. In general, A379666(m,n) = a(n) for any m >= n. - Gus Wiseman, Feb 07 2025

Examples

			1: 1, a(1) = 1
2: 2, a(2) = 1
3: 3, a(3) = 1
4: 4 = 2*2, a(4) = 2
6: 6 = 2*3, a(6) = 2
8: 8 = 2*4 = 2*2*2, a(8) = 3
etc.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 292-295.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • 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).
  • G. Tenenbaum, Introduction to analytic and probabilistic number theory, Cambridge University Press, 1995, p. 198, exercise 9 (in the third edition 2015, p. 296, exercise 211).

Crossrefs

A045782 gives the range of a(n).
For records see A033833, A033834.
Row sums of A316439 (for n>1).
Cf. A096276 (partial sums).
The additive version is A000041 (integer partitions), strict A000009.
Row sums of A318950.
A002865 counts partitions into parts > 1.
A069016 counts distinct sums of factorizations.
A319000 counts partitions by product and sum, row sums A319916.
A379666 (transpose A380959) counts partitions by sum and product, without 1's A379668, strict A379671.

Programs

  • Haskell
    a001055 = (map last a066032_tabl !!) . (subtract 1)
    -- Reinhard Zumkeller, Oct 01 2012
    
  • Java
    public class MultiPart {
        public static void main(String[] argV) {
            for (int i=1;i<=100;++i) System.out.println(1+getDivisors(2,i));
        }
        public static int getDivisors(int min,int n) {
            int total = 0;
            for (int i=min;i=i) { ++total; if (n/i>i) total+=getDivisors(i,n/i); }
            return total;
        }
    } \\ Scott R. Shannon, Aug 21 2019
  • Maple
    with(numtheory):
    T := proc(n::integer, m::integer)
            local A, summe, d:
            if isprime(n) then
                    if n <= m then
                            return 1;
                    end if:
                    return 0 ;
            end if:
            A := divisors(n) minus {n, 1}:
            for d in A do
                    if d > m then
                            A := A minus {d}:
                    end if:
            end do:
            summe := add(T(n/d,d),d=A) ;
            if n <=m then
                    summe := summe + 1:
            end if:
            summe ;
    end proc:
    A001055 := n -> T(n, n):
    [seq(A001055(n), n=1..100)]; # Reinhard Zumkeller and Ulrich Schimke (ulrschimke(AT)aol.com)
  • Mathematica
    c[1, r_] := c[1, r]=1; c[n_, r_] := c[n, r] = Module[{ds, i}, ds = Select[Divisors[n], 1 < # <= r &]; Sum[c[n/ds[[i]], ds[[i]]], {i, 1, Length[ds]}]]; a[n_] := c[n, n]; a/@Range[100] (* c[n, r] is the number of factorizations of n with factors <= r. - Dean Hickerson, Oct 28 2002 *)
    T[, 1] = T[1, ] = 1;
    T[n_, m_] := T[n, m] = DivisorSum[n, Boole[1 < # <= m] * T[n/#, #]&];
    a[n_] := T[n, n];
    a /@ Range[100] (* Jean-François Alcover, Jan 03 2020 *)
  • PARI
    /* factorizations of n with factors <= m (n,m positive integers) */
    fcnt(n,m) = {local(s);s=0;if(n == 1,s=1,fordiv(n,d,if(d > 1 & d <= m,s=s+fcnt(n/d,d))));s}
    A001055(n) = fcnt(n,n) \\ Michael B. Porter, Oct 29 2009
    
  • PARI
    \\ code using Dirichlet g.f., based on Somos's code for A007896
    {a(n) = my(A, v, w, m);
    if(
    n<1, 0,
    \\ define unit vector v = [1, 0, 0, ...] of length n
    v = vector(n, k, k==1);
    for(k=2, n,
    m = #digits(n, k) - 1;
    \\ expand 1/(1-x)^k out far enough
    A = (1 - x)^ -1 + x * O(x^m);
    \\ w = zero vector of length n
    w = vector(n);
    \\ convert A to a vector
    for(i=0, m, w[k^i] = polcoeff(A, i));
    \\ build the answer
    v = dirmul(v, w)
    );
    v[n]
    )
    };
    \\ produce the sequence
    vector(100,n,a(n)) \\ N. J. A. Sloane, May 26 2014
    
  • PARI
    v=vector(100, k, k==1); for(n=2, #v, v+=dirmul(v, vector(#v, k, (k>1) && n^valuation(k,n)==k)) ); v \\ Max Alekseyev, Jul 16 2014
    
  • Python
    from sympy import divisors, isprime
    def T(n, m):
        if isprime(n): return 1 if n<=m else 0
        A=filter(lambda d: d<=m, divisors(n)[1:-1])
        s=sum(T(n//d, d) for d in A)
        return s + 1 if n<=m else s
    def a(n): return T(n, n)
    print([a(n) for n in range(1, 106)]) # Indranil Ghosh, Aug 19 2017
    

Formula

The asymptotic behavior of this sequence was studied by Canfield, Erdős & Pomerance and Luca, Mukhopadhyay, & Srinivas. - Jonathan Vos Post, Jul 07 2008
Dirichlet g.f.: Product_{k>=2} 1/(1 - 1/k^s).
If n = p^k for a prime p, a(n) = partitions(k) = A000041(k).
Since the sequence a(n) is the right diagonal of A066032, the given recursive formula for A066032 applies (see Maple program). - Reinhard Zumkeller and Ulrich Schimke (ulrschimke(AT)aol.com)
a(A002110(n)) = A000110(n).
a(p^k*q^k) = A002774(k) if p and q are distinct primes. - R. J. Mathar, Jun 06 2024
a(n) = A028422(n) + 1. - Gus Wiseman, Feb 07 2025

Extensions

Incorrect assertion about asymptotic behavior deleted by N. J. A. Sloane, Jun 08 2009

A050367 Number of ways to factor n into 2 kinds of 2, 3 kinds of 3, ...

Original entry on oeis.org

1, 2, 3, 7, 5, 12, 7, 20, 15, 20, 11, 45, 13, 28, 30, 59, 17, 66, 19, 75, 42, 44, 23, 150, 40, 52, 64, 105, 29, 150, 31, 162, 66, 68, 70, 270, 37, 76, 78, 250, 41, 210, 43, 165, 165, 92, 47, 477, 77, 180, 102, 195, 53, 326, 110, 350, 114, 116, 59, 630, 61, 124, 231
Offset: 1

Views

Author

Christian G. Bower, Oct 15 1999

Keywords

Programs

  • PARI
    \\ modeled on Michael Somos's program for A007896
    {a(n) = my(A, v, w, m);
    if(
    n<1, 0,
    \\ define unit vector v = [1, 0, 0, ...] of length n
    v = vector(n, k, k==1);
       for(k=2, n,
               m = #digits(n, k) - 1;
    \\ expand 1/(1-x)^k out far enough
               A = (1 - x)^ -k + x * O(x^m);
    \\ w = zero vector of length n
               w = vector(n);
    \\ convert A to a vector
               for(i=0, m, w[k^i] = polcoeff(A, i));
    \\ build the answer
               v = dirmul(v, w)
          );
    v[n]
      )
    };
    \\ produce the sequence
    vector(100,n,a(n)) \\ N. J. A. Sloane, May 26 2014

Formula

Dirichlet g.f.: Product_{n>=2} 1/(1-1/n^s)^n.

A344268 Dirichlet g.f.: Product_{k>=2} (1 + k^(-s))^(5^(k-1)).

Original entry on oeis.org

1, 5, 25, 135, 625, 3250, 15625, 78760, 390925, 1956250, 9765625, 48847125, 244140625, 1220781250, 6103531250, 30517977755, 152587890625, 762941485875, 3814697265625, 19073496178125, 95367432031250, 476837207031250, 2384185791015625, 11920929201609625, 59604644775585625, 298023225097656250
Offset: 1

Views

Author

Ilya Gutkovskiy, May 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    dircon[v_, w_] := Module[{lv = Length[v], lw = Length[w], fv, fw}, fv[n_] := If[n <= lv, v[[n]], 0]; fw[n_] := If[n <= lw, w[[n]], 0]; Table[ DirichletConvolve[fv[n], fw[n], n, m], {m, Min[lv, lw]}]];
    a[n_] := Module[{A, v, w, m}, If[n<1, 0, v = Table[Boole[k == 1], {k, n}]; For[k = 2, k <= n, k++, m = Length[IntegerDigits[n, k]] - 1; A = (1 + x)^(5^(k - 1)) + x*O[x]^m // Normal; w = Table[0, {n}]; For[i = 0, i <= m, i++, w[[k^i]] = Coefficient[A, x, i]]; v = dircon[v, w]]; v[[n]]]];
    Array[a, 26] (* after Jean-François Alcover in A007896 *)

A007897 a(n) is multiplicative with a(2) = 1; a(4) = 2; a(2^i) = 2^(i-2)+2 if i>2; a(p^i) = 1+(p-1)*p^(i-1)/2 if prime p>2 and i>0.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 4, 4, 3, 6, 4, 7, 4, 6, 6, 9, 4, 10, 6, 8, 6, 12, 8, 11, 7, 10, 8, 15, 6, 16, 10, 12, 9, 12, 8, 19, 10, 14, 12, 21, 8, 22, 12, 12, 12, 24, 12, 22, 11, 18, 14, 27, 10, 18, 16, 20, 15, 30, 12, 31, 16, 16, 18, 21, 12, 34, 18, 24, 12, 36, 16, 37, 19, 22, 20, 24, 14, 40, 18, 28
Offset: 1

Views

Author

Felix Weinstein (wain(AT)ana.unibe.ch), Dec 11 1999

Keywords

Comments

From Jeffrey Shallit, Jun 14 2018: (Start)
Except for first term, the same as A180783.
Equal to the number of elements x relatively prime to n such that x mod n >= x^(-1) mod n. (End)

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 2*x^6 + 4*x^7 + 4*x^8 + 4*x^9 + ...
		

References

  • Felix Weinstein, The Fibonacci Partitions, preprint, 1995.

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 2, Boole[ n == 1],Times @@ Apply[ Function[ {p, e}, If[p == 2, If[e < 3, e, 2^(e - 2) + 2], 1 + p^(e - 1) (p - 1)/2]], FactorInteger @ n, 1]]; (* Michael Somos, May 26 2014 *)
  • PARI
    ap(p, e) = if (p==2, if (e==1, 1, if (e==2, 2, 2^(e-2)+2)), 1+(p-1)*p^(e-1)/2);
    a(n) = { my(f = factor(n)); prod(i=1, #f~, ap(f[i,1], f[i, 2]));} \\ Michel Marcus, Apr 19 2014
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], if( p = A[k,1], e = A[k,2]; if( p==2, if( e<3, e, 2^(e-2) + 2), 1 + p^(e-1) * (p-1) / 2))))}; /* Michael Somos, May 26 2014 */
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p = 2, n, if( p>2, 1 / (1 - X) + (p - 1) / 2 * X / (1 - p*X), (1 + X^2) / (1 - X) + p * X^3 / (1 - p*X))) [n])}; /* Michael Somos, May 26 2014 */

Formula

Dirichlet g.f.: zeta(s) * zeta(s-1) * ((2 - 2^(s+2) + 2^(2*s+1) - 1/2^(2*s-2))/(2^(2*s+1) - 3*2^s - 1)) * Product_{p prime} (1 - (1/p^(s-1) + 1/p^s - 1/p^(2*s-1) + 1/p^(2*s))/2). - Amiram Eldar, Nov 09 2023

Extensions

Definition corrected by Michel Marcus, Apr 19 2014
Changed name from phi(n) (which caused much confusion with the Euler phi-function) to a(n). - N. J. A. Sloane, May 26 2014

A007898 a(n) = psi_c(n), where Product_{k>1} 1/(1-1/k^s)^A007897(k) = Sum_{k>0} psi_c(k)/k^s.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 4, 7, 7, 6, 6, 12, 7, 8, 12, 16, 9, 15, 10, 18, 16, 12, 12, 32, 17, 14, 22, 24, 15, 30, 16, 34, 24, 18, 24, 48, 19, 20, 28, 48, 21, 40, 22, 36, 45, 24, 24, 78, 32, 37, 36, 42, 27, 54, 36, 64, 40, 30, 30, 96, 31, 32, 60, 78, 42, 60, 34, 54
Offset: 1

Views

Author

Felix Weinstein (wain(AT)ana.unibe.ch)

Keywords

Examples

			G.f. = x + x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 4*x^6 + 4*x^7 + 7*x^8 + 7*x^9 + ...
		

References

  • F. V. Weinstein, The Fibonacci Partitions, preprint, 1995.

Crossrefs

Programs

  • Mathematica
    dircon[v_, w_] := Module[{lv = Length[v], lw = Length[w], fv, fw}, fv[n_] := If[n <= lv, v[[n]], 0]; fw[n_] := If[n <= lw, w[[n]], 0]; Table[ DirichletConvolve[fv[n], fw[n], n, m], {m, Min[lv, lw]}]];
    a[n_] := Module[{A, v, w, m}, If[n<1, 0, v = Table[Boole[k == 1], {k, n}]; For[k = 2, k <= n, k++, m = Length[IntegerDigits[n, k]] - 1; A = Product[ {p, e} = pe; If[p == 2, If[e<3, e, 2^(e-2) + 2], 1 + p^(e-1) (p-1)/2], {pe, FactorInteger[k]}]; A = (1-x)^-A + x O[x]^m // Normal; w = Table[0, {n}]; For[i = 0, i <= m, i++, w[[k^i]] = Coefficient[A, x, i]]; v = dircon[v, w]]; v[[n]]]];
    Array[a, 68] (* Jean-François Alcover, Nov 12 2018, from PARI *)
  • PARI
    {a(n) = my(A, v, w, m, p, e); if( n<1, 0, v = vector(n, k, k==1); for(k=2, n, m = #digits(n, k) - 1; A = factor(k); A = prod( j=1, matsize(A)[1], if( p = A[j,1], e = A[j,2]; if( p==2, if( e<3, e, 2^(e-2) + 2), 1 + p^(e-1) * (p-1) / 2))); A = (1 - x)^ -A + x * O(x^m); w = vector(n); for(i=0, m, w[k^i] = polcoeff(A, i)); v = dirmul(v, w)); v[n])}; /* Michael Somos, May 26 2014 */

Extensions

New definition by Michel Marcus, May 12 2014
Definition edited by N. J. A. Sloane, May 26 2014

A242649 Dirichlet g.f.: Product_{n>=2} 1/(1-1/n^s)^d(n), where d(n) = A000005(n) is the number of divisors of n.

Original entry on oeis.org

1, 2, 2, 6, 2, 8, 2, 14, 6, 8, 2, 26, 2, 8, 8, 33, 2, 26, 2, 26, 8, 8, 2, 72, 6, 8, 14, 26, 2, 40, 2, 70, 8, 8, 8, 95, 2, 8, 8, 72, 2, 40, 2, 26, 26, 8, 2, 184, 6, 26, 8, 26, 2, 72, 8, 72, 8, 8, 2, 148, 2, 8, 26, 149, 8, 40, 2, 26, 8, 40, 2, 282, 2, 8, 26
Offset: 1

Views

Author

N. J. A. Sloane, May 26 2014

Keywords

Crossrefs

Programs

  • PARI
    \\ Based on Michael Somos's code for A007896
    n=101;
    v = vector(n, k, k==1);
    for(k=2, n, m = #digits(n, k) - 1; A = (1 - x)^ -(sigma(k,0)) + x * O(x^m); w = vector(n); for(i=0, m, w[k^i] = polcoeff(A, i)); v = dirmul(v, w));
    v

A175378 G.f. x^4*(2*x^2-1)/( (x^2-1)*(x^2+x-1)*(2*x^3-2*x^2+2*x-1) ).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 5, 8, 14, 26, 45, 75, 125, 212, 358, 598, 993, 1651, 2745, 4552, 7526, 12426, 20501, 33787, 55605, 91404, 150118, 246350, 403929, 661763, 1083393, 1772512, 2898182, 4735938, 7734765, 12626059, 20600733, 33597188, 54769606
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Crossrefs

Programs

  • Magma
    I:=[0, 0, 0, 0, 1, 3, 5]; [n le 7 select I[n] else 3*Self(n-1) - 2*Self(n-2) - Self(n-3) + 3*Self(n-4) - 4*Self(n-5) + 2*Self(n-7): n in [1..40]]; // Vincenzo Librandi, Dec 20 2012
  • Mathematica
    LinearRecurrence[{3,-2,-1,3,-4,0,2},{0,0,0,0,1,3,5},40] (* Harvey P. Dale, Mar 07 2012 *)
    CoefficientList[Series[x^4*(2*x^2 - 1)/((x^2 - 1)*(x^2 + x - 1)*(2*x^3 - 2*x^2 + 2*x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 20 2012 *)

Formula

a(n) = 3*a(n-1) -2*a(n-2) -a(n-3) +3*a(n-4) -4*a(n-5) +2*a(n-7).

A242648 Dirichlet g.f.: Product_{n>=2} 1/(1-1/n^s)^sigma(n).

Original entry on oeis.org

1, 3, 4, 13, 6, 24, 8, 46, 23, 36, 12, 116, 14, 48, 48, 161, 18, 156, 20, 174, 64, 72, 24, 484, 52, 84, 112, 232, 30, 360, 32, 526, 96, 108, 96, 841, 38, 120, 112, 726, 42, 480, 44, 348, 312, 144, 48, 1864, 93, 357, 144, 406, 54, 888, 144, 968, 160, 180
Offset: 1

Views

Author

N. J. A. Sloane, May 26 2014

Keywords

Crossrefs

Programs

  • PARI
    \\ Based on Michael Somos's code for A007896
    n=101;
    v = vector(n, k, k==1);
       for(k=2, n, m = #digits(n, k) - 1; A = (1 - x)^ -(sigma(k)) + x * O(x^m); w = vector(n); for(i=0, m, w[k^i] = polcoeff(A, i)); v = dirmul(v, w));
    v

A344298 Dirichlet g.f.: Product_{k>=2} (1 + k^(-s))^(9^(k-1)).

Original entry on oeis.org

1, 9, 81, 765, 6561, 59778, 531441, 4789614, 43049961, 387479538, 3486784401, 31381653015, 282429536481, 2541870611298, 22876792986402, 205891175433096, 1853020188851841, 16677182091899187, 150094635296999121, 1350851721164795655, 12157665459099975522, 109418989162893418818
Offset: 1

Views

Author

Ilya Gutkovskiy, May 14 2021

Keywords

Crossrefs

Programs

  • Mathematica
    dircon[v_, w_] := Module[{lv = Length[v], lw = Length[w], fv, fw}, fv[n_] := If[n <= lv, v[[n]], 0]; fw[n_] := If[n <= lw, w[[n]], 0]; Table[ DirichletConvolve[fv[n], fw[n], n, m], {m, Min[lv, lw]}]];
    a[n_] := Module[{A, v, w, m}, If[n<1, 0, v = Table[Boole[k == 1], {k, n}]; For[k = 2, k <= n, k++, m = Length[IntegerDigits[n, k]] - 1; A = (1 + x)^(9^(k - 1)) + x*O[x]^m // Normal; w = Table[0, {n}]; For[i = 0, i <= m, i++, w[[k^i]] = Coefficient[A, x, i]]; v = dircon[v, w]]; v[[n]]]];
    Array[a, 22] (* after Jean-François Alcover in A007896 *)
Showing 1-9 of 9 results.