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

A015445 Generalized Fibonacci numbers: a(n) = a(n-1) + 9*a(n-2).

Original entry on oeis.org

1, 1, 10, 19, 109, 280, 1261, 3781, 15130, 49159, 185329, 627760, 2295721, 7945561, 28607050, 100117099, 357580549, 1258634440, 4476859381, 15804569341, 56096303770, 198337427839, 703204161769, 2488241012320, 8817078468241, 31211247579121, 110564953793290
Offset: 0

Views

Author

Keywords

Comments

The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 2, 10*a(n-2) equals the number of 10-colored compositions of n with all parts >= 2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011

Crossrefs

Programs

  • Magma
    [ n eq 1 select 1 else n eq 2 select 1 else Self(n-1)+9*Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 23 2011
    
  • Maple
    m:=25; S:=series(1/(1-x-9*x^2), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 18 2020
  • Mathematica
    CoefficientList[Series[1/(1-x-9*x^2), {x,0,25}], x] (* or *) LinearRecurrence[{1,9}, {1,1}, 25] (* G. C. Greubel, Apr 30 2017 *)
  • PARI
    a(n)=([0,1; 9,1]^n*[1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    [lucas_number1(n,1,-9) for n in range(1, 25)] # Zerinvary Lajos, Apr 22 2009
    

Formula

a(n) = (((1+sqrt(37))/2)^(n+1) - ((1-sqrt(37))/2)^(n+1))/sqrt(37).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*9^k. - Paul Barry, Jul 20 2004
a(n) = Sum_{k=0..n} binomial((n+k)/2, (n-k)/2)*(1+(-1)^(n-k))*3^(n-k)/2. - Paul Barry, Aug 28 2005
a(n) = Sum_{k=0..n} A109466(n,k)*(-9)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = (-703*(1/2-sqrt(37)/2)^n + 199*sqrt(37)*(1/2-sqrt(37)/2)^n-333*(1/2+sqrt(37)/2)^n + 171*sqrt(37)*(1/2+sqrt(37)/2)^n)/(74*(5*sqrt(37)-14)). - Alexander R. Povolotsky, Oct 13 2010
a(n) = Sum_{k=1..n+1, k odd} C(n+1,k)*37^((k-1)/2)/2^n. - Vladimir Shevelev, Feb 05 2014
G.f.: 1/(1-x-9*x^2). - Philippe Deléham, Feb 19 2020
a(n) = J(n, 9/2), where J(n,x) are the Jacobsthal polynomials. - G. C. Greubel, Feb 18 2020
E.g.f.: exp(x/2)*(sqrt(37)*cosh(sqrt(37)*x/2) + sinh(sqrt(37)*x/2))/sqrt(37). - Stefano Spezia, Feb 19 2020

Extensions

Edited by N. J. A. Sloane, Oct 11 2010

A207538 Triangle of coefficients of polynomials v(n,x) jointly generated with A207537; see Formula section.

Original entry on oeis.org

1, 2, 4, 1, 8, 4, 16, 12, 1, 32, 32, 6, 64, 80, 24, 1, 128, 192, 80, 8, 256, 448, 240, 40, 1, 512, 1024, 672, 160, 10, 1024, 2304, 1792, 560, 60, 1, 2048, 5120, 4608, 1792, 280, 12, 4096, 11264, 11520, 5376, 1120, 84, 1, 8192, 24576, 28160, 15360
Offset: 1

Views

Author

Clark Kimberling, Feb 18 2012

Keywords

Comments

As triangle T(n,k) with 0<=k<=n and with zeros omitted, it is the triangle given by (2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 04 2012
The numbers in rows of the triangle are along "first layer" skew diagonals pointing top-left in center-justified triangle given in A013609 ((1+2*x)^n) and along (first layer) skew diagonals pointing top-right in center-justified triangle given in A038207 ((2+x)^n), see links. - Zagros Lalo, Jul 31 2018
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 2.414213562373095... (A014176: Decimal expansion of the silver mean, 1+sqrt(2)), when n approaches infinity. - Zagros Lalo, Jul 31 2018

Examples

			First seven rows:
1
2
4...1
8...4
16..12..1
32..32..6
64..80..24..1
(2, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, ...) begins:
    1
    2,   0
    4,   1,  0
    8,   4,  0, 0
   16,  12,  1, 0, 0
   32,  32,  6, 0, 0, 0
   64,  80, 24, 1, 0, 0, 0
  128, 192, 80, 8, 0, 0, 0, 0
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 80-83, 357-358.

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x]
    v[n_, x_] := u[n - 1, x] + v[n - 1, x]
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A207537, |A028297| *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A207538, |A133156| *)
    t[0, 0] = 1; t[n_, k_] := t[n, k] = If[n < 0 || k < 0, 0, 2 t[n - 1, k] + t[n - 2, k - 1]]; Table[t[n, k], {n, 0, 15}, {k, 0, Floor[n/2]}] // Flatten (* Zagros Lalo, Jul 31 2018 *)
    t[n_, k_] := t[n, k] = 2^(n - 2 k) * (n -  k)!/((n - 2 k)! k!) ; Table[t[n, k], {n, 0, 15}, {k, 0, Floor[n/2]} ]  // Flatten (* Zagros Lalo, Jul 31 2018 *)

Formula

u(n,x) = u(n-1,x)+(x+1)*v(n-1,x), v(n,x) = u(n-1,x)+v(n-1,x), where u(1,x) = 1, v(1,x) = 1. Also, A207538 = |A133156|.
From Philippe Deléham, Mar 04 2012: (Start)
With 0<=k<=n:
Mirror image of triangle in A099089.
Skew version of A038207.
Riordan array (1/(1-2*x), x^2/(1-2*x)).
G.f.: 1/(1-2*x-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A190958(n+1), A127357(n), A090591(n), A089181(n+1), A088139(n+1), A045873(n+1), A088138(n+1), A088137(n+1), A099087(n), A000027(n+1), A000079(n), A000129(n+1), A002605(n+1), A015518(n+1), A063727(n), A002532(n+1), A083099(n+1), A015519(n+1), A003683(n+1), A002534(n+1), A083102(n), A015520(n+1), A091914(n) for x = -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 respectively.
T(n,k) = 2*T(n-1,k) + T(-2,k-1) with T(0,0) = 1, T(1,0) = 2, T(1,1) = 0 and T(n, k) = 0 if k<0 or if k>n. (End)
T(n,k) = A013609(n-k, n-2*k+1). - Johannes W. Meijer, Sep 05 2013
From Tom Copeland, Feb 11 2016: (Start)
A053117 is a reflected, aerated and signed version of this entry. This entry belongs to a family discussed in A097610 with parameters h1 = -2 and h2 = -y.
Shifted o.g.f.: G(x,t) = x / (1 - 2 x - t x^2).
The compositional inverse of G(x,t) is Ginv(x,t) = -[(1 + 2x) - sqrt[(1+2x)^2 + 4t x^2]] / (2tx) = x - 2 x^2 + (4-t) x^3 - (8-6t) x^4 + ..., a shifted o.g.f. for A091894 (mod signs with A091894(0,0) = 0).
(End)

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

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 7, 9, 15, 25, 39, 57, 87, 137, 215, 329, 503, 777, 1207, 1865, 2871, 4425, 6839, 10569, 16311, 25161, 38839, 59977, 92599, 142921, 220599, 340553, 525751, 811593, 1252791, 1933897, 2985399, 4608585, 7114167, 10981961
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 4, 3*a(n-4) equals the number of 3-colored compositions of n with all parts >= 4, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011
a(n+3) equals the number of ternary words of length n having at least 3 zeros between every two successive nonzero letters. - Milan Janjic, Mar 09 2015

Crossrefs

Column k=3 of A143453.

Programs

  • GAP
    a:=[1,1,1,1];; for n in [5..40] do a[n]:=a[n-1]+2*a[n-4]; od; a; # G. C. Greubel, Jun 12 2019
  • Magma
    I:=[1,1,1,1]; [n le 4 select I[n] else Self(n-1)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Mar 10 2015
    
  • Maple
    spec := [S,{S=Sequence(Union(Z,Prod(Union(Z,Z),Z,Z,Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(add(binomial(n-3*k,k)*2^k, k=0..floor(n/3)), n=0..39); # Zerinvary Lajos, Apr 03 2007
    with(combstruct): SeqSeqSeqL := [T, {T=Sequence(S), S=Sequence(U, card >= 1), U=Sequence(Z, card >3)}, unlabeled]: seq(count(SeqSeqSeqL, size=j+4), j=0..39); # Zerinvary Lajos, Apr 04 2009
    a := n -> `if`(n<9, [1, 1, 1, 1, 3, 5, 7, 9, 15][n+1], hypergeom([(1-n)/4,(2-n)/4,(3-n)/4,-n/4], [(1-n)/3,(2-n)/3,-n/3], -512/27)):
    seq(simplify(a(n)),n=0..39); # Peter Luschny, Mar 09 2015
  • Mathematica
    CoefficientList[Series[1/(1-x-2*x^4), {x,0,40}], x] (* Vincenzo Librandi, Mar 10 2015 *)
    LinearRecurrence[{1,0,0,2},{1,1,1,1},50] (* Harvey P. Dale, Aug 17 2024 *)
  • PARI
    Vec( 1/(1-x-2*x^4) + O(x^66)) \\ Joerg Arndt, Aug 28 2013
    
  • Sage
    (1/(1-x-2*x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
    

Formula

G.f.: 1/(1-x-2*x^4).
a(n) = a(n-1) + 2*a(n-4), with a(1)=1, a(0)=1, a(2)=1, a(3)=1.
a(n) = Sum_{alpha=RootOf(-1+_Z+2*_Z^4)} (1/539)*(27 + 72*alpha^3 + 96*alpha^2 + 128*alpha)*alpha^(-1-n)).
a(n) = Sum_{k=0..floor(n/3)} A128099(n-2*k, k). - Johannes W. Meijer, Aug 28 2013
a(n) = hypergeom([(1-n)/4,(2-n)/4,(3-n)/4,-n/4],[(1-n)/3,(2-n)/3,-n/3],-512/27) for n>=9. - Peter Luschny, Mar 09 2015

Extensions

More terms from James Sellers, Jun 06 2000

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

Original entry on oeis.org

1, 0, 0, -1, 2, 0, 1, -4, 4, -1, 6, -12, 9, -8, 24, -33, 26, -40, 81, -92, 92, -161, 254, -276, 345, -576, 784, -897, 1266, -1936, 2465, -3060, 4468, -6337, 7990, -10588, 15273, -20664, 26568, -36449, 51210, -67896, 89585, -124108, 170316, -225377, 303278, -418532, 566009, -754032, 1025088
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

The absolute value of a(n) is the number of tilings of a 5 X n rectangle using n pentominoes of shapes N, U, X. |a(3)| = 1, |a(4)| = 2:
.___. ._____. ._____.
| .. | | .. | | | | ._. |
|| || || || | | || ||
|. .| , | .| .| |. |. |
| || | | | || | | |_| | |
|___| ||____| |___|_|. - Alois P. Heinz, Jan 03 2014

Crossrefs

Partial sums of A077976.

Programs

  • Maple
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <2|-1|0|0>>^n.
            <<1, 0, 0, -1>>)[1, 1]:
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 20 2013
  • Mathematica
    CoefficientList[1/(1+x^3-2*x^4) + O[x]^60, x] (* Jean-François Alcover, Jun 08 2015, after Arkadiusz Wesolowski *)
  • PARI
    Vec( 1/((1-x)*(1+x+x^2+2*x^3)) +O(x^66)) \\ Joerg Arndt, Aug 28 2013

Formula

a(n) = (-1)^n*sum(A128099(n-2*k, n-3*k), k=0..floor(n/3)). - Johannes W. Meijer, Aug 28 2013
G.f.: 1/(1 + x^3 - 2*x^4). - Arkadiusz Wesolowski, Nov 20 2013

A173284 Triangle by columns, Fibonacci numbers in every column shifted down twice, for k > 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 5, 2, 1, 8, 3, 1, 13, 5, 2, 21, 8, 3, 1, 34, 13, 5, 2, 1, 55, 21, 8, 3, 1, 89, 34, 13, 5, 2, 1, 144, 55, 21, 8, 3, 1, 233, 89, 34, 13, 5, 2, 1, 377, 144, 55, 21, 8, 3, 1, 610, 233, 89, 34, 13, 5, 2, 1
Offset: 0

Views

Author

Gary W. Adamson, Feb 14 2010

Keywords

Comments

The row sums equal A052952.
Let the triangle = M. Then lim_{n->infinity} M^n = A173285 as a left-shifted vector.
A173284 * [1, 2, 3, ...] = A054451: (1, 1, 4, 5, 12, 17, 33, ...). - Gary W. Adamson, Mar 03 2010
From Johannes W. Meijer, Sep 05 2013: (Start)
Triangle read by rows formed from antidiagonals of triangle A104762.
The diagonal sums lead to A004695. (End)

Examples

			First few rows of the triangle:
    1;
    1;
    2,   1;
    3,   1;
    5,   2,  1;
    8,   3,  1;
   13,   5,  2,  1;
   21,   8,  3,  1;
   34,  13,  5,  2,  1;
   55,  21,  8,  3,  1;
   89,  34, 13,  5,  2, 1;
  144,  55, 21,  8,  3, 1;
  233,  89, 34, 13,  5, 2, 1;
  377, 144, 55, 21,  8, 3, 1;
  610, 233, 89, 34, 13, 5, 2, 1;
  ...
		

Crossrefs

Cf. (Similar triangles) A008315 (Catalan), A011973 (Pascal), A102541 (Losanitsch), A122196 (Fractal), A122197 (Fractal), A128099 (Pell-Jacobsthal), A152198, A152204, A207538, A209634.

Programs

  • Maple
    T := proc(n, k): if n<0 then return(0) elif k < 0 or k > floor(n/2) then return(0) else combinat[fibonacci](n-2*k+1) fi: end: seq(seq(T(n, k), k=0..floor(n/2)), n=0..14); # Johannes W. Meijer, Sep 05 2013

Formula

Triangle by columns, Fibonacci numbers in every column shifted down twice, for k > 0.
From Johannes W. Meijer, Sep 05 2013: (Start)
T(n,k) = A000045(n-2*k+1), n >= 0 and 0 <= k <= floor(n/2).
T(n,k) = A104762(n-k, k). (End)

Extensions

Term a(15) corrected by Johannes W. Meijer, Sep 05 2013

A305098 Triangle read by rows: T(0,0) = 1; T(n,k) = -T(n-1,k) + 2 T(n-2,k-1) for k = 0..floor(n/2); T(n,k)=0 for n or k < 0.

Original entry on oeis.org

1, -1, 1, 2, -1, -4, 1, 6, 4, -1, -8, -12, 1, 10, 24, 8, -1, -12, -40, -32, 1, 14, 60, 80, 16, -1, -16, -84, -160, -80, 1, 18, 112, 280, 240, 32, -1, -20, -144, -448, -560, -192, 1, 22, 180, 672, 1120, 672, 64, -1, -24, -220, -960, -2016, -1792, -448
Offset: 0

Views

Author

Shara Lalo, May 25 2018

Keywords

Comments

The numbers in rows of the triangle are along skew diagonals pointing top-right in center-justified triangle given in A303872 ((-1+2*x)^n).
The coefficients in the expansion of 1/(1+x-2x^2) are given by the sequence generated by the row sums.
When n is even the numbers in the row are positive, and when n is odd the numbers in the row are negative.

Examples

			Triangle begins:
   1;
  -1;
   1,   2;
  -1,  -4;
   1,   6,    4;
  -1,  -8,  -12;
   1,  10,   24,     8;
  -1, -12,  -40,   -32;
   1,  14,   60,    80,     16;
  -1, -16,  -84,  -160,    -80;
   1,  18,  112,   280,    240,     32;
  -1, -20, -144,  -448,   -560,   -192;
   1,  22,  180,   672,   1120,    672,     64;
  -1, -24, -220,  -960,  -2016,  -1792,   -448;
   1,  26,  264,  1320,   3360,   4032,   1792,    128;
  -1, -28, -312, -1760,  -5280,  -8064,  -5376,  -1024;
   1,  30,  364,  2288,   7920,  14784,  13440,   4608,   256;
  -1, -32, -420, -2912, -11440, -25344, -29568, -15360, -2304;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 389-391.

Crossrefs

Signed version of A128099.
Row sums give A077925.
Cf. A303872, A033999 (column 0).

Programs

  • Mathematica
    t[0, 0] = 1; t[n_, k_] := If[n < 0 || k < 0, 0, -t[n - 1, k] + 2 t[n - 2, k - 1]]; Table[t[n, k], {n, 0, 13}, {k, 0, Floor[n/2]}] // Flatten
  • PARI
    T(n, k) = if ((n<0) || (k<0), 0, if ((n==0) && (k==0), 1, -T(n-1, k) + 2*T(n-2, k-1)));
    tabf(nn) = for (n=0, nn, for (k=0, n\2, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 26 2018

Formula

G.f.: 1 / (1 + t*x - 2t^2).

A113726 A Jacobsthal convolution.

Original entry on oeis.org

1, 0, 1, 4, 5, 8, 25, 44, 77, 176, 353, 660, 1365, 2776, 5417, 10876, 21981, 43648, 87153, 175076, 349669, 698280, 1398585, 2797260, 5590381, 11184720, 22373761, 44735284, 89474165, 178969208, 357910345, 715807004, 1431683837, 2863325216
Offset: 0

Views

Author

Paul Barry, Nov 08 2005

Keywords

Comments

Convolution of A001045(n+1) and A001607(n+1).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,1,4,4},{1,0,1,4},40] (* Harvey P. Dale, Apr 30 2025 *)

Formula

G.f.: 1/((1-x-2*x^2)*(1+x+2*x^2)).
a(n) = a(n-2) + 4*a(n-3) + 4*a(n-4).
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*2^k*(1+(-1)^(n-k))/2.
a(n) = 2^n/3 + (-1)^n/6 + A001607(n+1)/2. - R. J. Mathar, Aug 23 2011
a(n) = sum(A128099(n, n-2*k), k=0..floor(n/2)). - Johannes W. Meijer, Aug 28 2013

A014291 Imaginary Rabbits: imaginary part of a(0)=i; a(1)=-i; a(n) = a(n-1) + i*a(n-2), with i = sqrt(-1).

Original entry on oeis.org

1, -1, -1, -1, -2, -2, -1, 1, 5, 11, 18, 24, 25, 15, -13, -65, -142, -234, -313, -327, -199, 163, 838, 1840, 3041, 4079, 4279, 2639, -2042, -10802, -23841, -39519, -53155, -55989, -34982, 25544, 139225, 308895, 513547, 692655
Offset: 0

Views

Author

Keywords

Comments

Second differences give -a(n-2).

References

  • Charles Gely, "Lapins imaginaires et valeurs propres". Quadrature Quarterly #30.

Crossrefs

Cf. A128099.

Programs

  • GAP
    a:=[1,-1,-1,-1];; for n in [5..50] do a[n]:=2*a[n-1]-a[n-2]-a[n-4]; od; a; # G. C. Greubel, Jun 13 2019
  • Magma
    I:=[1, -1, -1, -1]; [n le 4 select I[n] else 2*Self(n-1) - Self(n-2) - Self(n-4): n in [1..50]]; // Vincenzo Librandi, Oct 23 2012
    
  • Mathematica
    CoefficientList[Series[(2*x-1)*(x-1)/(x^4+x^2-2*x+1), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 23 2012 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-x)*(1-2*x)/(1-2*x+x^2+x^4)) \\ G. C. Greubel, Jun 13 2019
    
  • Sage
    ((1-x)*(1-2*x)/(1-2*x+x^2+x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 13 2019
    

Formula

a(n) = 2*a(n-1) - a(n-2) - a(n-4).
G.f.: (1-x)*(1-2*x)/(1-2*x+x^2+x^4).
a(n) = Im( -i*J(n, -i) + J(n-1, -i) ), where J(n,x) is the Jacobsthal polynomial, whose coefficient array is A128099, and i = sqrt(-1). - G. C. Greubel, Jun 15 2019

A095977 Expansion of g.f. 2*x / ((1+x)^2*(1-2*x)^2).

Original entry on oeis.org

2, 4, 14, 32, 82, 188, 438, 984, 2202, 4852, 10622, 23056, 49762, 106796, 228166, 485448, 1029162, 2174820, 4582670, 9631360, 20194802, 42253724, 88235734, 183927992, 382769082, 795364308, 1650380958, 3420066544, 7078742402, 14634703372, 30223843942, 62356562216
Offset: 1

Views

Author

Ralf Stephan, Jul 16 2004

Keywords

Comments

Number of 2 X 2 tiles in all tilings of a 3 X (n+1) rectangle with 1 X 1 and 2 X 2 square tiles. - Emeric Deutsch, Feb 18 2007
The terms of this sequence have a primitive divisor for all terms beyond the 4th if and only if n is not of the form 4k+2, for some nonnegative integer k. - Anthony Flatters (Anthony.Flatters(AT)uea.ac.uk), Aug 17 2007

Crossrefs

Programs

  • Maple
    a:=n->n/9*2^(n+2)+1/27*2^(n+3)-2*n/9*(-1)^n-8/27*(-1)^n: seq(a(n),n=1..30); # Emeric Deutsch, Feb 18 2007
  • Mathematica
    Table[(1/27)*((3*n + 2)*2^(n + 2) - (6*n + 8)*(-1)^n) , {n,1,50}] (* G. C. Greubel, Dec 28 2016 *)
  • PARI
    Vec(2*x / ((1+x)^2 * (1-2*x)^2) + O(x^50)) \\ Michel Marcus, Nov 07 2015

Formula

a(n) = (1/27)*((3*n + 2)*2^(n + 2) - (6*n + 8)*(-1)^n).
a(n) = 2 * A073371(n-1).
a(n) = Sum_{k=0..floor((n+1)/2)} k*2^k*binomial(n+1-k,k). - Emeric Deutsch, Feb 18 2007
E.g.f.: 2*(cosh(x/2) + sinh(x/2))*(15*x*cosh(3*x/2) + (8 + 9*x)*sinh(3*x/2))/27. - Stefano Spezia, Oct 12 2024

A209634 Triangle with (1,4,7,10,13,16...,(3*n-2),...) in every column, shifted down twice.

Original entry on oeis.org

1, 4, 7, 1, 10, 4, 13, 7, 1, 16, 10, 4, 19, 13, 7, 1, 22, 16, 10, 4, 25, 19, 13, 7, 1, 28, 22, 16, 10, 4, 31, 25, 19, 13, 7, 1, 34, 28, 22, 16, 10, 4, 37, 31, 25, 19, 13, 7, 1, 40, 34, 28, 22, 16, 10, 4, 43, 37, 31, 25, 19, 13, 7, 1, 46, 40, 34, 28, 22, 16, 10
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 11 2012

Keywords

Comments

OEIS contains a lot of similar sequences, for example A152204, A122196, A173284.
Row sums for this sequence gives A006578.
In general, by given triangle with (A-B,2*A-B,...,A*n-B,...) in every column, shifted down K-times, we have the row sum s(n)= A*(n*n+K*n+nmodK)/(2*K) - B*(n+nmodK)/K. In this sequence K=2,A=3,B=2, in A152204 K=2,A=2,B=1.
No triangle with primes in every column, shifted down by K>=2 in OEIS, no row sums of it in OEIS.
From Johannes W. Meijer, Sep 28 2013: (Start)
Triangle read by rows formed from antidiagonals of triangle A143971.
The alternating row sums equal A004524(n+2) + 2*A004524(n+1).
The antidiagonal sums equal A171452(n+1). (End)

Examples

			Triangle:
1
4
7,  1
10, 4
13, 7,  1
16, 10, 4
19, 13, 7,  1
22, 16, 10, 4
25, 19, 13, 7,  1
28, 22, 16, 10, 4
...
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> 3*n - 6*k + 4: seq(seq(T(n, k), k=1..floor((n+1)/2)), n=1..15); # Johannes W. Meijer, Sep 28 2013

Formula

From Johannes W. Meijer, Sep 28 2013: (Start)
T(n, k) = 3*n - 6*k + 4, n >= 1 and 1 <= k <= floor((n+1)/2).
T(n, k) = A143971(n-k+1, k), n >= 1 and 1 <= k <= floor((n+1)/2). (End)
Showing 1-10 of 19 results. Next