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

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

A268741 a(n) = 2*a(n - 2) - a(n - 1) for n>1, a(0) = 4, a(1) = 5.

Original entry on oeis.org

4, 5, 3, 7, -1, 15, -17, 47, -81, 175, -337, 687, -1361, 2735, -5457, 10927, -21841, 43695, -87377, 174767, -349521, 699055, -1398097, 2796207, -5592401, 11184815, -22369617, 44739247, -89478481, 178956975, -357913937, 715827887, -1431655761, 2863311535
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 12 2016

Keywords

Comments

In general, the ordinary generating function for the recurrence relation b(n) = 2*b(n - 2) - b(n - 1) with n>1 and b(0)=k, b(1)=m, is (k + (k + m)*x)/(1 + x - 2*x^2). This recurrence gives the closed form a(n) = ((-2)^n*(k - m) + 2*k + m).

Examples

			a(0) = (5 + 3)/2 = 4  because a(1) = 5, a(2) = 3;
a(1) = (3 + 7)/2 = 5  because a(2) = 3, a(3) = 7;
a(2) = (7 - 1)/2 = 3  because a(3) = 7, a(4) = -1, etc.
		

Crossrefs

Programs

  • Magma
    [(13-(-2)^n)/3: n in [0..35]]; // Vincenzo Librandi, Feb 13 2016
    
  • Mathematica
    Table[(13 - (-2)^n)/3, {n, 0, 33}]
    LinearRecurrence[{-1, 2}, {4, 5}, 34]
    RecurrenceTable[{a[1] == 4, a[2] == 5, a[n] == 2*a[n-2] - a[n-1]}, a, {n, 50}] (* Vincenzo Librandi, Feb 13 2016 *)
  • PARI
    Vec((4 + 9*x)/(1 + x - 2*x^2) + O(x^40)) \\ Michel Marcus, Feb 25 2016

Formula

G.f.: (4 + 9*x)/(1 + x - 2*x^2).
a(n) = (13 - (-2)^n)/3.
a(n) = A084247(n) + 3.
a(n) = (-1)^n*A154570(n+1) + 1.
a(n) = (-1)^(n-1)*A171382(n-1) + 2.
Limit_{n -> oo} a(n)/a(n + 1) = -1/2.
a(n) = 4 - (-1)^n *A001045(n). - Paul Curtz, Feb 26 2024

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).
Showing 1-3 of 3 results.