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.

A280345 a(0) = 3, a(n+1) = 2*a(n) + periodic sequence of length 2: repeat [1, -2].

Original entry on oeis.org

3, 7, 12, 25, 48, 97, 192, 385, 768, 1537, 3072, 6145, 12288, 24577, 49152, 98305, 196608, 393217, 786432, 1572865, 3145728, 6291457, 12582912, 25165825, 50331648, 100663297, 201326592, 402653185, 805306368, 1610612737, 3221225472, 6442450945, 12884901888
Offset: 0

Views

Author

Paul Curtz, Jan 01 2017

Keywords

Comments

a(n) mod 9 is a periodic sequence of length 2: repeat [3, 7].
From 7, the last digit is of period 4: repeat [7, 2, 5, 8].
(Main sequence for the signature (2,1,-2): 0, 0, 1, 2, 5, 10, 21, 42, ... = 0 followed by A000975(n) = b(n), which first differences are A001045(n) (Paul Barry, Oct 08 2005). Then, 0 followed by b(n) is an autosequence of the first kind. The corresponding autosequence of the second kind is 0, 0, 2, 3, 8, 15, 32, 63, ... . See A277078(n).)
Difference table of a(n):
3, 7, 12, 25, 48, 97, 192, ...
4, 5, 13, 23, 49, 95, 193, ... = -(-1)^n* A140683(n)
1, 8, 10, 26, 46, 98, 190, ... = A259713(n)
7, 2, 16, 20, 52, 92, 196, ...
-5, 14, 4, 32, 40, 104, 184, ...
... .

Examples

			a(0) = 3, a(1) = 2*3 + 1 = 7, a(2) = 2*7 - 2 = 12, a(3) = 2*12 + 1 = 25.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 3; a[n_] := a[n] = 2 a[n - 1] + 1 + (-3) Boole[EvenQ@ n]; Table[a@ n, {n, 0, 32}] (* or *)
    CoefficientList[Series[(3 + x - 5 x^2)/((1 - x) (1 + x) (1 - 2 x)), {x, 0, 32}], x] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    Vec((3 + x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Jan 01 2017

Formula

a(2n) = 3*4^n, a(2n+1) = 6*4^n + 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n+2) = a(n) + 9*2^n.
a(n) = 2^(n+2) - A051049(n).
From Colin Barker, Jan 01 2017: (Start)
a(n) = 3*2^n for n even.
a(n) = 3*2^n + 1 for n odd.
G.f.: (3 + x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)).
(End)
Binomial transform of 3, followed by (-1)^n* A140657(n).

Extensions

More terms from Colin Barker, Jan 01 2017

A281166 a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2, a(0)=a(1)=1, a(2)=3.

Original entry on oeis.org

1, 1, 3, 8, 17, 33, 64, 127, 255, 512, 1025, 2049, 4096, 8191, 16383, 32768, 65537, 131073, 262144, 524287, 1048575, 2097152, 4194305, 8388609, 16777216, 33554431, 67108863, 134217728, 268435457, 536870913, 1073741824, 2147483647, 4294967295, 8589934592
Offset: 0

Views

Author

Paul Curtz, Jan 16 2017

Keywords

Comments

a(n) is the first sequence on three (with its first and second differences):
1, 1, 3, 8, 17, 33, 64, 127, ...;
0, 2, 5, 9, 16, 31, 63, 128, ..., that is 0 followed by A130752;
2, 3, 4, 7, 15, 32, 65, 129, ..., that is 2 followed by A130755;
1, 1, 3, 8, 17, 33, 64, 127, ..., this sequence.
The main diagonal is 2^n.
The sum of the first three lines is 3*2^n.
Alternated sum and subtraction of a(n) and its inverse binomial transform (period 3: repeat [1, 0, 2]) gives the autosequence of the first kind b(n):
0, 1, 1, 9, 17, 35, 63, 127, ...
1, 0, 8, 8, 18, 28, 64, 126, ...
-1, 8, 0, 10, 10, 36, 62, 134, ...
9, -8, 10, 0, 26, 26, 72, 118, ... .
The main diagonal is 0's. The first two upper diagonals are A259713.
The sum of the first three lines gives 9*A001045.
a(n) mod 9 gives a periodic sequence of length 6: repeat [1, 1, 3, 8, 8, 6].
a(n) = A130750(n-1) for n > 2. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Magma
    I:=[1,1,3]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    LinearRecurrence[{3, -3, 2}, {1, 1, 3}, 30] (* Jean-François Alcover, Jan 16 2017 *)
  • PARI
    Vec((1 - 2*x + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Colin Barker, Jan 16 2017
    

Formula

Binomial transform of the sequence of length 3: repeat [1, 0, 2].
a(n+3) = -a(n) + 9*2^n.
a(n) = 2^n - periodic 6: repeat [0, 1, 1, 0, -1, -1, 0].
a(n+6) = a(n) + 63*2^n.
a(n+1) = 2*a(n) - period 6: repeat [1, -1, -2, -1, 1, 2].
a(n) = 2^n - 2*sin(Pi*n/3)/sqrt(3). - Jean-François Alcover and Colin Barker, Jan 16 2017
G.f.: (1 - 2*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - Colin Barker, Jan 16 2017

A338198 Triangle read by rows, T(n,k) = ((k+1)*2^(n-k)-(k-2)*(-1)^(n-k))/3 for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 2, 3, 2, 1, 6, 5, 4, 3, 1, 10, 11, 8, 5, 4, 1, 22, 21, 16, 11, 6, 5, 1, 42, 43, 32, 21, 14, 7, 6, 1, 86, 85, 64, 43, 26, 17, 8, 7, 1, 170, 171, 128, 85, 54, 31, 20, 9, 8, 1, 342, 341, 256, 171, 106, 65, 36, 23, 10, 9, 1, 682, 683, 512, 341, 214, 127, 76, 41, 26, 11, 10, 1
Offset: 0

Views

Author

Werner Schulte, Oct 15 2020

Keywords

Comments

This triangle is related to the Jacobsthal numbers (A001045).

Examples

			The triangle T(n,k) for 0 <= k <= n starts:
n\k :    0     1     2    3    4    5    6   7   8   9
======================================================
  0 :    1
  1 :    0     1
  2 :    2     1     1
  3 :    2     3     2    1
  4 :    6     5     4    3    1
  5 :   10    11     8    5    4    1
  6 :   22    21    16   11    6    5    1
  7 :   42    43    32   21   14    7    6   1
  8 :   86    85    64   43   26   17    8   7   1
  9 :  170   171   128   85   54   31   20   9   8   1
etc.
		

Crossrefs

For columns k = 0 to 8 see A078008, A001045, A000079, A001045, A084214, A014551, A083595, A083582, A259713 respectively.

Programs

  • Mathematica
    Table[((k + 1)*2^(n - k) - (k - 2)*(-1)^(n - k))/3, {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Oct 15 2020 *)

Formula

T(n,n) = 1 for n >= 0; T(n,n-1) = n-1 for n > 0.
T(n,k) = T(n-1,k) + 2 * T(n-2,k) for 0 <= k <= n-2.
T(n,k) = 2 * T(n-1,k) - (k-2) * (-1)^(n-k) for 0 <= k < n.
T(n,k) = T(n+1-k,1) + (k-1) * T(n-k,1) for 0 <= k < n.
T(n+1,k) * T(n-1,k) - T(n,k+1) * T(n,k-1) = T(n-k,1)^2 for 0 < k < n.
Row sums are A083579(n+1) for n >= 0.
G.f. of column k >= 0: (1+(k-1)*t) * t^k / (1-t-2*t^2).
G.f.: Sum_{n>=0, k=0..n} T(n,k) * x^k * t^n = (1 - (1+x)*t + 2*x*t^2) / ((1 - x*t)^2 * (1 - t - 2*t^2)).
Conjecture: Let M(n,k) be the matrix inverse of T(n,k), seen as a matrix. Then M(i,j) = 0 if j < 0 or j > i, M(n,n) = 1 for n >= 0, M(n,n-1) = 1-n for n > 0, and M(n,k) = (-1)^(n-k) * (k^2-2) * (n-2)! / k! for 0 <= k <= n-2.
Showing 1-3 of 3 results.