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

A378655 Dirichlet convolution of A153881 with the Dirichlet inverse of A103977.

Original entry on oeis.org

1, -2, -3, 0, -5, 6, -7, 0, 0, 10, -11, -4, -13, 14, 15, 0, -17, -4, -19, -2, 21, 22, -23, 0, 0, 26, 0, 0, -29, -42, -31, 0, 33, 34, 35, 12, -37, 38, 39, -4, -41, -54, -43, 0, 0, 46, -47, 0, 0, 0, 51, 0, -53, 8, 55, -8, 57, 58, -59, 34, -61, 62, 0, 0, 65, -78, -67, 0, 69, -74, -71, -8, -73, 74, 0, 0, 77, -90, -79, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2024

Keywords

Crossrefs

Cf. A055615, A103977, A153881, A263837, A378643, A378647 (Dirichlet inverse).

Programs

Formula

a(n) = Sum_{d|n} A153881(d)*A378643(n/d).
a(n) = A055615(n) when n is a non-abundant number (A263837), and also for some subset of the abundant numbers, A005101.

A156826 Square array read by antidiagonals up: same as A126988 except that the first row is A153881.

Original entry on oeis.org

1, 2, -1, 3, 1, -1, 4, -1, 0, -1, 5, 2, 1, 0, -1, 6, -2, -1, 0, 0, -1, 7, 3, -1, 1, 0, 0, -1, 8, -3, 2, -1, 0, 0, 0, -1, 9, 4, -2, -1, 1, 0, 0, 0, -1, 10, -4, -2, -1, -1, 0, 0, 0, 0, -1, 11, 5, 3, 2, -1, 1, 0, 0, 0, 0, -1, 12, -5, -3, -2, -1, -1, 0, 0, 0, 0, 0, -1, 13, 6, -3, -2, -1, -1, 1, 0, 0
Offset: 1

Views

Author

Mats Granvik, Feb 16 2009

Keywords

Comments

Replace the zeros with -n/k. That is, the fraction of the row index divided by the column index with a negative sign. Then swap the element in the lower right corner with the element in the upper right corner and calculate the determinant. The result appears to be sequence A156827.

Examples

			Table begins:
   1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ...
   2,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   3,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   4,  2,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   5,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0, ...
   6,  3,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0, ...
   7,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0, ...
   8,  4,  0,  2,  0,  0,  0,  1,  0,  0,  0,  0,  0, ...
   9,  0,  3,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0, ...
  10,  5,  0,  0,  2,  0,  0,  0,  0,  1,  0,  0,  0, ...
  11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, ...
  12,  6,  4,  3,  0,  2,  0,  0,  0,  0,  0,  1,  0, ...
  13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, ...
		

Crossrefs

Programs

  • Excel
    =rounddown(if(mod(row();column())=0;row()/column();-row()/column())*if(row()=1;column();1);0)
    
  • Excel
    with fractions: =if(mod(row();column())=0;row()/column();-row()/column())*if(row()=1;column();1)

A177767 Triangle read by rows: T(n,k) = binomial(n - 1, k - 1), 1 <= k <= n, and T(n,0) = A153881(n+1), n >= 0.

Original entry on oeis.org

1, -1, 1, -1, 1, 1, -1, 1, 2, 1, -1, 1, 3, 3, 1, -1, 1, 4, 6, 4, 1, -1, 1, 5, 10, 10, 5, 1, -1, 1, 6, 15, 20, 15, 6, 1, -1, 1, 7, 21, 35, 35, 21, 7, 1, -1, 1, 8, 28, 56, 70, 56, 28, 8, 1, -1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, -1, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1
Offset: 0

Views

Author

Roger L. Bagula, May 13 2010

Keywords

Comments

Row sums yield A000225 preceded by 1.
Except for signs, this is A135225.

Examples

			Triangle begins:
   1;
  -1, 1;
  -1, 1, 1;
  -1, 1, 2,  1;
  -1, 1, 3,  3,  1;
  -1, 1, 4,  6,  4,   1;
  -1, 1, 5, 10, 10,   5,   1;
  -1, 1, 6, 15, 20,  15,   6,  1;
  -1, 1, 7, 21, 35,  35,  21,  7,  1;
  -1, 1, 8, 28, 56,  70,  56, 28,  8, 1;
  -1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1;
   ...
		

Crossrefs

Programs

  • Magma
    A177767:= func< n,k | k eq n select 1 else  k eq 0 select -1 else Binomial(n-1, k-1) >;
    [A177767(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Apr 22 2024
    
  • Mathematica
    Flatten[Table[If[n == 0, {1}, CoefficientList[x*(1 + x)^( n - 1) - 1, x]], {n, 0, 10}]]
  • Maxima
    T(n, k) := if k = 0 then 2*floor(1/(n + 1)) - 1 else binomial(n - 1, k - 1)$
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Oct 23 2018 */
    
  • SageMath
    flatten([[binomial(n-1, k-1) - int(k==0) + 2*int(n==0) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 22 2024

Formula

Row n = coefficients in the expansion of x*(1 + x)^(n - 1) - 1, n > 0.
From Franck Maminirina Ramaharo, Oct 23 2018: (Start)
G.f.: (1 - 3*y + (2 + x)*y^2)/(1 - (2 + x)*y + (1 + x)*y^2).
E.g.f.: (2 + x - (1 + x)*exp(y) + x*exp((1 + x)*y))/(1 + x). (End)
From G. C. Greubel, Apr 22 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A153881(n+1) - [n=1].
Sum_{k=0..floor(n/2)} T(n-k, k) = A000071(n-1) + [n=0].
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = -A131026(n-1) + [n=0]. (End)

Extensions

Edited and new name by Franck Maminirina Ramaharo, Oct 23 2018

A002033 Number of perfect partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 8, 1, 3, 3, 8, 1, 8, 1, 8, 3, 3, 1, 20, 2, 3, 4, 8, 1, 13, 1, 16, 3, 3, 3, 26, 1, 3, 3, 20, 1, 13, 1, 8, 8, 3, 1, 48, 2, 8, 3, 8, 1, 20, 3, 20, 3, 3, 1, 44, 1, 3, 8, 32, 3, 13, 1, 8, 3, 13, 1, 76, 1, 3, 8, 8, 3, 13, 1, 48, 8, 3, 1, 44, 3, 3, 3, 20, 1, 44, 3, 8, 3, 3, 3, 112
Offset: 0

Views

Author

Keywords

Comments

A perfect partition of n is one which contains just one partition of every number less than n when repeated parts are regarded as indistinguishable. Thus 1^n is a perfect partition for every n; and for n = 7, 4 1^3, 4 2 1, 2^3 1 and 1^7 are all perfect partitions. [Riordan]
Also number of ordered factorizations of n+1, see A074206.
Also number of gozinta chains from 1 to n (see A034776). - David W. Wilson
a(n) is the permanent of the n X n matrix with (i,j) entry = 1 if j|i+1 and = 0 otherwise. For n=3 the matrix is {{1, 1, 0}, {1, 0, 1}, {1, 1, 0}} with permanent = 2. - David Callan, Oct 19 2005
Appears to be the number of permutations that contribute to the determinant that gives the Moebius function. Verified up to a(9). - Mats Granvik, Sep 13 2008
Dirichlet inverse of A153881 (assuming offset 1). - Mats Granvik, Jan 03 2009
Equals row sums of triangle A176917. - Gary W. Adamson, Apr 28 2010
A partition is perfect iff it is complete (A126796) and knapsack (A108917). - Gus Wiseman, Jun 22 2016
a(n) is also the number of series-reduced planted achiral trees with n + 1 unlabeled leaves, where a rooted tree is series-reduced if all terminal subtrees have at least two branches, and achiral if all branches directly under any given node are equal. Also Moebius transform of A067824. - Gus Wiseman, Jul 13 2018

Examples

			n=0: 1 (the empty partition)
n=1: 1 (1)
n=2: 1 (11)
n=3: 2 (21, 111)
n=4: 1 (1111)
n=5: 3 (311, 221, 11111)
n=6: 1 (111111)
n=7: 4 (4111, 421, 2221, 1111111)
From _Gus Wiseman_, Jul 13 2018: (Start)
The a(11) = 8 series-reduced planted achiral trees with 12 unlabeled leaves:
  (oooooooooooo)
  ((oooooo)(oooooo))
  ((oooo)(oooo)(oooo))
  ((ooo)(ooo)(ooo)(ooo))
  ((oo)(oo)(oo)(oo)(oo)(oo))
  (((ooo)(ooo))((ooo)(ooo)))
  (((oo)(oo)(oo))((oo)(oo)(oo)))
  (((oo)(oo))((oo)(oo))((oo)(oo)))
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126, see #27.
  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 141.
  • D. E. Knuth, The Art of Computer Programming, Pre-Fasc. 3b, Sect. 7.2.1.5, no. 67, p. 25.
  • P. A. MacMahon, The theory of perfect partitions and the compositions of multipartite numbers, Messenger Math., 20 (1891), 103-119.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 123-124.
  • 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

Same as A074206, up to the offset and initial term there.
Cf. A176917.
For parity see A008966.

Programs

  • Maple
    a := array(1..150): for k from 1 to 150 do a[k] := 0 od: a[1] := 1: for j from 2 to 150 do for m from 1 to j-1 do if j mod m = 0 then a[j] := a[j]+a[m] fi: od: od: for k from 1 to 150 do printf(`%d,`,a[k]) od: # James Sellers, Dec 07 2000
    # alternative
    A002033 := proc(n)
        option remember;
        local a;
        if n <= 2 then
            return 1;
        else
            a := 0 ;
            for i from 0 to n-1 do
                if modp(n+1,i+1) = 0 then
                    a := a+procname(i);
                end if;
            end do:
        end if;
        a ;
    end proc: # R. J. Mathar, May 25 2017
  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] = a /@ Most[Divisors[n]] // Total; a /@ Range[96]  (* Jean-François Alcover, Apr 06 2011, updated Sep 23 2014. NOTE: This produces A074206(n) = a(n-1). - M. F. Hasler, Oct 12 2018 *)
  • PARI
    A002033(n) = if(n,sumdiv(n+1,i,if(i<=n,A002033(i-1))),1) \\ Michael B. Porter, Nov 01 2009, corrected by M. F. Hasler, Oct 12 2018
    
  • Python
    from functools import lru_cache
    from sympy import divisors
    @lru_cache(maxsize=None)
    def A002033(n):
        if n <= 1:
            return 1
        return sum(A002033(i-1) for i in divisors(n+1,generator=True) if i <= n) # Chai Wah Wu, Jan 12 2022

Formula

From David Wasserman, Nov 14 2006: (Start)
a(n-1) = Sum_{i|d, i < n} a(i-1).
a(p^k-1) = 2^(k-1).
a(n-1) = A067824(n)/2 for n > 1.
a(A122408(n)-1) = A122408(n)/2. (End)
a(A025487(n)-1) = A050324(n). - R. J. Mathar, May 26 2017
a(n) = (A253249(n+1)+1)/4, n > 0. - Geoffrey Critzer, Aug 19 2020

Extensions

Edited by M. F. Hasler, Oct 12 2018

A001003 Schroeder's second problem (generalized parentheses); also called super-Catalan numbers or little Schroeder numbers.

Original entry on oeis.org

1, 1, 3, 11, 45, 197, 903, 4279, 20793, 103049, 518859, 2646723, 13648869, 71039373, 372693519, 1968801519, 10463578353, 55909013009, 300159426963, 1618362158587, 8759309660445, 47574827600981, 259215937709463, 1416461675464871
Offset: 0

Views

Author

Keywords

Comments

If you are looking for the Schroeder numbers (a.k.a. large Schroder numbers, or big Schroeder numbers), see A006318.
Yang & Jiang (2021) call these the small 2-Schroeder numbers. - N. J. A. Sloane, Mar 28 2021
There are two schools of thought about the index for the first term. I prefer the indexing a(0) = a(1) = 1, a(2) = 3, a(3) = 11, etc.
a(n) is the number of ways to insert parentheses in a string of n+1 symbols. The parentheses must be balanced but there is no restriction on the number of pairs of parentheses. The number of letters inside a pair of parentheses must be at least 2. Parentheses enclosing the whole string are ignored.
Also length of list produced by a variant of the Catalan producing iteration: replace each integer k with the list 0,1,..,k,k+1,k,...,1,0 and get the length a(n) of the resulting (flattened) list after n iterations. - Wouter Meeussen, Nov 11 2001
Stanley gives several other interpretations for these numbers.
Number of Schroeder paths of semilength n (i.e., lattice paths from (0,0) to (2n,0), with steps H=(2,0), U=(1,1) and D(1,-1) and not going below the x-axis) with no peaks at level 1. Example: a(2)=3 because among the six Schroeder paths of semilength two HH, UHD, UUDD, HUD, UDH and UDUD, only the first three have no peaks at level 1. - Emeric Deutsch, Dec 27 2003
a(n+1) is the number of Dyck n-paths in which the interior vertices of the ascents are colored white or black. - David Callan, Mar 14 2004
Number of possible schedules for n time slots in the first-come first-served (FCFS) printer policy.
Also row sums of A086810, A033282, A126216. - Philippe Deléham, May 09 2004
a(n+1) is the number of pairs (u,v) of same-length compositions of n, 0's allowed in u but not in v and u dominates v (meaning u_1 >= v_1, u_1 + u_2 >= v_1 + v_2 and so on). For example, with n=2, a(3) counts (2,2), (1+1,1+1), (2+0,1+1). - David Callan, Jul 20 2005
The big Schroeder number (A006318) is the number of Schroeder paths from (0,0) to (n,n) (subdiagonal paths with steps (1,0) (0,1) and (1,1)). These paths fall in two classes: those with steps on the main diagonal and those without. These two classes are equinumerous and the number of paths in either class is the little Schroeder number a(n) (half the big Schroeder number). - Marcelo Aguiar (maguiar(AT)math.tamu.edu), Oct 14 2005
With offset 0, a(n) = number of (colored) Motzkin (n-1)-paths with each upstep U getting one of 2 colors and each flatstep F getting one of 3 colors. Example. With their colors immediately following upsteps/flatsteps, a(2) = 3 counts F1, F2, F3 and a(3)=11 counts U1D, U2D, F1F1, F1F2, F1F3, F2F1, F2F2, F2F3, F3F1, F3F2, F3F3. - David Callan, Aug 16 2006
Shifts left when INVERT transform applied twice. - Alois P. Heinz, Apr 01 2009
Number of increasing tableaux of shape (n,n). An increasing tableau is a semistandard tableaux with strictly increasing rows and columns, and set of entries an initial segment of the positive integers. Example: a(2) = 3 because of the three tableaux (12)(34), (13)(24), (12)(23). - Oliver Pechenik, Apr 22 2014
Number of ordered trees with no vertex of outdegree 1 and having n+1 leaves (called sometimes Schröder trees). - Emeric Deutsch, Dec 13 2014
Number of dissections of a convex (n+2)-gon by nonintersecting diagonals. Example: a(2)=3 because for a square ABCD we have (i) no diagonal, (ii) dissection with diagonal AC, and (iii) dissection with diagonal BD. - Emeric Deutsch, Dec 13 2014
The little Schroeder numbers are the moments of the Marchenko-Pastur law for the case c=2 (although the moment m0 is 1/2 instead of 1): 1/2, 1, 3, 11, 45, 197, 903, ... - Jose-Javier Martinez, Apr 07 2015
Number of generalized Motzkin paths with no level steps at height 0, from (0,0) to (2n,0), and consisting of steps U=(1,1), D=(1,-1) and H2=(2,0). For example, for n=3, we have the 11 paths: UDUDUD, UUDDUD, UDUUDD, UH2DUD, UDUH2D, UH2H2D, UUDUDD, UUUDDD, UUH2DD, UUDH2D, UH2UDD. - José Luis Ramírez Ramírez, Apr 20 2015
REVERT transform of A225883. - Vladimir Reshetnikov, Oct 25 2015
Total number of (nonempty) faces of all dimensions in the associahedron K_{n+1} of dimension n-1. For example, K_4 (a pentagon) includes 5 vertices and 5 edges together with K_4 itself (5 + 5 + 1 = 11), while K_5 includes 14 vertices, 21 edges and 9 faces together with K_5 itself (14 + 21 + 9 + 1 = 45). - Noam Zeilberger, Sep 17 2018
a(n) is the number of interval posets of permutations with n minimal elements that have exactly two realizers, up to a shift by 1 in a(4). See M. Bouvel, L. Cioni, B. Izart, Theorem 17 page 13. - Mathilde Bouvel, Oct 21 2021
a(n) is the number of sequences of nonnegative integers (u_1, u_2, ..., u_n) such that (i) u_1 = 1, (ii) u_i <= i for all i, (iii) the nonzero u_i are weakly increasing. For example, a(2) = 3 counts 10, 11, 12, and a(3) = 11 counts 100, 101, 102, 103, 110, 111, 112, 113, 120, 122, 123. See link below. - David Callan, Dec 19 2021
a(n) is the number of parking functions of size n avoiding the patterns 132 and 213. - Lara Pudwell, Apr 10 2023
a(n+1) is the number of Schroeder paths from (0,0) to (2n,0) in which level steps at height 0 come in 2 colors. - Alexander Burstein, Jul 23 2023

Examples

			G.f. = 1 + x + 3*x^2 + 11*x^3 + 45*x^4 + 197*x^5 + 903*x^6 + 4279*x^7 + ...
a(2) = 3: abc, a(bc), (ab)c; a(3) = 11: abcd, (ab)cd, a(bc)d, ab(cd), (ab)(cd), a(bcd), a(b(cd)), a((bc)d), (abc)d, (a(bc))d, ((ab)c)d.
Sum over partitions formula: a(3) = 2*a(0)*a(2) + 1*a(1)^2 + 3*(a(0)^2)*a(1) + 1*a(0)^4 = 6 + 1 + 3 + 1 = 11.
a(4) = 45 since the top row of Q^3 = (11, 14, 12, 8, 0, 0, 0, ...); (11 + 14 + 12 + 8) = 45.
		

References

  • D. Arques and A. Giorgetti, Une bijection géometrique entre une famille d'hypercartes et une famille de polygones énumérées par la série de Schroeder, Discrete Math., 217 (2000), 17-32.
  • Paul Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
  • N. Bernasconi et al., On properties of random dissections and triangulations, Combinatorica, 30 (6) (2010), 627-654.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 618.
  • Peter J. Cameron, Some treelike objects. Quart. J. Math. Oxford Ser. (2) 38 (1987), no. 150, 155--183. MR0891613 (89a:05009). See p. 155, also p. 179, line -9. - N. J. A. Sloane, Apr 18 2014
  • C. Coker, A family of eigensequences, Discrete Math. 282 (2004), 249-250.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 57.
  • D. E. Davenport, L. W. Shapiro and L. C. Woodson, The Double Riordan Group, The Electronic Journal of Combinatorics, 18(2) (2012), #P33. - From N. J. A. Sloane, May 11 2012
  • Emeric Deutsch, A bijective proof of an equation linking the Schroeder numbers, large and small, Discrete Math., 241 (2001), 235-240.
  • Tomislav Doslic and Darko Veljan, Logarithmic behavior of some combinatorial sequences. Discrete Math. 308 (2008), no. 11, 2182--2212. MR2404544 (2009j:05019) - From N. J. A. Sloane, May 01 2012
  • Michael Drmota, Anna de Mier, and Marc Noy, Extremal statistics on non-crossing configurations. Discrete Math. 327 (2014), 103--117. MR3192420. See Eq. (2). - N. J. A. Sloane, May 18 2014
  • I. M. H. Etherington, On non-associative combinations, Proc. Royal Soc. Edinburgh, 59 (Part 2, 1938-39), 153-162.
  • I. M. H. Etherington, Some problems of non-associative combinations (I), Edinburgh Math. Notes, 32 (1940), pp. i-vi. Part II is by A. Erdelyi and I. M. H. Etherington, and is on pages vii-xiv of the same issue.
  • P. Flajolet and M. Noy, Analytic combinatorics of non-crossing permutations, Discrete Math., 204 (1999), 203-229, Section 3.1.
  • D. Foata and D. Zeilberger, A classic proof of a recurrence for a very classical sequence, J. Comb Thy A 80 380-384 1997.
  • Wolfgang Gatterbauer and Dan Suciu, Dissociation and propagation for approximate lifted inference with standard relational database management systems, The VLDB Journal, February 2017, Volume 26, Issue 1, pp. 5-30; DOI 10.1007/s00778-016-0434-5
  • Ivan Geffner and Marc Noy, Counting Outerplanar Maps, Electronic Journal of Combinatorics 24(2) (2017), #P2.3.
  • D. Gouyou-Beauchamps and B. Vauquelin, Deux propriétés combinatoires des nombres de Schroeder, Theor. Inform. Appl., 22 (1988), 361-388.
  • N. S. S. Gu, N. Y. Li and T. Mansour, 2-Binary trees: bijections and related issues, Discr. Math., 308 (2008), 1209-1221.
  • P.-Y. Huang, S.-C. Liu, and Y.-N. Yeh, Congruences of Finite Summations of the Coefficients in certain Generating Functions, The Electronic Journal of Combinatorics, 21 (2014), #P2.45.
  • M. Klazar, On numbers of Davenport-Schinzel sequences, Discr. Math., 185 (1998), 77-87.
  • D. E. Knuth, The Art of Computer Programming, Vol. 1, various sections (e.g. p. 534 of 2nd ed.).
  • D. E. Knuth, The Art of Computer Programming, Vol. 1, (p. 539 of 3rd ed.).
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.2.1.6, Problem 66, p. 479.
  • J. S. Lew, Polynomial enumeration of multidimensional lattices, Math. Systems Theory, 12 (1979), 253-270.
  • Ana Marco and J.-J. Martinez, A total positivity property of the Marchenko-Pastur Law, Electronic Journal of Linear Algebra, 30 (2015), #7.
  • T. S. Motzkin, Relations between hypersurface cross ratios and a combinatorial formula for partitions of a polygon, for permanent preponderance and for non-associative products, Bull. Amer. Math. Soc., 54 (1948), 352-360.
  • L. Ozsvart, Counting ordered graphs that avoid certain subgraphs, Discr. Math., 339 (2016), 1871-1877.
  • R. C. Read, On general dissections of a polygon, Aequat. Mathem. 18 (1978) 370-388, Table 6
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 168.
  • E. Schroeder, Vier combinatorische Probleme, Zeit. f. Math. Phys., 15 (1870), 361-376.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see page 178; see page 239, Exercise 6.39b.
  • H. N. V. Temperley and D. G. Rogers, A note on Baxter's generalization of the Temperley-Lieb operators, pp. 324-328 of Combinatorial Mathematics (Canberra, 1977), Lect. Notes Math. 686, 1978.
  • I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 198.
  • Sheng-Liang Yang and Mei-yang Jiang, The m-Schröder paths and m-Schröder numbers, Disc. Math. (2021) Vol. 344, Issue 2, 112209. doi:10.1016/j.disc.2020.112209. See Table 1.

Crossrefs

See A000081, A000108, A001190, A001699, for other ways to count parentheses.
Row sums of A033282, A033877, A086810, A126216.
Right-hand column 1 of convolution triangle A011117.
Column 1 of A336573. Column 0 of A104219.
The sequences listed in Yang-Jiang's Table 1 appear to be A006318, this sequence, A027307, A034015, A144097, A243675, A260332, A243676. - N. J. A. Sloane, Mar 28 2021
Cf. A006318 (Schroeder numbers).

Programs

  • Haskell
    a001003 = last . a144944_row  -- Reinhard Zumkeller, May 11 2013
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 50);
    Coefficients(R!( (1+x -Sqrt(1-6*x+x^2) )/(4*x) )); // G. C. Greubel, Oct 27 2024
  • Maple
    t1 := (1/(4*x))*(1+x-sqrt(1-6*x+x^2)); series(t1,x,40);
    invtr:= proc(p) local b; b:= proc(n) option remember; local i; `if`(n<1, 1, add(b(n-i) *p(i-1), i=1..n+1)) end end: a:='a': f:= (invtr@@2)(a): a:= proc(n) if n<0 then 1 else f(n-1) fi end: seq(a(n), n=0..30); # Alois P. Heinz, Apr 01 2009
    # Computes n -> [a[0],a[1],..,a[n]]
    A001003_list := proc(n) local j,a,w; a := array(0..n); a[0] := 1;
    for w from 1 to n do a[w] := a[w-1]+2*add(a[j]*a[w-j-1],j=1..w-1) od;
    convert(a,list) end: A001003_list(100); # Peter Luschny, May 17 2011
  • Mathematica
    Table[Length[Flatten[Nest[ #/.a_Integer:> Join[Range[0, a + 1], Range[a, 0, -1]] &, {0}, n]]], {n, 0, 10}]; Sch[ 0 ] = Sch[ 1 ] = 1; Sch[ n_Integer ] := Sch[ n ] = (3(2n - 1)Sch[ n - 1 ] - (n - 2)Sch[ n - 2 ])/(n + 1); Array[ Sch, 24, 0]
    (* Second program: *)
    a[n_] := Hypergeometric2F1[-n + 1, n + 2, 2, -1]; a[0] = 1; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Nov 09 2011, after Vladeta Jovovic *)
    a[ n_] := SeriesCoefficient[ (1 + x - Sqrt[1 - 6 x + x^2]) / (4 x), {x, 0, n}]; (* Michael Somos, Aug 26 2015 *)
    Table[(KroneckerDelta[n] - GegenbauerC[n+1, -1/2, 3])/4, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 25 2015 *)
    a[n_] := -LegendreP[n, -1, 2, 3] I / Sqrt[2]; a[0] = 1;
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 16 2019 *)
    a[1]:=1; a[2]:=1; a[n_]:=a[n] = a[n-1]+2 Sum[a[k] a[n-k], {k,2,n-1}]; Map[a, Range[24]] (* Oliver Seipel, Nov 03 2024, after Schröder 1870 *)
    CoefficientList[InverseSeries[Series[x/(Series[(1 - x)/(1 - 2  x), {x, 0, 24}]), {x, 0, 24}]]/x, x] (* Mats Granvik, Jun 30 2025 *)
  • PARI
    {a(n) = if( n<1, n==0, sum( k=0, n, 2^k * binomial(n, k) * binomial(n, k-1) ) / (2*n))}; /* Michael Somos, Mar 31 2007 */
    
  • PARI
    {a(n) = my(A); if( n<1, n==0, n--; A = x * O(x^n); n! * simplify( polcoef( exp(3*x + A) * besseli(1, 2*x * quadgen(8) + A), n)))}; /* Michael Somos, Mar 31 2007 */
    
  • PARI
    {a(n) = if( n<0, 0, n++; polcoef( serreverse( (x - 2*x^2) / (1 - x) + x * O(x^n)), n))}; /* Michael Somos, Mar 31 2007 */
    
  • PARI
    N=30; x='x+O('x^N); Vec( (1+x-(1-6*x+x^2)^(1/2))/(4*x) ) \\ Hugo Pfoertner, Nov 19 2018
    
  • Python
    # The objective of this implementation is efficiency.
    # n -> [a(0), a(1), ..., a(n)]
    def A001003_list(n):
        a = [0 for i in range(n)]
        a[0] = 1
        for w in range(1, n):
            s = 0
            for j in range(1, w):
                s += a[j]*a[w-j-1]
            a[w] = a[w-1]+2*s
        return a
    # Peter Luschny, May 17 2011
    
  • Python
    from gmpy2 import divexact
    A001003 = [1, 1]
    for n in range(3,10**3):
        A001003.append(divexact(A001003[-1]*(6*n-9)-(n-3)*A001003[-2],n))
    # Chai Wah Wu, Sep 01 2014
    
  • Sage
    # Generalized algorithm of L. Seidel
    def A001003_list(n) :
        D = [0]*(n+1); D[1] = 1/2
        b = True; h = 2; R = [1]
        for i in range(2*n-2) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1;
            else :
                for k in range(1,h, 1) : D[k] += D[k-1]
                R.append(D[h-1]);
            b = not b
        return R
    A001003_list(24) # Peter Luschny, Jun 02 2012
    

Formula

D-finite with recurrence: (n+1) * a(n) = (6*n-3) * a(n-1) - (n-2) * a(n-2) if n>1. a(0) = a(1) = 1.
a(n) = 3*a(n-1) + 2*A065096(n-2) (n>2). If g(x) = 1 + 3*x + 11*x^2 + 45*x^3 + ... + a(n)*x^n + ..., then g(x) = 1 + 3(x*g(x)) + 2(x*g(x))^2, g(x)^2 = 1 + 6*x + 31*x^2 + 156*x^3 + ... + A065096(n)*x^n + ... - Paul D. Hanna, Jun 10 2002
a(n+1) = -a(n) + 2*Sum_{k=1..n} a(k)*a(n+1-k). - Philippe Deléham, Jan 27 2004
a(n-2) = (1/(n-1))*Sum_{k=0..n-3} binomial(n-1,k+1)*binomial(n-3,k)*2^(n-3-k) for n >= 3 [G. Polya, Elemente de Math., 12 (1957), p. 115.] - N. J. A. Sloane, Jun 13 2015
G.f.: (1 + x - sqrt(1 - 6*x + x^2) )/(4*x) = 2/(1 + x + sqrt(1 - 6*x + x^2)).
a(n) ~ W*(3+sqrt(8))^n*n^(-3/2) where W = (1/4)*sqrt((sqrt(18)-4)/Pi) [See Knuth I, p. 534, or Perez. Note that the formula on line 3, page 475 of Flajolet and Sedgewick seems to be wrong - it has to be multiplied by 2^(1/4).] - N. J. A. Sloane, Apr 10 2011
The correct asymptotic for this sequence is a(n) ~ W*(3+sqrt(8))^n*n^(-3/2), where W = (1+sqrt(2))/(2*2^(3/4)*sqrt(Pi)) = 0.404947065905750651736243... Result in book by D. Knuth (p. 539 of 3rd edition, exercise 12) is for sequence b(n), but a(n) = b(n+1)/2. Therefore is asymptotic a(n) ~ b(n) * (3+sqrt(8))/2. - Vaclav Kotesovec, Sep 09 2012
The Hankel transform of this sequence gives A006125 = 1, 1, 2, 8, 64, 1024, ...; example: det([1, 1, 3, 11; 1, 3, 11, 45; 3, 11, 45, 197; 11, 45, 197, 903]) = 2^6 = 64. - Philippe Deléham, Mar 02 2004
a(n+1) = Sum_{k=0..floor((n-1)/2)} 2^k * 3^(n-1-2k) * binomial(n-1, 2k) * Catalan(k). This formula counts colored Dyck paths by the same parameter by which Touchard's identity counts ordinary Dyck paths: number of DDUs (U=up step, D=down step). See also Gouyou-Beauchamps reference. - David Callan, Mar 14 2004
From Paul Barry, May 24 2005: (Start)
a(n) = (1/(n+1))*Sum_{k=0..n} C(n+1, k)*C(2n-k, n)*(-1)^k*2^(n-k) [with offset 0].
a(n) = (1/(n+1))*Sum_{k=0..n} C(n+1, k+1)*C(n+k, k)*(-1)^(n-k)*2^k [with offset 0].
a(n) = Sum_{k=0..n} (1/(k+1))*C(n, k)*C(n+k, k)*(-1)^(n-k)*2^k [with offset 0].
a(n) = Sum_{k=0..n} A088617(n, k)*(-1)^(n-k)*2^k [with offset 0]. (End)
E.g.f. of a(n+1) is exp(3*x)*BesselI(1, 2*sqrt(2)*x)/(sqrt(2)*x). - Vladeta Jovovic, Mar 31 2004
Reversion of (x-2*x^2)/(1-x) is g.f. offset 1.
For n>=1, a(n) = Sum_{k=0..n} 2^k*N(n, k) where N(n, k) = (1/n)*C(n, k)*C(n, k+1) are the Narayana numbers (A001263). - Benoit Cloitre, May 10 2003 [This formula counts colored Dyck paths by number of peaks, which is easy to see because the Narayana numbers count Dyck paths by number of peaks and the number of peaks determines the number of interior ascent vertices.]
a(n) = Sum_{k=0..n} A088617(n, k)*2^k*(-1)^(n-k). - Philippe Deléham, Jan 21 2004
For n > 0, a(n) = (1/(n+1)) * Sum_{k = 0 .. n-1} binomial(2*n-k, n) * binomial(n-1, k). This formula counts colored Dyck paths (as above) by number of white vertices. - David Callan, Mar 14 2004
a(n-1) = (d^(n-1)/dx^(n-1))((1-x)/(1-2*x))^n/n!|_{x=0}. (For a proof see the comment on the unsigned row sums of triangle A111785.)
From Wolfdieter Lang, Sep 12 2005: (Start)
a(n) = (1/n)*Sum_{k=1..n} binomial(n, k)*binomial(n+k, k-1).
a(n) = hypergeom([1-n, n+2], [2], -1), n>=1. (End)
a(n) = hypergeom([1-n, -n], [2], 2) for n>=0. - Peter Luschny, Sep 22 2014
a(m+n+1) = Sum_{k>=0} A110440(m, k)*A110440(n, k)*2^k = A110440(m+n, 0). - Philippe Deléham, Sep 14 2005
Sum over partitions formula (reference Schroeder paper p. 362, eq. (1) II). Number the partitions of n according to Abramowitz-Stegun pp. 831-832 (see reference under A105805) with k=1..p(n)= A000041(n). For n>=1: a(n-1) = Sum_{k=2..p(n)} A048996(n,k)*a(1)^e(k, 1)*a(1)^e(k, 2)*...*a(n-2)^e(k, n-1) if the k-th partition of n in the mentioned order is written as (1^e(k, 1), 2^e(k, 2), ..., (n-1)e(k, n-1)). Note that the first (k=1) partition (n^1) has to be omitted. - Wolfdieter Lang, Aug 23 2005
Starting (1, 3, 11, 45, ...), = row sums of triangle A126216 = A001263 * [1, 2, 4, 8, 16, ...]. - Gary W. Adamson, Nov 30 2007
From Paul Barry, May 15 2009: (Start)
G.f.: 1/(1+x-2x/(1+x-2x/(1+x-2x/(1+x-2x/(1-.... (continued fraction).
G.f.: 1/(1-x/(1-x-x/(1-x-x/(1-x-x/(1-... (continued fraction).
G.f.: 1/(1-x-2x^2/(1-3x-2x^2/(1-3x-2x^2/(1-... (continued fraction). (End)
G.f.: 1 / (1 - x / (1 - 2*x / (1 - x / (1 - 2*x / ... )))). - Michael Somos, May 19 2013
a(n) = (LegendreP(n+1,3)-3*LegendreP(n,3))/(4*n) for n>0. - Mark van Hoeij, Jul 12 2010 [This formula is mentioned in S.-J. Kettle's 1982 letter - see link. N. J. A. Sloane, Jun 13 2015]
From Gary W. Adamson, Jul 08 2011: (Start)
a(n) = upper left term in M^n, where M is the production matrix:
1, 1, 0, 0, 0, 0, ...
2, 2, 2, 0, 0, 0, ...
1, 1, 1, 1, 0, 0, ...
2, 2, 2, 2, 2, 0, ...
1, 1, 1, 1, 1, 1, ...
... (End)
From Gary W. Adamson, Aug 23 2011: (Start)
a(n) is the sum of top row terms of Q^(n-1), where Q is the infinite square production matrix:
1, 2, 0, 0, 0, ...
1, 1, 2, 0, 0, ...
1, 1, 1, 2, 0, ...
1, 1, 1, 1, 2, ...
... (End)
Let h(t) = (1-t)^2/(2*(1-t)^2-1) = 1/(1-(2*t+3*t^2+4*t^3+...)), an o.g.f. for A003480, then for A001003 a(n) = (1/n!)*((h(t)*d/dt)^n) t, evaluated at t=0, with initial n=1. (Cf. A086810.) - Tom Copeland, Sep 06 2011
A006318(n) = 2*a(n) if n>0. - Michael Somos, Mar 31 2007
BINOMIAL transform is A118376 with offset 0. REVERT transform is A153881. INVERT transform is A006318. INVERT transform of A114710. HANKEL transform is A139685. PSUM transform is A104858. - Michael Somos, May 19 2013
G.f.: 1 + x/(Q(0) - x) where Q(k) = 1 + k*(1-x) - x - x*(k+1)*(k+2)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) = A144944(n,n) = A186826(n,0). - Reinhard Zumkeller, May 11 2013
a(n)=(-1)^n*LegendreP(n,-1,-3)/sqrt(2), n > 0, LegendreP(n,a,b) is the Legendre function. - Karol A. Penson, Jul 06 2013
Integral representation as n-th moment of a positive weight function W(x) = W_a(x) + W_c(x), where W_a(x) = Dirac(x)/2, is the discrete (atomic) part, and W_c(x) = sqrt(8-(x-3)^2)/(4*Pi*x) is the continuous part of W(x) defined on (3 sqrt(8),3+sqrt(8)): a(n) = int( x^n*W_a(x), x=-eps..eps ) + int( x^n*W_c(x), x = 3-sqrt(8)..3+sqrt(8) ), for any eps>0, n>=0. W_c(x) is unimodal, of bounded variation and W_c(3-sqrt(8)) = W_c(3+sqrt(8)) = 0. Note that the position of the Dirac peak (x=0) lies outside support of W_c(x). - Karol A. Penson and Wojciech Mlotkowski, Aug 05 2013
G.f.: 1 + x/G(x) with G(x) = 1 - 3*x - 2*x^2/G(x) (continued fraction). - Nikolaos Pantelidis, Dec 17 2022

A074206 Kalmár's [Kalmar's] problem: number of ordered factorizations of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 8, 1, 3, 3, 8, 1, 8, 1, 8, 3, 3, 1, 20, 2, 3, 4, 8, 1, 13, 1, 16, 3, 3, 3, 26, 1, 3, 3, 20, 1, 13, 1, 8, 8, 3, 1, 48, 2, 8, 3, 8, 1, 20, 3, 20, 3, 3, 1, 44, 1, 3, 8, 32, 3, 13, 1, 8, 3, 13, 1, 76, 1, 3, 8, 8, 3, 13, 1, 48, 8, 3, 1, 44, 3, 3, 3, 20, 1, 44, 3, 8, 3, 3, 3, 112
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2003

Keywords

Comments

a(0)=0, a(1)=1; thereafter a(n) is the number of ordered factorizations of n as a product of integers greater than 1.
Kalmár (1931) seems to be the earliest reference that mentions this sequence (as opposed to A002033). - N. J. A. Sloane, May 05 2016
a(n) is the permanent of the n-1 X n-1 matrix A with (i,j) entry = 1 if j|i+1 and = 0 otherwise. This is because ordered factorizations correspond to nonzero elementary products in the permanent. For example, with n=6, 3*2 -> 1,3,6 [partial products] -> 6,3,1 [reverse list] -> (6,3)(3,1) [partition into pairs with offset 1] -> (5,3)(2,1) [decrement first entry] -> (5,3)(2,1)(1,2)(3,4)(4,5) [append pairs (i,i+1) to get a permutation] -> elementary product A(1,2)A(2,1)A(3,4)A(4,5)A(5,3). - David Callan, Oct 19 2005
This sequence is important in describing the amount of energy in all wave structures in the Universe according to harmonics theory. - Ray Tomes (ray(AT)tomes.biz), Jul 22 2007
a(n) appears to be the number of permutation matrices contributing to the Moebius function. See A008683 for more information. Also a(n) appears to be the Moebius transform of A067824. Furthermore it appears that except for the first term a(n)=A067824(n)*(1/2). Are there other sequences such that when the Moebius transform is applied, the new sequence is also a constant factor times the starting sequence? - Mats Granvik, Jan 01 2009
Numbers divisible by n distinct primes appear to have ordered factorization values that can be found in an n-dimensional summatory Pascal triangle. For example, the ordered factorization values for numbers divisible by two distinct primes can be found in table A059576. - Mats Granvik, Sep 06 2009
Inverse Mobius transform of A174725 and also except for the first term, inverse Mobius transform of A174726. - Mats Granvik, Mar 28 2010
a(n) is a lower bound on the worst-case number of solutions to the probed partial digest problem for n fragments of DNA; see the Newberg & Naor reference, below. - Lee A. Newberg, Aug 02 2011
All integers greater than 1 are perfect numbers over this sequence (for definition of A-perfect numbers, see comment to A175522). - Vladimir Shevelev, Aug 03 2011
If n is squarefree, then a(n) = A000670(A001221(n)) = A000670(A001222(n)). - Vladimir Shevelev and Franklin T. Adams-Watters, Aug 05 2011
A034776 lists the values taken by this sequence. - Robert G. Wilson v, Jun 02 2012
From Gus Wiseman, Aug 25 2020: (Start)
Also the number of strict chains of divisors from n to 1. For example, the a(n) chains for n = 1, 2, 4, 6, 8, 12, 30 are:
1 2/1 4/1 6/1 8/1 12/1 30/1
4/2/1 6/2/1 8/2/1 12/2/1 30/2/1
6/3/1 8/4/1 12/3/1 30/3/1
8/4/2/1 12/4/1 30/5/1
12/6/1 30/6/1
12/4/2/1 30/10/1
12/6/2/1 30/15/1
12/6/3/1 30/6/2/1
30/6/3/1
30/10/2/1
30/10/5/1
30/15/3/1
30/15/5/1
(End)
a(n) is also the number of ways to tile a strip of length log(n) with tiles having lengths {log(k) : k>=2}. - David Bevan, Jan 07 2025

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + 3*x^6 + x^7 + 4*x^8 + 2*x^9 + 3*x^10 + ...
Number of ordered factorizations of 8 is 4: 8 = 2*4 = 4*2 = 2*2*2.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126, see #27.
  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 141.
  • Kalmár, Laszlo, A "factorisatio numerorum" problemajarol [Hungarian], Matemat. Fizik. Lapok, 38 (1931), 1-15.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 124.

Crossrefs

Apart from initial term, same as A002033.
a(A002110) = A000670, row sums of A251683.
A173382 (and A025523) gives partial sums.
A124433 has these as unsigned row sums.
A334996 has these as row sums.
A001055 counts factorizations.
A001222 counts prime factors with multiplicity.
A008480 counts ordered prime factorizations.
A067824 counts strict chains of divisors starting with n.
A122651 counts strict chains of divisors summing to n.
A253249 counts strict chains of divisors.

Programs

  • Haskell
    a074206 n | n <= 1 = n
    | otherwise = 1 + (sum $ map (a074206 . (div n)) $
    tail $ a027751_row n)
    -- Reinhard Zumkeller, Oct 01 2012
    
  • Maple
    a := array(1..150): for k from 1 to 150 do a[k] := 0 od: a[1] := 1: for j from 2 to 150 do for m from 1 to j-1 do if j mod m = 0 then a[j] := a[j]+a[m] fi: od: od: for k from 1 to 150 do printf(`%d,`,a[k]) od: # James Sellers, Dec 07 2000
    A074206:= proc(n) option remember; if n > 1 then `+`(op(apply(A074206, numtheory[divisors](n)[1..-2]))) else n fi end: # M. F. Hasler, Oct 12 2018
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = a /@ Most[Divisors[n]] // Total; a /@ Range[20000] (* N. J. A. Sloane, May 04 2016, based on program in A002033 *)
    ccc[n_]:=Switch[n,0,{},1,{{1}},,Join@@Table[Prepend[#,n]&/@ccc[d],{d,Most[Divisors[n]]}]]; Table[Length[ccc[n]],{n,0,100}] (* _Gus Wiseman, Aug 25 2020 *)
  • PARI
    A=vector(100);A[1]=1; for(n=2,#A,A[n]=1+sumdiv(n,d,A[d])); A/=2; A[1]=1; concat(0,A) \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    {a(n) = if( n<2, n>0, my(A = divisors(n)); sum(k=1, #A-1, a(A[k])))}; /* Michael Somos, Dec 26 2016 */
    
  • PARI
    A074206(n)=if(n>1, sumdiv(n, i, if(iA074206(i))),n) \\ M. F. Hasler, Oct 12 2018
    
  • PARI
    A74206=[1]; A074206(n)={if(#A74206A074206(i)))} \\ Use memoization for computing many values. - M. F. Hasler, Oct 12 2018
    
  • PARI
    first(n) = {my(res = vector(n, i, 1)); for(i = 2, n, for(j = 2, n \ i, res[i*j] += res[i])); concat(0, res)} \\ David A. Corneth, Oct 13 2018
    
  • PARI
    first(n) = {my(res = vector(n, i, 1)); for(i = 2, n, d = divisors(i); res[i] += sum(j = 1, #d-1, res[d[j]])); concat(0, res)} \\ somewhat faster than progs above for finding first terms of n. \\ David A. Corneth, Oct 12 2018
    
  • PARI
    a(n)={if(!n, 0, my(sig=factor(n)[,2], m=vecsum(sig)); sum(k=0, m, prod(i=1, #sig, binomial(sig[i]+k-1, k-1))*sum(r=k, m, binomial(r,k)*(-1)^(r-k))))} \\ Andrew Howroyd, Aug 30 2020
    
  • Python
    from math import prod
    from functools import lru_cache
    from sympy import divisors, factorint, prime
    @lru_cache(maxsize=None)
    def A074206(n): return sum(A074206(d) for d in divisors(prod(prime(i+1)**e for i,e in enumerate(sorted(factorint(n).values(),reverse=True))),generator=True,proper=True)) if n > 1 else n # Chai Wah Wu, Sep 16 2022
  • SageMath
    @cached_function
    def minus_mu(n):
        if n < 2: return n
        return sum(minus_mu(d) for d in divisors(n)[:-1])
    # Note that changing the sign of the sum gives the Möbius function A008683.
    print([minus_mu(n) for n in (0..96)]) # Peter Luschny, Dec 26 2016
    

Formula

With different offset: a(n) = sum of all a(i) such that i divides n and i < n. - Clark Kimberling
a(p^k) = 2^(k-1) if k>0 and p is a prime.
Dirichlet g.f.: 1/(2-zeta(s)). - Herbert S. Wilf, Apr 29 2003
a(n) = A067824(n)/2 for n>1; a(A122408(n)) = A122408(n)/2. - Reinhard Zumkeller, Sep 03 2006
If p,q,r,... are distinct primes, then a(p*q)=3, a(p^2*q)=8, a(p*q*r)=13, a(p^3*q)=20, etc. - Vladimir Shevelev, Aug 03 2011 [corrected by Charles R Greathouse IV, Jun 02 2012]
a(0) = 0, a(1) = 1; a(n) = [x^n] Sum_{k=1..n-1} a(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Dec 11 2017
a(n) = a(A046523(n)); a(A025487(n)) = A050324(n): a(n) depends only on the nonzero exponents in the prime factorization of n, more precisely prime signature of n, cf. A124010 and A320390. - M. F. Hasler, Oct 12 2018
a(n) = A000670(A001221(n)) for squarefree n. In particular a(A002110(n)) = A000670(n). - Amiram Eldar, May 13 2019
a(n) = A050369(n)/n, for n>=1. - Ridouane Oudra, Aug 31 2019
a(n) = A361665(A181819(n)). - Pontus von Brömssen, Mar 25 2023
From Ridouane Oudra, Nov 02 2023: (Start)
If p,q are distinct primes, and n,m>0 then we have:
a(p^n*q^m) = Sum_{k=0..min(n,m)} 2^(n+m-k-1)*binomial(n,k)*binomial(m,k);
More generally: let tau[k](n) denote the number of ordered factorizations of n as a product of k terms, also named the k-th Piltz function (see A007425), then we have for n>1:
a(n) = Sum_{j=1..bigomega(n)} Sum_{k=1..j} (-1)^(j-k)*binomial(j,k)*tau[k](n), or
a(n) = Sum_{j=1..bigomega(n)} Sum_{k=0..j-1} (-1)^k*binomial(j,k)*tau[j-k](n). (End)

Extensions

Originally this sequence was merged with A002033, the number of perfect partitions. Herbert S. Wilf suggested that it warrants an entry of its own.

A027960 'Lucas array': triangular array T read by rows.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 4, 4, 1, 1, 3, 4, 7, 8, 5, 1, 1, 3, 4, 7, 11, 15, 13, 6, 1, 1, 3, 4, 7, 11, 18, 26, 28, 19, 7, 1, 1, 3, 4, 7, 11, 18, 29, 44, 54, 47, 26, 8, 1, 1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1, 1, 3, 4, 7, 11, 18, 29, 47, 76, 120, 171, 199, 174, 107, 43, 10, 1
Offset: 0

Views

Author

Keywords

Comments

The k-th row contains 2k+1 numbers.
Columns in the right half consist of convolutions of the Lucas numbers with the natural numbers.
T(n,k) = number of strings s(0),...,s(n) such that s(n)=n-k. s(0) in {0,1,2}, s(1)=1 if s(0) in {1,2}, s(1) in {0,1,2} if s(0)=0 and for 1 <= i <= n, s(i) = s(i-1)+d, with d in {0,2} if s(i)=2i, in {0,1,2} if s(i)=2i-1, in {0,1} if 0 <= s(i) <= 2i-2.

Examples

			                           1
                       1,  3,  1
                   1,  3,  4,  4,  1
               1,  3,  4,  7,  8,  5,   1
           1,  3,  4,  7, 11, 15, 13,   6,  1
        1, 3,  4,  7, 11, 18, 26, 28,  19,  7,  1
     1, 3, 4,  7, 11, 18, 29, 44, 54,  47, 26,  8, 1
  1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1
		

Crossrefs

Central column is the Lucas numbers without initial 2: A000204.
Columns in the right half include A027961, A027962, A027963, A027964, A053298.
Bisection triangles are in A026998 and A027011.
Row sums: A036563, A153881 (alternating sign).
Diagonals of the form T(n, 2*n-p): A000012 (p=0), A000027 (p=1), A034856 (p=2), A027965 (p=3), A027966 (p=4), A027967 (p=5), A027968 (p=6), A027969 (p=7), A027970 (p=8), A027971 (p=9), A027972 (p=10).
Diagonals of the form T(n, n+p): A000032 (p=0), A027961 (p=1), A023537 (p=2), A027963 (p=3), A027964 (p=4), A053298 (p=5), A027002 U A027018 (p=6), A027007 U A027014 (p=7), A027003 U A027019 (p=8).

Programs

  • Magma
    function T(n,k) // T = A027960
          if k le n then return Lucas(k+1);
          elif k gt 2*n then return 0;
          else return T(n-1, k-2) + T(n-1, k-1);
          end if;
    end function;
    [T(n,k): k in [0..2*n], n in [0..12]]; // G. C. Greubel, Jun 08 2025
  • Maple
    T:=proc(n,k)option remember:if(k=0 or k=2*n)then return 1:elif(k=1)then return 3:else return T(n-1,k-2) + T(n-1,k-1):fi:end:
    for n from 0 to 6 do for k from 0 to 2*n do print(T(n,k));od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    (* First program *)
    t[, 0] = 1; t[, 1] = 3; t[n_, k_] /; (k == 2*n) = 1; t[n_, k_] := t[n, k] = t[n-1, k-2] + t[n-1, k-1]; Table[t[n, k], {n, 0, 8}, {k, 0, 2*n}] // Flatten (* Jean-François Alcover, Dec 27 2013 *)
    (* Second program *)
    f[n_, k_]:= f[n,k]= Sum[Binomial[2*n-k+j,j]*LucasL[2*(k-n-j)], {j,0,k-n-1}];
    A027960[n_, k_]:= LucasL[k+1] - f[n,k]*Boole[k>n];
    Table[A027960[n,k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Jun 08 2025 *)
  • PARI
    T(r,n)=if(r<0||n>2*r,return(0)); if(n==0||n==2*r,return(1)); if(n==1,3,T(r-1,n-1)+T(r-1,n-2)) /* Ralf Stephan, May 04 2005 */
    
  • SageMath
    @CachedFunction
    def T(n, k): # T = A027960
        if (k>2*n): return 0
        elif (kG. C. Greubel, Jun 01 2019; Jun 08 2025
    

Formula

T(n, k) = Lucas(k+1) for k <= n, otherwise the (2n-k)th coefficient of the power series for (1+2*x)/{(1-x-x^2)*(1-x)^(k-n)}.
Recurrence: T(n, 0)=T(n, 2n)=1 for n >= 0; T(n, 1)=3 for n >= 1; and for n >= 2, T(n, k) = T(n-1, k-2) + T(n-1, k-1) for 2 <= k <= 2*n-1.
From G. C. Greubel, Jun 08 2025: (Start)
T(n, k) = A000032(k+1) - f(n, k)*[k > n], where f(n, k) = Sum_{j=0..k-n-1} binomial(2*n -k+j, j)*A000032(2*(k-n-j)).
Sum_{k=0..A004396(n+1)} T(n-k, k) = A027975(n).
Sum_{k=0..n} T(n, k) = A027961(n).
Sum_{k=0..2*n} T(n, k) = A168616(n+2) + 2.
Sum_{k=n+1..2*n} (-1)^k*T(n, k) = A075193(n-1), n >= 1. (End)

Extensions

Edited by Ralf Stephan, May 04 2005

A220418 Express 1 - x - x^2 - x^3 - x^4 - ... as product (1 + g(1)*x) * (1 + g(2)*x^2) *(1 + g(3)*x^3) * ... and use a(n) = - g(n).

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 18, 27, 54, 84, 186, 296, 630, 1008, 2106, 3711, 7710, 12924, 27594, 48528, 97902, 173352, 364722, 647504, 1340622, 2382660, 4918482, 9052392, 18512790, 33361776, 69273666, 127198287, 258155910, 475568220, 981288906, 1814542704, 3714566310
Offset: 1

Views

Author

Michel Marcus, Dec 14 2012

Keywords

Comments

This is the PPE (power product expansion) of A153881 (with offset 0).
When p is prime, a(p) = (2^p-2)/p (A064535).
From Petros Hadjicostas, Oct 04 2019: (Start)
This sequence appears as an example in Gingold and Knopfmacher (1995) starting at p. 1223.
In Section 3 of Gingold and Knopfmacher (1995), it is proved that, if f(z) = Product_{n >= 1} (1 + g(n))*z^n = 1/(Product_{n >= 1} (1 - h(n))*z^n), then g(2*n - 1) = h(2*n - 1) and Sum_{d|n} (1/d)*h(n/d)^d = -Sum_{d|n} (1/d)*(-g(n/d))^d. The same results were proved more than ten years later by Alkauskas (2008, 2009). [If we let a(n) = -g(n), then Alkauskas works with f(z) = Product_{n >= 1} (1 - a(n))*z^n; i.e., a(2*n - 1) = -h(2*n - 1) etc.]
The PPE of 1/(1 - x - x^2 - x^3 - x^4 - ...) is given in A290261, which is also studied in Gingold and Knopfmacher (1995, p. 1234).
(End)
The number of terms in the Zassenhaus formula exponent of order n, as computed by the algorithm by Casas, Murua & Nadinic, is equal to a(n) at least for n = 2..24. - Andrey Zabolotskiy, Apr 09 2023

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<1, 1,
          b(n, i-1)+a(i)*b(n-i, min(n-i, i)))
        end:
    a:= proc(n) option remember; 2^n-b(n, n-1) end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Jun 22 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i < 1, 1, b[n, i - 1] + a[i]*b[n - i, Min[n - i, i]]];
    a[n_] := a[n] = 2^n - b[n, n - 1] ;
    Array[a, 40] (* Jean-François Alcover, Jul 09 2018, after Alois P. Heinz *)
  • PARI
    a(m) = {default(seriesprecision, m+1); gk = vector(m); pol = 1 + sum(n=1, m, -x^n); gk[1] = polcoeff( pol, 1); for (k=2, m, pol = taylor(pol/(1+gk[k-1]*x^(k-1)), x); gk[k] = polcoeff(pol, k, x);); for (k=1, m, print1(-gk[k], ", "););}

Formula

g(1) = -1 and for k > 1, g(k) satisfies Sum_{d|k} (1/d)*(-g(k/d))^d = (2^k - 1)/k, where a(k) = -g(k). - Gevorg Hmayakyan, Jun 05 2016 [Corrected by Petros Hadjicostas, Oct 04 2019. See p. 1224 in Gingold and Knopfmacher (1995).]
From Petros Hadjicostas, Oct 04 2019: (Start)
a(2*n - 1) = A290261(2*n - 1) for n >= 1 because A290261 gives the PPE of 1/(1 - x - x^2 - x^3 - ...) = (1 - x)/(1 - 2*x).
Define (A(m,n): n,m >= 1) by A(m=1,n) = -1 for n >= 1, A(m,n) = 0 for m > n >= 1 (upper triangular), and A(m,n) = A(m-1,n) - A(m-1,m-1) * A(m,n-m+1) for n >= m >= 2. Then a(n) = A(n,n). [Theorem 3 in Gingold et al. (1988).]
(End)

Extensions

Name edited by Petros Hadjicostas, Oct 04 2019

A151959 Consider the Kaprekar map x->K(x) described in A151949. Sequence gives the smallest number that belongs to a cycle of length n under repeated iteration of this map, or -1 if there is no cycle of length n.

Original entry on oeis.org

0, 53955, 64308654, 61974, 86420987532
Offset: 1

Views

Author

Klaus Brockhaus and N. J. A. Sloane, Aug 19 2009

Keywords

Comments

No cycle of length 6 is presently known!
It is also known that a(7) = 420876, a(8) = 7509843, a(14) = 753098643.
From Joseph Myers, Aug 19 2009: (Start)
One does not need to consider every integer of n digits, only the sorted sequences of n digits (of which there are binomial(n+9, 9), so 28048800 for 23 digits). Then you only need to consider those sorted sequences of digits whose total is a multiple of 9, as the number and so the sum of its digits is always a multiple of 9 after the first iteration, which reduces the work by a further factor of about 9.
As a further refinement, the result of a single subtraction, if not zero, will have digit sequence of the form
d_1 d_2 ... d_k-1 9...9 9-d_k ... 9-d_2 9-d_1+1
where the values d_i are in the range 1 to 9 and the sequence of 9's in the middle may be empty.
From this form it follows that for any member of a cycle,
abs(number of 8's - number of 1's) + abs(number of 7's - number of 2's) +
abs(number of 6's - number of 3's) + abs(number of 5's - number of 4's) +
max(0, number of 0's - number of 9's) <= 4,
so given the numbers of 0's, 1's, 2's, 3's and 4's there is little freedom left in choosing the number of each remaining digit.
No further cycle lengths exist up to at least 140 digits. The only 4-cycles up to there are the ones containing 61974 and 62964, the only 8-cycles up to there are the ones containing 7509843 and 76320987633, the only 14-cycle up to there is the one containing 753098643. All the 7-cycles so far follow the pattern
7-cycle: 420876
7-cycle: 43208766
7-cycle: 4332087666
7-cycle: 433320876666
7-cycle: 43333208766666
7-cycle: 4333332087666666 ... (End)

Examples

			a(1) = 0: 0 -> 0.
a(2) = 53955: 53955 -> 59994 -> 53955 -> ...
a(3) = 64308654: 64308654 -> 83208762 -> 86526432 -> 64308654 -> ...
a(4) = 61974: 61974 -> 82962 -> 75933 -> 63954 -> 61974 -> ...
		

Crossrefs

A099009 gives the fixed points and A099010 gives numbers in cycles of length > 1.
Cf. A151949.
In other bases: A153881 (base 2), A165008 (base 3), A165028 (base 4), A165047 (base 5), A165067 (base 6), A165086 (base 7), A165106 (base 8), A165126 (base 9). [Joseph Myers, Sep 05 2009]

Extensions

The term a(3) = 64308654 was initially only a conjecture, but was confirmed by Zak Seidov, Aug 19 2009
a(4) = 61974 corrected by R. J. Mathar, Aug 19 2009 (we had not given the smallest member of the 4-cycle).
a(4) = 61974, a(7) = 420876, and a(8) = 7509843 confirmed by Zak Seidov, Aug 19 2009 (formerly the a(8) value was just an upper bound)
a(5) = 86420987532 and a(14) = 753098643 from Joseph Myers, Aug 19 2009. He also confirms the other values, and remarks that there are no other cycle lengths up to at least 140 digits.

A050369 Number of ordered factorizations of n into 2 kinds of 2, 3 kinds of 3, ...

Original entry on oeis.org

1, 2, 3, 8, 5, 18, 7, 32, 18, 30, 11, 96, 13, 42, 45, 128, 17, 144, 19, 160, 63, 66, 23, 480, 50, 78, 108, 224, 29, 390, 31, 512, 99, 102, 105, 936, 37, 114, 117, 800, 41, 546, 43, 352, 360, 138, 47, 2304, 98, 400, 153, 416, 53, 1080, 165, 1120, 171, 174, 59, 2640
Offset: 1

Views

Author

Christian G. Bower, Oct 15 1999

Keywords

Comments

Dirichlet inverse of (A000027*A153881). - Mats Granvik, Jan 03 2009

Crossrefs

Cf. A074206.

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=n*Sum[If[d==n,0,a[d]/d], {d, Divisors[n]}]; Table[a[n], {n, 1, 100}] (* Vaclav Kotesovec, Feb 02 2019 *)

Formula

Dirichlet g.f.: 1/(2-zeta(s-1)).
a(n) = n*Sum_{d divides n, d1, a(1)=1. - Vladeta Jovovic, Feb 09 2002
Sum_{k=1..n} a(k) ~ -n^(1+r) / ((1+r)*Zeta'(r)), where r = A107311 = 1.728647238998183618135103010297... is the root of the equation Zeta(r) = 2. - Vaclav Kotesovec, Feb 02 2019
G.f. A(x) satisfies: A(x) = x + 2*A(x^2) + 3*A(x^3) + 4*A(x^4) + ... - Ilya Gutkovskiy, May 10 2019
For n > 0, a(n) = n * A074206(n). - Vaclav Kotesovec, Mar 18 2021
Showing 1-10 of 36 results. Next