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.

A328284 An extension of the Jacobsthal numbers: 0, 0, 1, followed by A001045.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485
Offset: 0

Views

Author

Paul Curtz, Oct 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n>3, (2^(n-3) + (-1)^n)/3, If[n == 2, 1, 0]]; (* Jean-François Alcover, Oct 16 2019 *)

Formula

a(n) is the fourth row of the following array:
0, 0, 0, 0, 0, 1, 3, 7, 14, 27, 51, 97, ...
0, 0, 0, 0, 1, 2, 4, 7, 13, 24, 46, 89, ... = A086445
0, 0, 0, 1, 1, 2, 3, 6, 11, 22, 43, 86, ... = 0, 0, 0, A005578(n)
0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, ... = a(n)
0, 1, -1, 1, 0, 2, 2, 6, 10, 22, 42, 86, ...
1, -2, 2, -1, 2, 0, 4, 4, 12, 20, 44, 84, ...
From the main diagonal onward, every row is an autosequence of the first kind.
From Stefano Spezia, Oct 16 2019: (Start)
O.g.f.: x^2*(-1 + x + x^2)/(-1 + x + 2*x^2).
E.g.f.: (1/24)*exp(-x)*(8 - 9*exp(x) + exp(3*x) + 6*exp(x)*x + 6*exp(x)*x^2).
a(n) = a(n-1) + 2*a(n-2) for n > 4. (End)
a(n) = Sum_{k=0..n-1} A183190(n-k-2, n-2*k-2). - Jean-François Alcover, Nov 10 2019

Extensions

Partially edited by Peter Luschny, Nov 12 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).

A340849 a(n) = A001045(n) + A052928(n).

Original entry on oeis.org

0, 1, 3, 5, 9, 15, 27, 49, 93, 179, 351, 693, 1377, 2743, 5475, 10937, 21861, 43707, 87399, 174781, 349545, 699071, 1398123, 2796225, 5592429, 11184835, 22369647, 44739269, 89478513, 178956999, 357913971, 715827913
Offset: 0

Views

Author

Paul Curtz, Jan 24 2021

Keywords

Comments

a(2*n) is divisible by 3.
a(3*n+2) is divisible by 3.
a(n) is the minimum number of moves to solve a Towers of Hanoi puzzle with 4 pegs and n disks where a disk cannot move away from the destination peg (or symmetrically, a disk cannot return to the initial peg). - Woosuk Kwak, Jan 25 2024

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -1, -3, 2}, {0, 1, 3, 5}, 32] (* Robert P. P. McKone, Jan 28 2021 *)

Formula

a(n+1) - 2*a(n) = -A109613(n-2), for a(0)=0, a(1)=1. a(n) + a(n+1) = A100314(n).
a(n+1) - a(n) = A128209(n) for n >= 0.
a(n+2) = 1 + 2*A086445(n). - Hugo Pfoertner, Jan 24 2021
From Woosuk Kwak, Jan 25 2024: (Start)
a(n) = n + floor(2^n/3).
a(n) = n + A000975(n-1) for n >= 1. (End)
Showing 1-3 of 3 results.