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 61-70 of 94 results. Next

A386565 a(n) = Sum_{k=0..n-1} binomial(4*k-1,k) * binomial(4*n-4*k,n-k-1).

Original entry on oeis.org

0, 1, 11, 111, 1091, 10596, 102237, 982458, 9415539, 90063180, 860278156, 8208539351, 78258171957, 745595635084, 7099714918062, 67574576298276, 642927956583123, 6115089154367484, 58146652079312580, 552769690436583532, 5253812277363417836, 49925987913040522128
Offset: 0

Views

Author

Seiichi Manyama, Jul 26 2025

Keywords

Examples

			(1/3) * log( Sum_{k>=0} binomial(4*k-1,k)*x^k ) = x + 11*x^2/2 + 37*x^3 + 1091*x^4/4 + 10596*x^5/5 + ...
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(4*k-1, k)*binomial(4*n-4*k, n-k-1));
    
  • PARI
    my(N=30, x='x+O('x^N), g=sum(k=0, N, binomial(4*k, k)/(3*k+1)*x^k)); concat(0, Vec(g*(g-1)/(4-3*g)^2))

Formula

G.f.: g*(g-1)/(4-3*g)^2 where g=1+x*g^4.
G.f.: g/(1-4*g)^2 where g*(1-g)^3 = x.
L.g.f.: Sum_{k>=1} a(k)*x^k/k = (1/3) * log( Sum_{k>=0} binomial(4*k-1,k)*x^k ).
a(n) = Sum_{k=0..n-1} binomial(4*k-1+l,k) * binomial(4*n-4*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 3^(n-k-1) * binomial(4*n,k).
a(n) = Sum_{k=0..n-1} 4^(n-k-1) * binomial(3*n+k,k).

A038806 Convolution of A008549 with A000302 (powers of 4).

Original entry on oeis.org

0, 1, 10, 69, 406, 2186, 11124, 54445, 259006, 1205790, 5519020, 24918306, 111250140, 492051124, 2159081192, 9409526397, 40766269774, 175707380630, 753876367356, 3221460111958, 13716223138388, 58210889582796
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(n+3)*4^n -(n+2)*Binomial(2*n+3, n+1)/2: n in [0..25]]; // Vincenzo Librandi, Jun 09 2011
  • Mathematica
    CoefficientList[Series[x ((1 - Sqrt[1 - 4 x])/(2 x)/(1 - 4 x))^2, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 29 2014 *)

Formula

a(n) = (n+3)*4^n -(n+2)*binomial(2*n+3, n+1)/2.
G.f.: x*(c(x)/(1-4*x))^2, where c(x) = g.f. for Catalan numbers A000108.
a(n+1), n >= 0 is convolution of A000346 with itself; a(n+1), n >= 0 is convolution of Catalan numbers A000108 C(n+1), n >= 0 with A002697; a(-1)=0.
Asymptotics: a(n) ~ 4^n*(n+1-4*sqrt(n/Pi)). - Fung Lam, Mar 28 2014
Recurrence: (n-1)*(n+1)*a(n) = 2*(n+1)*(4*n-3)*a(n-1) - 8*n*(2*n+1)*a(n-2). - Vaclav Kotesovec, Mar 28 2014

A042941 Convolution of Catalan numbers A000108 with A038845.

Original entry on oeis.org

1, 13, 110, 765, 4746, 27314, 149052, 781725, 3975730, 19730150, 95973956, 459145778, 2165937060, 10095323460, 46566906872, 212857023069, 965208806082, 4345780250270, 19442667426420, 86489687956518
Offset: 0

Views

Author

Keywords

Comments

Also convolution of A018218(n+1), n >= 0, with A000302 (powers of 4); also convolution of A000346 with A002697.

Programs

  • Mathematica
    CoefficientList[Series[(1-Sqrt[1-4*x])/(2*x*(1-4*x)^3), {x, 0, 20}], x] (* Vaclav Kotesovec, Apr 16 2014 *)

Formula

a(n) = binomial(n+3, 2)*(4^(n+1) - A000984(n+3)/A000984(2)) / 2.
G.f.: c(x)/(1-4*x)^3, where c(x) is the g.f. for Catalan numbers.
Recurrence: (n+1)*a(n) = 128*(1-2*n)*a(n-4) + 32*(8*n-1)*a(n-3) - 24*(4*n+1)*a(n-2) + 2*(8*n+5)*a(n-1). - Fung Lam, Apr 13 2014
a(n) ~ 2^(2*n)*(n^2 - 8*n^(3/2)/(3*sqrt(Pi))). - Fung Lam, Apr 13 2014
Recurrence: n*(n+1)*a(n) = 2*n*(4*n+9)*a(n-1) - 8*(n+2)*(2*n+3)*a(n-2). - Vaclav Kotesovec, Apr 16 2014

A060404 G.f.: Sum_{k >= 1} (phi(k)/k)*log(1-f(x^k)), where f(x) = (1 - sqrt(1 - 4*x)) / (2*x) - 1 is the g.f. for the Catalan numbers (A000108) C_1, C_2, C_3, ...

Original entry on oeis.org

0, 1, 3, 8, 25, 78, 270, 926, 3305, 11868, 43232, 158586, 586530, 2181088, 8154710, 30620868, 115435625, 436654794, 1656793374, 6303490610, 24041649128, 91899730068, 352002058402, 1350767683698, 5192237233602, 19989786008160
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2001

Keywords

Comments

Counts cycles of objects where the individual objects are anything enumerated by the Catalan numbers C_1, C_2, ...
The number of unrooted two-face n-edge maps in the plane (planar with a distinguished outside face). - Valery A. Liskovets, Mar 17 2005

References

  • V. A. Liskovets and T. R. Walsh, Enumeration of unrooted maps on the plane, Rapport technique, UQAM, No. 2005-01, Montreal, Canada, 2005.

Crossrefs

Cf. A103943.

Programs

  • Mathematica
    max = 25; f[x_] := (1 - Sqrt[1 - 4*x])/(2*x) - 1; gf = Sum[(EulerPhi[k]/k)*Log[1 - f[x^k]], {k, 1, max}]; CoefficientList[ Series[-gf, {x, 0, max}], x] (* Jean-François Alcover, Jan 21 2013 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*(2^(2*d-1) - binomial(2*d-1, d)))/n; \\ Andrew Howroyd, Apr 02 2017

Formula

a(n) = (1/n) * Sum_{d|n} phi(n/d) * A000346(d-1) for n>0. - Andrew Howroyd, Apr 02 2017

A130783 Maximum value of the n-th difference of a permutation of 0..n.

Original entry on oeis.org

0, 1, 3, 10, 25, 66, 154, 372, 837, 1930, 4246, 9516, 20618, 45332, 97140, 210664, 447661, 960858, 2028478, 4319100, 9070110, 19188796, 40122028, 84438360, 175913250, 368603716, 765561564, 1598231992, 3310623412, 6889682280, 14238676712, 29551095248
Offset: 0

Views

Author

R. H. Hardin, Aug 19 2007

Keywords

Comments

For n>1, a(n) is also the maximum value of the n-th difference of a permutation of 1..n. - Michel Marcus, Apr 15 2017

Examples

			a(1)=1 because 0 1 has a first difference of 1;
a(2)=3 because 2 0 1 has a second difference of 3.
		

Crossrefs

Programs

Formula

a(n) = (n+1)*(2^(n-1)-binomial(n-1,n/2)) if n is even else ((n+1)/2)*(2^n-binomial(n,(n+1)/2)). - Vladeta Jovovic, Aug 23 2007
a(n) = (n+1)*(2^n-binomial(n,[n/2]))/2, where [x] is floor. - Graeme McRae, Jan 30 2012
G.f.: (1-sqrt((1-2*x)/(1+2*x)))/(2*(1-2*x)^2). - Vladeta Jovovic, Aug 24 2007
Asymptotics: a(n) ~ 2^(n-1)*(n+1-sqrt(2*n/Pi)). - Fung Lam, Mar 28 2014
D-finite with recurrence (n-1)*n*a(n) = 2*(n-1)*(n+1)*a(n-1) + 4*(n-2)*n*a(n-2) - 8*(n-1)*n*a(n-3). - Vaclav Kotesovec, Mar 28 2014
a(2n) = A303602(n). a(2n+1) = A033504(n). - R. J. Mathar, Nov 20 2020

A345907 Triangle giving the main antidiagonals of the matrices counting integer compositions by length and alternating sum (A345197).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 0, 0, 4, 3, 1, 1, 0, 0, 3, 6, 4, 1, 1, 0, 0, 6, 9, 8, 5, 1, 1, 0, 0, 0, 18, 18, 10, 6, 1, 1, 0, 0, 0, 10, 36, 30, 12, 7, 1, 1, 0, 0, 0, 20, 40, 60, 45, 14, 8, 1, 1, 0, 0, 0, 0, 80, 100, 90, 63, 16, 9, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
Problem: What are the column sums? They appear to match A239201, but it is not clear why.

Examples

			Triangle begins:
   1
   1   1
   0   1   1
   0   1   1   1
   0   2   2   1   1
   0   0   4   3   1   1
   0   0   3   6   4   1   1
   0   0   6   9   8   5   1   1
   0   0   0  18  18  10   6   1   1
   0   0   0  10  36  30  12   7   1   1
   0   0   0  20  40  60  45  14   8   1   1
   0   0   0   0  80 100  90  63  16   9   1   1
   0   0   0   0  35 200 200 126  84  18  10   1   1
   0   0   0   0  70 175 400 350 168 108  20  11   1   1
   0   0   0   0   0 350 525 700 560 216 135  22  12   1   1
		

Crossrefs

Row sums are A163493.
Rows are the antidiagonals of the matrices given by A345197.
The main diagonals of A345197 are A346632, with sums A345908.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{n-k}],k==(n+ats[#])/2-1&]],{k,0,n-1}],{n,0,15}]

A349155 Numbers k such that the k-th composition in standard order has sum equal to negative twice its reverse-alternating sum.

Original entry on oeis.org

0, 9, 130, 135, 141, 153, 177, 193, 225, 2052, 2059, 2062, 2069, 2074, 2079, 2089, 2098, 2103, 2109, 2129, 2146, 2151, 2157, 2169, 2209, 2242, 2247, 2253, 2265, 2289, 2369, 2434, 2439, 2445, 2457, 2481, 2529, 2561, 2689, 2818, 2823, 2829, 2841, 2865, 2913
Offset: 1

Views

Author

Gus Wiseman, Nov 22 2021

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.

Examples

			The terms and corresponding compositions begin:
     0: ()
     9: (3,1)
   130: (6,2)
   135: (5,1,1,1)
   141: (4,1,2,1)
   153: (3,1,3,1)
   177: (2,1,4,1)
   193: (1,6,1)
   225: (1,1,5,1)
  2052: (9,3)
  2059: (8,2,1,1)
  2062: (8,1,1,2)
  2069: (7,2,2,1)
  2074: (7,1,2,2)
  2079: (7,1,1,1,1,1)
  2089: (6,2,3,1)
  2098: (6,1,3,2)
  2103: (6,1,2,1,1,1)
		

Crossrefs

These compositions are counted by A224274 up to 0's.
An unordered version is A348617, counted by A001523 up to 0's.
The positive version is A349153, unreversed A348614.
The unreversed version is A349154.
Positive unordered unreversed: A349159, counted by A000712 up to 0's.
A positive unordered version is A349160, counted by A006330 up to 0's.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, complement A345192.
A034871, A097805, and A345197 count compositions by alternating sum.
A103919 counts partitions by alternating sum, reverse A344612.
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
- Heinz number is given by A333219.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Carlitz compositions are ranked by A333489, complement A348612.
- Alternating compositions are ranked by A345167, complement A345168.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[ Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,1000],Total[stc[#]]==-2*sats[stc[#]]&]

A368750 Irregular triangle read by rows: T(n,k) is the number of atoms contained in the k-th balanced string of left/right parentheses of length 2*n, where strings within a row are in reverse lexicographical order.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Jan 05 2024

Keywords

Comments

A balanced string of parentheses is composed of the same number of left and right parentheses. E.g., "(())()" and "))(()(" are balanced, while "((()((()" is not.
A balanced string can be uniquely split into substrings s_1, s_2, ..., s_k, where s_i is either an atom (i.e., a balanced string, as short as possible, beginning with "(" and ending with ")"), or a co-atom (the reverse of an atom). Please note that, here, an atom is defined as a shortest possible properly nested substring: the string "()()" is composed of two contiguous atoms, while Knuth (2011) considers it a single atom.
To count for the number of atoms/co-atoms, we begin from the leftmost character of the string and proceed to the right, adding 1 to a counter when "(" is encountered, and subtracting 1 when ")" is encountered. Each time the counter reaches 0, we have found either an atom or a co-atom, depending on whether the starting character was a "(" or a ")", respectively.
For example, the string ")(()()(())))((" can be split into ")(" (co-atom), "()" (atom), "()" (atom), "(())" (atom) and "))((" (co-atom).
If ")" is encoded by 0 and "(" is encoded by 1, the triangle with the balanced strings is given by A368804 (and, converted to decimal, by A362030).

Examples

			Triangle begins:
  [1] 0 1;
  [2] 0 0 1 1 2 1;
  [3] 0 0 0 1 0 0 1 1 2 1 1 1 2 2 3 2 1 2 1 1;
  ...
The strings corresponding to row 2, in reverse lexicographical order, are:
  "))((" (0 atoms),
  ")()(" (0 atoms),
  ")(()" (1 atom),
  "())(" (1 atom),
  "()()" (2 atoms) and
  "(())" (1 atom).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, exercise 60, p. 478.

Crossrefs

Cf. A000346 (row sums), A000984 (row lengths), A362030 and A368804 (binary words).
Cf. A368751 (co-atoms), A368752 (all atoms), A368753 (defects).

Programs

  • Mathematica
    strings[n_] := Permutations[PadLeft[Table[1, n], 2*n, -1]];
    Array[Map[SequenceCount[Accumulate[#], {1, 0}] &, strings[#]] &, 5]

Formula

T(n,k) = A368752(n,k) - A368751(n,k).

A368751 Irregular triangle read by rows: T(n,k) is the number of co-atoms contained in the k-th balanced string of left/right parentheses of length 2*n, where strings within a row are in reverse lexicographical order.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Jan 05 2024

Keywords

Comments

See A368750 for the definition of balanced strings and atoms/co-atoms.

Examples

			Triangle begins:
  [1] 1 0;
  [2] 1 2 1 1 0 0;
  [3] 1 1 2 1 2 3 2 2 1 1 1 2 1 1 0 0 1 0 0 0;
  ...
The strings corresponding to row 2, in reverse lexicographical order, are:
  "))((" (1 co-atom),
  ")()(" (2 co-atoms),
  ")(()" (1 co-atom),
  "())(" (1 co-atom),
  "()()" (0 co-atoms) and
  "(())" (0 co-atoms).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, exercise 60, p. 478.

Crossrefs

Cf. A000346 (row sums), A000984 (row lengths), A362030 and A368804 (binary words).
Cf. A368750 (atoms), A368752 (all atoms), A368753 (defects).

Programs

  • Mathematica
    strings[n_]:=Permutations[PadLeft[PadLeft[{},n,1],2n,-1]];
    Array[Map[SequenceCount[Accumulate[#],{-1,0}]&,strings[#]]&,5]

Formula

T(n,k) = A368752(n,k) - A368750(n,k).

A386566 a(n) = Sum_{k=0..n-1} binomial(5*k-1,k) * binomial(5*n-5*k,n-k-1).

Original entry on oeis.org

0, 1, 14, 181, 2284, 28506, 353630, 4370584, 53882392, 663116347, 8150224204, 100073884670, 1227826127020, 15055154471696, 184508186225552, 2260299193652496, 27679951219660080, 338872887728053465, 4147618793911034330, 50753529798492061819, 620942367878256638264
Offset: 0

Views

Author

Seiichi Manyama, Jul 26 2025

Keywords

Examples

			(1/4) * log( Sum_{k>=0} binomial(5*k-1,k)*x^k ) = x + 7*x^2 + 181*x^3/3 + 571*x^4 + 28506*x^5/5 + ...
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(5*k-1, k)*binomial(5*n-5*k, n-k-1));
    
  • PARI
    my(N=30, x='x+O('x^N), g=sum(k=0, N, binomial(5*k, k)/(4*k+1)*x^k)); concat(0, Vec(g*(g-1)/(5-4*g)^2))

Formula

G.f.: g*(g-1)/(5-4*g)^2 where g=1+x*g^5.
G.f.: g/(1-5*g)^2 where g*(1-g)^4 = x.
L.g.f.: Sum_{k>=1} a(k)*x^k/k = (1/4) * log( Sum_{k>=0} binomial(5*k-1,k)*x^k ).
a(n) = Sum_{k=0..n-1} binomial(5*k-1+l,k) * binomial(5*n-5*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 4^(n-k-1) * binomial(5*n,k).
a(n) = Sum_{k=0..n-1} 5^(n-k-1) * binomial(4*n+k,k).
Conjecture D-finite with recurrence 196608*n*(4*n-3)*(2*n-1)*(18270873280*n -32560150837) *(4*n-1)*a(n) +1280*(-1399185802400000*n^5 +1022280893000000*n^4 +17669158913120000*n^3 -48968110172924750*n^2 +49502057719349955*n -17877514345852392)*a(n-1) +125000*(-61298198200000*n^5 +1447969779032500*n^4 -7721498995066250*n^3 +17474948768595875*n^2 -18352567310653770*n +7399184154389181)*a(n-2) +48828125*(5*n-11) *(5*n-14)*(4958243695*n -6717884799) *(5*n-13)*(5*n-12)*a(n-3)=0. - R. J. Mathar, Jul 30 2025
Previous Showing 61-70 of 94 results. Next