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

A135351 a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n.

Original entry on oeis.org

0, 2, 0, 3, 2, 7, 10, 23, 42, 87, 170, 343, 682, 1367, 2730, 5463, 10922, 21847, 43690, 87383, 174762, 349527, 699050, 1398103, 2796202, 5592407, 11184810, 22369623, 44739242, 89478487, 178956970, 357913943, 715827882, 1431655767, 2863311530, 5726623063, 11453246122, 22906492247, 45812984490
Offset: 0

Views

Author

Miklos Kristof, Dec 07 2007

Keywords

Comments

Partial sums of A155980 for n > 2. - Klaus Purath, Jan 30 2021

Crossrefs

Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.

Programs

  • GAP
    List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # G. C. Greubel, Sep 02 2019
  • Magma
    a135351:=func< n | (2^n+3-7*(-1)^n+3*0^n)/6 >; [ a135351(n): n in [0..32] ]; // Klaus Brockhaus, Dec 05 2009
    
  • Maple
    G(x):=x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)): f[0]:=G(x): for n from 1 to 30 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/n!,n=0..30);
  • Mathematica
    Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n,40}]] (* G. C. Greubel, Oct 11 2016 *)
    LinearRecurrence[{2,1,-2},{0,2,0,3},40] (* Harvey P. Dale, Feb 13 2024 *)
  • PARI
    a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ Michel Marcus, Oct 11 2016
    
  • Sage
    [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # G. C. Greubel, Sep 02 2019
    

Formula

G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).
E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.
From Paul Curtz, Dec 20 2020: (Start)
a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).
a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).
a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).
a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).
a(n+4) = a(n+1) + 7*A001045(n).
a(n+4) + a(n+1) = A181565(n).
a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).
a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)

Extensions

First part of definition corrected by Klaus Brockhaus, Dec 05 2009

A171382 a(n) = (2*2^n+7*(-1)^n)/3.

Original entry on oeis.org

3, -1, 5, 3, 13, 19, 45, 83, 173, 339, 685, 1363, 2733, 5459, 10925, 21843, 43693, 87379, 174765, 349523, 699053, 1398099, 2796205, 5592403, 11184813, 22369619, 44739245, 89478483, 178956973, 357913939, 715827885, 1431655763, 2863311533
Offset: 0

Views

Author

Klaus Brockhaus, Dec 07 2009

Keywords

Comments

a(n) = A155980(n+2).
a(n) = A135351(n+3)-A135351(n+2).
Second binomial transform of a signed version of A005032 preceded by 3.
Inverse binomial transform of A008776 preceded by 3.

Crossrefs

Cf. A155980 (First differences of A135351), A135351 ((2^n+3-7*(-1)^n+3*0^n)/6), A005032 (7*3^n), A008776 (2*3^n).

Programs

  • Magma
    [ (2*2^n+7*(-1)^n)/3: n in [0..32] ];
  • Mathematica
    Nest[Append[#,Last[#]+2#[[-2]]]&,{3,-1},40]  (* Harvey P. Dale, Apr 07 2011 *)

Formula

a(n) = a(n-1)+2*a(n-2) for n > 1; a(0) = 3, a(1) = -1.
a(n) = 2^n-a(n-1) for n > 0; a(0) = 3.
G.f.: (3-4*x)/((1+x)*(1-2*x)).

A321358 a(n) = (2*4^n + 7)/3.

Original entry on oeis.org

3, 5, 13, 45, 173, 685, 2733, 10925, 43693, 174765, 699053, 2796205, 11184813, 44739245, 178956973, 715827885, 2863311533, 11453246125, 45812984493, 183251937965, 733007751853, 2932031007405, 11728124029613, 46912496118445, 187649984473773, 750599937895085, 3002399751580333
Offset: 0

Views

Author

Paul Curtz, Nov 07 2018

Keywords

Comments

Difference table:
3, 5, 13, 45, 173, 685, 2733, ... (this sequence)
2, 8, 32, 128, 512, 2048, 8192, ... A004171
6, 24, 96, 384, 1536, 6144, 24576, ... A002023

Crossrefs

Programs

  • Mathematica
    a[n_]:= (2*4^n + 7)/3; Array[a, 20, 0] (* or *)
    CoefficientList[Series[1/3 (7 E^x + 2 E^(4 x)), {x, 0, 20}], x]*Table[n!, {n, 0, 20}] (* Stefano Spezia, Nov 10 2018 *)
  • PARI
    a(n) = (2*4^n + 7)/3; \\ Michel Marcus, Nov 08 2018
    
  • PARI
    Vec((3 - 10*x) / ((1 - x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Nov 10 2018

Formula

O.g.f.: (3 - 10*x) / ((1 - x)*(1 - 4*x)). - Colin Barker, Nov 10 2018
E.g.f.: (1/3)*(7*exp(x) + 2*exp(4*x)). - Stefano Spezia, Nov 10 2018
a(n) = 5*a(n-1) - 4*a(n-2), a(0) = 3, a(1) = 5.
a(n) = 4*a(n-1) - 7, a(0) = 3.
a(n) = (2/3)*(4^n-1)/3 + 3.
a(n) = A171382(2*n) = A155980(2*n+2).
a(n) = A193579(n)/3.
a(n) = A007583(n) + 2 = A001045(2*n+1) + 2.

Extensions

More terms from Michel Marcus, Nov 08 2018

A307688 a(n) = 2*a(n-1)-2*a(n-2)+a(n-3)+2*a(n-4) with a(0)=a(1)=0, a(2)=2, a(3)=3.

Original entry on oeis.org

0, 0, 2, 3, 2, 0, 3, 14, 26, 27, 22, 44, 123, 234, 310, 363, 586, 1224, 2259, 3382, 4642, 7227, 13070, 23092, 36555, 54450, 85022, 143883, 245282, 396720, 616803, 973214, 1600106, 2664027, 4334662, 6887804, 10970523, 17828154, 29272390, 47634603, 76493626
Offset: 0

Views

Author

Keywords

Comments

This is an autosequence of the second kind, the companion to A192395.
The array D(n, k) of successive differences begins:
0, 0, 2, 3, 2, 0, 3, 14, 26, 27, ...
0, 2, 1, -1, -2, 3, 11, 12, 1, -5, ...
2, -1, -2, -1, 5, 8, 1, -11, -6, 27, ...
-3, -1, 1, 6, 3, -7, -12, 5, 33, 30, ...
2, 2, 5, -3, -10, -5, 17, 28, -3, -55, ...
0, 3, -8, -7, 5, 22, 11, -31, -52, 13, ...
...
The main diagonal (0,2,-2,6,-10,22,...) is essentially the same as A151575.
It can be seen that abs(D(n, 1)) = D(1, n).
The diagonal starting from the third 0 is -(-1)^n*11*A001045(n), inverse binomial transform of 11*A001045(n).

Crossrefs

Cf. A001045 (first and fifth upper diagonals), A014551 (second upper diagonal), A115102 (third), A155980 (fourth).

Programs

  • Mathematica
    a[0] = a[1] = 0; a[2] = 2; a[3] = 3; a[n_] := a[n] = 2*a[n-1] - 2*a[n-2] + a[n-3] + 2*a[n-4]; Table[a[n], {n, 0, 40}]
    LinearRecurrence[{2,-2,1,2},{0,0,2,3},50] (* Harvey P. Dale, Oct 01 2021 *)
  • PARI
    concat([0,0], Vec(x^2*(2 - x) / ((1 - x - x^2)*(1 - x + 2*x^2)) + O(x^40))) \\ Colin Barker, Apr 22 2019

Formula

G.f.: x^2*(2 - x) / ((1 - x - x^2)*(1 - x + 2*x^2)). - Colin Barker, Apr 22 2019

A340660 A000079 is the first row. For the second row, subtract A001045. For the third row, subtract A001045 from the second one, etc. The resulting array is read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 1, 0, 3, 8, 1, -1, 2, 5, 16, 1, -2, 1, 2, 11, 32, 1, -3, 0, -1, 6, 21, 64, 1, -4, -1, -4, 1, 10, 43, 128, 1, -5, -2, -7, -4, -1, 22, 85, 256, 1, -6, -3, -10, -9, -12, 1, 42, 171, 512, 1, -7, -4, -13, -14, -23, -20, -1, 86, 341, 1024
Offset: 0

Views

Author

Paul Curtz, Jan 15 2021

Keywords

Comments

Every row has the signature (1,2).
(Among consequences: a(n) read by antidiagonals is
1,
1, 2,
1, 1, 4,
1, 0, 3, 8,
1, -1, 2, 5, 16
1, -2, 1, 2, 11, 32,
1, -3, 0, -1, 6, 21, 64,
... .
The row sums and their first two difference table terms are
1, 3, 6, 12, 23, 45, 88, ... = A086445(n+1) - 1
2, 3, 6, 11, 22, 43, 86, ... = A005578(n+2)
1, 3, 5, 11, 21, 43, 85, ... = A001045(n+2).
The antidiagonal sums are
b(n) = 1, 1, 3, 2, 5, 3, 9, 4, 15, 5, 27, 6, 49, 7, ... .)

Examples

			Square array:
1,  2,  4,   8,  16,  32,  64,  128, ... = A000079(n)
1,  1,  3,   5,  11,  21,  43,   85, ... = A001045(n+1)
1,  0,  2,   2,   6,  10,  22,   42, ... = A078008(n)
1, -1,  1,  -1,   1,  -1,   1,   -1, ... = A033999(n)
1, -2,  0,  -4,  -4, -12, -20,  -44, ... = -A084247(n)
1, -3, -1,  -7,  -9, -23, -41,  -87, ... = (-1)^n*A140966(n+1)
1, -4, -2, -10, -14, -34, -62, -130, ... = -A135440(n)
1, -5, -3, -13, -19, -45, -83, -173, ... = -A155980(n+3) or -A171382(n+1)
...
		

Crossrefs

Programs

  • Maple
    A:= (n, k)-> (<<0|1>, <2|1>>^k. <<1, 2-n>>)[1$2]:
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Jan 21 2021
  • Mathematica
    A340660[m_, n_] := LinearRecurrence[{1, 2}, {1, m}, {n}]; Table[Reverse[Table[A340660[m, n + m - 2] // First, {m, 2, -n + 3, -1}]], {n, 1, 11}] // Flatten (* Robert P. P. McKone, Jan 28 2021 *)
  • PARI
    T(n, k) = 2^k - n*(2^k - (-1)^k)/3;
    matrix(10,10,n,k,T(n-1,k-1)) \\ Michel Marcus, Jan 19 2021

Formula

A(n,k) = 2^k - n*round(2^k/3).

A366987 Triangle read by rows: T(n, k) = -(2^(n - k)*(-1)^n + 2^k + (-1)^k)/3.

Original entry on oeis.org

-1, 0, 0, -2, -1, -2, 2, 1, -1, -2, -6, -3, -3, -3, -6, 10, 5, 1, -1, -5, -10, -22, -11, -7, -5, -7, -11, -22, 42, 21, 9, 3, -3, -9, -21, -42, -86, -43, -23, -13, -11, -13, -23, -43, -86, 170, 85, 41, 19, 5, -5, -19, -41, -85, -170, -342, -171, -87, -45, -27, -21, -27, -45, -87, -171, -342
Offset: 0

Views

Author

Paul Curtz and Thomas Scheuerle, Oct 31 2023

Keywords

Examples

			Triangle T(n, k) starts:
   -1
    0   0
   -2  -1  -2
    2   1  -1  -2
   -6  -3  -3  -3  -6
   10   5   1  -1  -5 -10
  -22 -11  -7  -5  -7 -11 -22
   42  21   9   3  -3  -9 -21 -42
   ...
Note the symmetrical distribution of the absolute values of the terms in each row.
		

Crossrefs

Rows sums: -A282577(n+2), if the conjectures from Colin Barker in A282577 are true.
First column: -(-1)^n * A078008(n).
Second column: (-1)^n * A001045(n).
Third column: -A140966(n).
Fourth column: (-1)^n * A155980(n+2).

Programs

  • Maple
    T := (n, k) -> -(2^(n-k)*(-1)^n + 2^k + (-1)^k)/3:
    seq(seq(T(n, k), k = 0..n), n = 0..10);  # Peter Luschny, Nov 02 2023
  • Mathematica
    A366987row[n_]:=Table[-(2^(n-k)(-1)^n+2^k+(-1)^k)/3,{k,0,n}];Array[A366987row,15,0] (* Paolo Xausa, Nov 07 2023 *)
  • PARI
    T(n, k) = (-2^(k+1) + 2*(-1)^(k+1) + (-1)^(n+1)*2^(1+n-k))/6 \\ Thomas Scheuerle, Nov 01 2023

Formula

T(n, 0) = -((-2)^n + 2)/3.
T(n, k+1) - T(n, k) = T(n-1, k) + (-1)^k.
T(2*n+1, n) = A001045(n).
T(2*n+1, n+1) = -A001045(n).
T(2*n, n+1) = -A048573(n-1), for n > 0.
Note that the definition of T extends to negative parameters:
T(2*n-2, n-1) = -A001045(n).
-2^n*Sum_{k=0..n} (-1)^k*T(-n, -k) = A059570(n+1).
-4^n*Sum_{k=0..2*n} T(-2*n, -k) = A020989(n).
-Sum_{k=0..n} (-1)^k*T(n, k) = A077898(n). See also A053088.
Sum_{k = 0..2*n} |T(2*n, k)| = (4^(n+1) - 1)/3.
Sum_{k = 0..2*n+1} |T(2*n+1, k)| = (1 + (-1)^n - 2^(2 + n) + 2^(1 + 2*n))/3.
G.f.: (-1 - x + x*y)/((1 - x)*(1 + 2*x)*(1 + x*y)*(1 - 2*x*y)). - Stefano Spezia, Nov 03 2023

Extensions

a(42) corrected by Paolo Xausa, Nov 07 2023
Showing 1-6 of 6 results.