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

A156664 Binomial transform of A052551.

Original entry on oeis.org

1, 2, 6, 16, 42, 108, 274, 688, 1714, 4244, 10458, 25672, 62826, 153372, 373666, 908896, 2207842, 5357348, 12988074, 31464568, 76179354, 184347564, 445923058, 1078290832, 2606699026, 6300077492, 15223631226, 36780894376, 88852528842, 214620169788
Offset: 0

Views

Author

Gary W. Adamson, Feb 12 2009

Keywords

Examples

			a(3) = 16 = (1, 3, 3, 1) dot (1, 1, 3, 3) = (1 + 3 + 9 + 3).
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x^2-2x+1)/(2x^3+3x^2-4x+1),{x,0,40}],x] (* or *) LinearRecurrence[{4,-3,-2},{1,2,6},40] (* Harvey P. Dale, Apr 20 2013 *)
  • PARI
    x='x+O('x^50); Vec((x^2-2*x+1)/(2*x^3+3*x^2-4*x+1)) \\ G. C. Greubel, Feb 24 2017

Formula

A007318 * A052551, where A052551 = (1, 1, 3, 3, 7, 7, 15, 15,...).
G.f.: (x^2 - 2*x + 1)/(2*x^3 + 3*x^2 - 4*x + 1). [Alexander R. Povolotsky, Feb 15 2009]
a(n) = 2*A000129(n+1)-2^n. [R. J. Mathar, Jun 15 2009]
a(n) = -2^n + (1-1/sqrt(2))*(1-sqrt(2))^n + (1+1/sqrt(2))*(1+sqrt(2))^n. - Alexander R. Povolotsky, Aug 16 2012
a(n+3) = -2*a(n) - 3*a(n+1) + 4*a(n+2). - Alexander R. Povolotsky, Aug 16 2012

Extensions

Corrected and extended by Harvey P. Dale, Apr 20 2013

A355890 Let s(k) = A052551(k), and write down s(0) consecutive integers beginning with 0, skip one integer, continue with s(1) consecutive numbers, skip one integer, then s(2) consecutive numbers, skip one integer, then s(3) consecutive numbers, and so on.

Original entry on oeis.org

0, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2022

Keywords

Comments

This could also be regarded as an irregular triangle read by rows.

Examples

			The successive stages in the construction are:
0,
2,
4,5,6,
8,9,10,
12,13,14,15,16,17,18,
20,21,22,23,24,25,26,
28, ...
The row lengths are 1,1,3,3,7,7,15,15,31,31,63,... (see A052551).
		

Crossrefs

Cf. A052551.

A304972 Triangle read by rows of achiral color patterns (set partitions) for a row or loop of length n. T(n,k) is the number using exactly k colors (sets).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 2, 1, 1, 7, 10, 9, 3, 1, 1, 7, 19, 16, 12, 3, 1, 1, 15, 38, 53, 34, 18, 4, 1, 1, 15, 65, 90, 95, 46, 22, 4, 1, 1, 31, 130, 265, 261, 195, 80, 30, 5, 1, 1, 31, 211, 440, 630, 461, 295, 100, 35, 5, 1, 1, 63, 422, 1221, 1700, 1696, 1016, 515, 155, 45, 6, 1, 1, 63, 665, 2002
Offset: 1

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			Triangle begins:
1;
1,   1;
1,   1,    1;
1,   3,    2,    1;
1,   3,    5,    2,     1;
1,   7,   10,    9,     3,     1;
1,   7,   19,   16,    12,     3,     1;
1,  15,   38,   53,    34,    18,     4,    1;
1,  15,   65,   90,    95,    46,    22,    4,    1;
1,  31,  130,  265,   261,   195,    80,   30,    5,    1;
1,  31,  211,  440,   630,   461,   295,  100,   35,    5,   1;
1,  63,  422, 1221,  1700,  1696,  1016,  515,  155,   45,   6,  1
1,  63,  665, 2002,  3801,  3836,  3156, 1556,  710,  185,  51,  6, 1;
1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1;
For T(4,2)=3, the row patterns are AABB, ABAB, and ABBA.  The loop patterns are AAAB, AABB, and ABAB.
For T(5,3)=5, the color patterns for both rows and loops are AABCC, ABACA, ABBBC, ABCAB, and ABCBA.
		

Crossrefs

Columns 1-6 are A057427, A052551(n-2), A304973, A304974, A304975, A304976.
A305008 has coefficients that determine the function and generating function for each column.
Row sums are A080107.

Programs

  • Mathematica
    Ach[n_, k_] := Ach[n, k] = If[n < 2, Boole[n == k && n >= 0],
      k Ach[n - 2, k] + Ach[n - 2, k - 1] + Ach[n - 2, k - 2]]
    Table[Ach[n, k], {n, 1, 15}, {k, 1, n}] // Flatten
    Ach[n_, k_] := Ach[n, k] = Which[0==k, Boole[0==n], 1==k, Boole[n>0],
      OddQ[n], Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1], {i, 0, (n-1)/2}],
      True, Sum[Binomial[n/2-1, i] (Ach[n-2-2i, k-1]
      + 2^i Ach[n-2-2i, k-2]), {i, 0, n/2-1}]]
    Table[Ach[n, k], {n, 1, 15}, {k, 1, n}] // Flatten
  • PARI
    Ach(n)={my(M=matrix(n,n,i,k,i>=k)); for(i=3, n, for(k=2, n, M[i,k]=k*M[i-2,k] + M[i-2,k-1] + if(k>2, M[i-2,k-2]))); M}
    { my(A=Ach(10)); for(n=1, #A, print(A[n,1..n])) } \\ Andrew Howroyd, Sep 18 2019

Formula

T(n,k) = [n>1] * (k*T(n-2,k) + T(n-2,k-1) + T(n-2,k-2)) + [n<2 & n==k & n>=0].
T(2m-1,k) = A140735(m,k).
T(2m,k) = A293181(m,k).
T(n,k) = [k==0 & n==0] + [k==1 & n>0]
+ [k>1 & n==1 mod 2] * Sum_{i=0..(n-1)/2} (C((n-1)/2, i) * T(n-1-2i, k-1))
+ [k>1 & n==0 mod 2] * Sum_{i=0..(n-2)/2} (C((n-2)/2, i) * (T(n-2-2i, k-1)
+ 2^i * T(n-2-2i, k-2))) where C(n,k) is a binomial coefficient.

A274230 Number of holes in a sheet of paper when you fold it n times and cut off the four corners.

Original entry on oeis.org

0, 0, 1, 3, 9, 21, 49, 105, 225, 465, 961, 1953, 3969, 8001, 16129, 32385, 65025, 130305, 261121, 522753, 1046529, 2094081, 4190209, 8382465, 16769025, 33542145, 67092481, 134193153, 268402689, 536821761, 1073676289, 2147385345
Offset: 0

Views

Author

Philippe Gibone, Jun 15 2016

Keywords

Comments

The folds are always made so the longer side becomes the shorter side.
We could have counted not only the holes but also all the notches: 4, 6, 9, 15, 25, 45, 81, 153, 289, ... which has the formula a(n) = (2^ceiling(n/2) + 1) * (2^floor(n/2) + 1) and appears to match the sequence A183978. - Philippe Gibone, Jul 06 2016
The same sequence (0,0,1,3,9,21,49,...) turns up when you start with an isosceles right triangular piece of paper and repeatedly fold it in half, snipping corners as you go. Is there an easy way to see why the two questions have the same answer? - James Propp, Jul 05 2016
Reply from Tom Karzes, Jul 05 2016: (Start)
This case seems a little more complicated than the rectangular case, since with the triangle you alternate between horizontal/vertical folds vs. diagonal folds, and the resulting fold pattern is more complex, but I think the basic argument is essentially the same.
Note that with the triangle, the first hole doesn't appear until after you've made 3 folds, so if you start counting at zero folds, you have three leading zeros in the sequence: 0,0,0,1,3,9,21,... (End)
Also the number of subsets of {1,2,...,n} that contain both even and odd numbers. For example, a(3)=3 and the 3 subsets are {1,2}, {2,3}, {1,2,3}; a(4)=9 and the 9 subsets are {1,2}, {1,4}, {2,3}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}, {1,2,3,4}. (See comments in A052551 for the number of subsets of {1,2,...,n} that contain only odd and even numbers.) - Enrique Navarrete, Mar 26 2018
Also the number of integer compositions of n + 1 with an odd part other than the first or last. The complementary compositions are counted by A052955(n>0) = A027383(n) + 1. - Gus Wiseman, Feb 05 2022
Also the number of unit squares in the (n+1)-st iteration in the version of the dragon curve where the rotation directions alternate, so that any clockwise rotation is followed by a counterclockwise rotation, and vice versa (see image link below). - Talmon Silver, May 09 2023

Crossrefs

See A274626, A274627 for the three- and higher-dimensional analogs.
This is the main diagonal of A274635.
Counting fold lines instead of holes gives A027383.
Bisections are A060867 (even) and A134057 (odd).

Programs

Formula

u(0) = 0; v(0) = 0; u(n+1) = v(n); v(n+1) = 2u(n) + 1; a(n) = u(n)*v(n).
a(n) = (2^ceiling(n/2) - 1)*(2^floor(n/2) - 1).
Proof from Tom Karzes, Jul 05 2016: (Start)
Let r be the number of times you fold along one axis and s be the number of times you fold along the other axis. So r is ceiling(n/2) and s is floor(n/2), where n is the total number of folds.
When unfolded, the resulting paper has been divided into a grid of (2^r) by (2^s) rectangles. The interior grid lines will have diamond-shaped holes where they intersect (assuming diagonal cuts).
There are (2^r-1) internal grid lines along one axis and (2^s-1) along the other. The total number of internal grid line intersections is therefore (2^r-1)*(2^s-1), or (2^ceiling(n/2)-1)*(2^floor(n/2)-1) as claimed. (End)
From Colin Barker, Jun 22 2016, revised by N. J. A. Sloane, Jul 05 2016: (Start)
It follows that:
a(n) = (2^(n/2)-1)^2 for n even, a(n) = 2^n+1-3*2^((n-1)/2) for n odd.
a(n) = 3*a(n-1)-6*a(n-3)+4*a(n-4) for n>3.
G.f.: x^2 / ((1-x)*(1-2*x)*(1-2*x^2)).
a(n) = (1+2^n-2^((n-3)/2)*(3-3*(-1)^n+2*sqrt(2)+2*(-1)^n*sqrt(2))). (End)
a(n) = A000225(n) - 2*A052955(n-2) for n > 1. - Yuchun Ji, Nov 19 2018
a(n) = A079667(2^(n-1)) for n >= 1. - J. M. Bergot, Jan 18 2021
a(n) = 2^(n-1) - A052955(n) = 2^(n-1) - A027383(n) - 1. - Gus Wiseman, Jan 29 2022
E.g.f.: cosh(x) + cosh(2*x) - 2*cosh(sqrt(2)*x) + sinh(x) + sinh(2*x) - 3*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, Apr 06 2022

A032085 Number of reversible strings with n beads of 2 colors. If more than 1 bead, not palindromic.

Original entry on oeis.org

2, 1, 2, 6, 12, 28, 56, 120, 240, 496, 992, 2016, 4032, 8128, 16256, 32640, 65280, 130816, 261632, 523776, 1047552, 2096128, 4192256, 8386560, 16773120, 33550336, 67100672, 134209536, 268419072, 536854528
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of induced subgraphs with odd number of edges in the path graph P(n) if n>0. - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 06 2009
A common recurrence of the bisections A020522 and A006516 means a(n+4) = 6*a(n+2) - 8*a(n), n>1. - Yosu Yurramendi, Aug 07 2008
Also, the decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 566", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 05 2017

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Cf. A005418, A016116. Essentially the same as A122746.
Row sums of triangle A034877.

Programs

Formula

"BHK" (reversible, identity, unlabeled) transform of 2, 0, 0, 0, ...
a(n) = 2^(n-1)-2^floor((n-1)/2), n > 1. - Vladeta Jovovic, Nov 11 2001
G.f.: 2*x+x^2/((1-2*x)*(1-2*x^2)). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004
a(n) = A005418(n+1)-A016116(n+2), n>1. - Yosu Yurramendi, Aug 07 2008
a(n+1) = A077957(n) + 2*a(n), n>1. a(n+2) = A000079(n+1) + 2*a(n), n>1. - Yosu Yurramendi, Aug 10 2008
First differences: a(n+1)-a(n) = A007179(n) = A156232(n+2)/4, n>1. - Paul Curtz, Nov 16 2009
a(n) = 2*(a(n-1) bitwiseOR a(n-2)), n>3. - Pierre Charland, Dec 12 2010
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Wesley Ivan Hurt, Jul 03 2020

A059053 Number of chiral pairs of necklaces with n beads and two colors (color complements being equivalent); i.e., turning the necklace over neither leaves it unchanged nor simply swaps the colors.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 7, 12, 31, 58, 126, 234, 484, 906, 1800, 3402, 6643, 12624, 24458, 46686, 90157, 172810, 333498, 641340, 1238671, 2388852, 4620006, 8932032, 17302033, 33522698, 65042526, 126258960, 245361172, 477091232
Offset: 0

Views

Author

Henry Bottomley, Dec 21 2000

Keywords

Comments

Number of chiral pairs of set partitions of a cycle of n elements using exactly two different elements. - Robert A. Russell, Oct 02 2018

Examples

			For a(7) = 1, the chiral pair is AAABABB-AAABBAB.
For a(8) = 2, the chiral pairs are AAAABABB-AAAABBAB and AAABAABB-AAABBAAB.
		

Crossrefs

Column 2 of A320647 and A320742.
Cf. A056295 (oriented), A056357 (unoriented), A052551(n-2) (achiral).

Programs

  • Mathematica
    Prepend[Table[DivisorSum[n, EulerPhi[#] StirlingS2[n/# + If[Divisible[#,2],1,0], 2] &] / (2n) - StirlingS2[1+Floor[n/2],2] / 2, {n, 1, 40}],0] (* Robert A. Russell, Oct 02 2018 *)
  • PARI
    a(n) = {if(n<1, 0, (sumdiv(n, k, eulerphi(2*k) * 2^(n/k)) / (2*n) - 2^(n\2))/2)}; \\ Andrew Howroyd, Nov 03 2019

Formula

a(n) = A000013(n) - A000011(n) = A000011(n) - A016116(n) = (A000013(n) - A016116(n))/2.
From Robert A. Russell, Oct 02 2018: (Start)
a(n) = (A056295(n)-A052551(n-2)) / 2 = A056295(n) - A056357(n) = A056357(n) - A052551(n-2).
a(n) = -S2(1+floor(n/2),2) + (1/2n) * Sum_{d|n} phi(d) * S2(n/d+[2|d],2), where S2 is a Stirling subset number A008277.
G.f.: -x(1+2x)/(2-4x^2) - Sum_{d>0} phi(d) * log(1-2x^d) / (2d*(2-[2|d])).
(End)

Extensions

Name clarified by Robert A. Russell, Oct 02 2018

A274537 Number T(n,k) of set partitions of [n] into k blocks such that each element is contained in a block whose index parity coincides with the parity of the element; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 3, 2, 1, 0, 0, 1, 3, 7, 2, 1, 0, 0, 1, 7, 14, 13, 3, 1, 0, 0, 1, 7, 35, 26, 22, 3, 1, 0, 0, 1, 15, 70, 113, 66, 34, 4, 1, 0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1, 0, 0, 1, 31, 310, 833, 933, 719, 200, 70, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 27 2016

Keywords

Comments

All odd elements are in blocks with an odd index and all even elements are in blocks with an even index.

Examples

			T(6,2) = 1: 135|246.
T(6,3) = 3: 13|246|5, 15|246|3, 1|246|35.
T(6,4) = 7: 13|24|5|6, 15|24|3|6, 1|24|35|6, 15|26|3|4, 15|2|3|46, 1|26|35|4, 1|2|35|46.
T(6,5) = 2: 1|26|3|4|5, 1|2|3|46|5.
T(6,6) = 1: 1|2|3|4|5|6.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 1,  1;
  0, 0, 1,  1,   1;
  0, 0, 1,  3,   2,   1;
  0, 0, 1,  3,   7,   2,   1;
  0, 0, 1,  7,  14,  13,   3,   1;
  0, 0, 1,  7,  35,  26,  22,   3,  1;
  0, 0, 1, 15,  70, 113,  66,  34,  4, 1;
  0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1;
  ...
		

Crossrefs

Row sums give A274538.
Columns k=0-10 give: A000007, A000007(n-1), A000012(n-2), A052551(n-3), A274868, A274869, A274870, A274871, A274872, A274873, A274874.
T(2n,n) gives A274875.
Main diagonal and lower diagonals give: A000012, A004526, A002623(n-2) or A173196.
Cf. A364267.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, x^m, add(
         `if`(irem(j, 2)=t, b(n-1, max(m, j), 1-t), 0), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0, 1)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, m_, t_] := b[n, m, t] = If[n==0, x^m, Sum[If[Mod[j, 2]==t, b[n-1, Max[m, j], 1-t], 0], {j, 1, m+1}]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0, 1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A364267(n). - Alois P. Heinz, Jul 16 2023

A182522 a(0) = 1; thereafter a(2*n + 1) = 3^n, a(2*n + 2) = 2 * 3^n.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0

Views

Author

Michael Somos, May 03 2012

Keywords

Comments

Row sums of triangle in A123149. - Philippe Deléham, May 04 2012
This is simply the classic sequence A038754 prefixed by a 1. - N. J. A. Sloane, Nov 23 2017
Binomial transform is A057960.
Range of row n of the circular Pascal array of order 6. - Shaun V. Ault, May 30 2014
a(n) is also the number of achiral color patterns in a row or cycle of length n using three or fewer colors. Two color patterns are the same if we permute the colors, so ABCAB=BACBA. For a cycle, we can rotate the colors, so ABCAB=CABAB. A row is achiral if it is the same as some color permutation of its reverse. Thus the reversal of ABCAB is BACBA, which is equivalent to ABCAB when we permute A and B. A cycle is achiral if it is the same as some rotation of some color permutation of its reverse. Thus CABAB reversed is BABAC. We can permute A and B to get ABABC and then rotate to get CABAB, so CABAB is achiral. It is interesting that the number of achiral color patterns is the same for rows and cycles. - Robert A. Russell, Mar 10 2018
Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 0. - Sean A. Irvine, Jun 03 2025

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 9*x^5 + 18*x^6 + 27*x^7 + 54*x^8 + ...
From _Robert A. Russell_, Mar 10 2018: (Start)
For a(4) = 6, the achiral color patterns for rows are AAAA, AABB, ABAB, ABBA, ABBC, and ABCA.  Note that for cycles AABB=ABBA and ABBC=ABCA.  The achiral patterns for cycles are AAAA, AAAB, AABB, ABAB, ABAC, and ABBC.  Note that AAAB and ABAC are not achiral rows.
For a(5) = 9, the achiral color patterns (for both rows and cycles) are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, and ABCBA. (End)
		

Crossrefs

Cf. A038754 (essentially the same sequence).
Also row sums of triangle in A169623.
Column 3 of A305749.
Cf. A124302 (oriented), A001998 (unoriented), A107767 (chiral), for rows, varying offsets.
Cf. A002076 (oriented), A056353 (unoriented), A320743 (chiral), for cycles.

Programs

  • Magma
    I:=[1,1,2]; [n le 3 select I[n] else 3*Self(n-2): n in [1..40]]; // Bruno Berselli, Mar 19 2013
    
  • Mathematica
    Join[{1}, RecurrenceTable[{a[1]==1, a[2]==2, a[n]==3 a[n-2]}, a, {n, 40}]] (* Bruno Berselli, Mar 19 2013 *)
    CoefficientList[Series[(1+x-x^2)/(1-3*x^2), {x,0,50}], x] (* G. C. Greubel, Apr 14 2017 *)
    Table[If[EvenQ[n], StirlingS2[(n+6)/2,3] - 4 StirlingS2[(n+4)/2,3] + 5 StirlingS2[(n+2)/2,3] - 2 StirlingS2[n/2,3], StirlingS2[(n+5)/2,3] - 3 StirlingS2[(n+3)/2,3] + 2 StirlingS2[(n+1)/2,3]], {n,0,40}] (* Robert A. Russell, Oct 21 2018 *)
    Join[{1},Table[If[EvenQ[n], 2 3^((n-2)/2), 3^((n-1)/2)],{n,40}]] (* Robert A. Russell, Oct 28 2018 *)
  • Maxima
    makelist(if n=0 then 1 else (1+mod(n-1,2))*3^floor((n-1)/2), n, 0, 40); /* Bruno Berselli, Mar 19 2013 */
    
  • PARI
    {a(n) = if( n<1, n==0, n--; (n%2 + 1) * 3^(n \ 2))}
    
  • PARI
    my(x='x+O('x^50)); Vec((1+x-x^2)/(1-3*x^2)) \\ G. C. Greubel, Apr 14 2017
    
  • SageMath
    def A182522(n): return (3 -(3-2*sqrt(3))*((n+1)%2))*3^((n-3)/2) + int(n==0)/3
    [A182522(n) for n in range(41)] # G. C. Greubel, Jul 17 2023

Formula

G.f.: (1 + x - x^2) / (1 - 3*x^2).
Expansion of 1 / (1 - x / (1 - x / (1 + x / (1 + x)))) in powers of x.
a(n+1) = A038754(n).
a(n) = Sum_{k=0..n} A123149(n,k). - Philippe Deléham, May 04 2012
a(n) = (3-(1+(-1)^n)*(3-2*sqrt(3))/2)*sqrt(3)^(n-3) for n>0, a(0)=1. - Bruno Berselli, Mar 19 2013
a(0) = 1, a(1) = 1, a(n) = a(n-1) + a(n-2) if n is odd, and a(n) = a(n-1) + a(n-2) + a(n-3) if n is even. - Jon Perry, Mar 19 2013
For odd n = 2m-1, a(2m-1) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A140735; for even n = 2m, a(2m) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A293181. - Robert A. Russell, Mar 10 2018
From Robert A. Russell, Oct 21 2018: (Start)
a(2m) = S2(m+3,3) - 4*S2(m+2,3) + 5*S2(m+1,3) - 2*S2(m,3).
a(2m-1) = S2(m+2,3) - 3*S2(m+1,3) + 2*S2(m,3), where S2(n,k) is the Stirling subset number A008277.
a(n) = 2*A001998(n-1) - A124302(n) = A124302(n) - 2*A107767(n-1) = A001998(n-1) - A107767(n-1).
a(n) = 2*A056353(n) - A002076(n) = A002076(n) - 2*A320743(n) = A056353(n) - A320743(n).
a(n) = A057427(n) + A052551(n-2) + A304973(n). (End)

Extensions

Edited by Bruno Berselli, Mar 19 2013
Definition simplified by N. J. A. Sloane, Nov 23 2017

A077866 Expansion of (1-x)^(-1)/(1 - x - 2*x^2 + 2*x^3).

Original entry on oeis.org

1, 2, 5, 8, 15, 22, 37, 52, 83, 114, 177, 240, 367, 494, 749, 1004, 1515, 2026, 3049, 4072, 6119, 8166, 12261, 16356, 24547, 32738, 49121, 65504, 98271, 131038, 196573, 262108, 393179, 524250, 786393, 1048536, 1572823, 2097110, 3145685, 4194260, 6291411, 8388562
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Equals triangle A122196 * [1,2,4,8,16,...]. - Gary W. Adamson, Nov 29 2008
Conjecture: let b(n) be the number of subsets S of {1,2,...,n} having more than one element such that (sum of least two elements of S) = max(S). Then b(0) = b(1) = b(2) = 0 and b(n+3) = a(n) for n >= 0. - Clark Kimberling Sep 27 2022

Examples

			G.f. = 1 + 2*x + 5*x^2 + 8*x^3 + 15*x^4 + 22*x^5 + 37*x^6 + ... - _Michael Somos_, Aug 11 2021
		

Crossrefs

Bisections are A005803 and A050488.
Cf. A052551 (first differences), A122196.

Programs

  • Mathematica
    CoefficientList[Series[(1-x)^(-1)/(1-x-2x^2+2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{2,1,-4,2},{1,2,5,8},50] (* Harvey P. Dale, Feb 16 2013 *)
  • PARI
    Vec((1-x)^(-1)/(1-x-2*x^2+2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

a(n) = 2^(n/2)*(3 + 2*sqrt(2) + (3 - 2*sqrt(2))*(-1)^n) - n - 5. - Paul Barry, Apr 23 2004
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + 2*a(n-4); a(0)=1, a(1)=2, a(2)=5, a(3)=8. - Harvey P. Dale, Feb 16 2013
a(2n) = 3*2^(n+1) - 2(n+1) - 3 = A050488(n+1) and a(2n+1) = 2^(n+3) - 2(n+3) = A005803(n+3). Also, a(2n+1) - a(2n) = 2^(n+1) - 1 = a(2n) - a(2n - 1). - Gregory L. Simay, Feb 07 2021
E.g.f.: 6*cosh(sqrt(2)*x) + 4*sqrt(2)*sinh(sqrt(2)*x) - exp(x)*(5 + x). - Stefano Spezia, Feb 08 2021
G.f.: 1/((1 - x)^2 * (1 - 2*x^2)). - Michael Somos, Aug 11 2021

A291960 Triangle read by rows: T(n,k) = T(n-k,k-1) + k * T(n-k,k) with T(0,0) = 1 for 0 <= k <= A003056(n).

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 3, 0, 1, 3, 1, 0, 1, 7, 1, 0, 1, 7, 3, 0, 1, 15, 6, 0, 1, 15, 10, 1, 0, 1, 31, 16, 1, 0, 1, 31, 33, 3, 0, 1, 63, 45, 6, 0, 1, 63, 79, 14, 0, 1, 127, 130, 20, 1, 0, 1, 127, 198, 45, 1, 0, 1, 255, 300, 69, 3, 0, 1, 255, 517, 135
Offset: 0

Views

Author

Seiichi Manyama, Sep 06 2017

Keywords

Examples

			First few rows are:
  1;
  0, 1;
  0, 1;
  0, 1,  1;
  0, 1,  1;
  0, 1,  3;
  0, 1,  3,  1;
  0, 1,  7,  1;
  0, 1,  7,  3;
  0, 1, 15,  6;
  0, 1, 15, 10, 1.
		

Crossrefs

Row sums give A204856.
Columns 0-2 give A000007, A000012, A052551(n-3).

Formula

G.f. of column k: x^(k*(k+1)/2) / Product_{j=1..k} (1-j*x^j).
Showing 1-10 of 24 results. Next