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.

Previous Showing 51-60 of 60 results.

A274074 a(n) = 6^n+(-1)^n.

Original entry on oeis.org

2, 5, 37, 215, 1297, 7775, 46657, 279935, 1679617, 10077695, 60466177, 362797055, 2176782337, 13060694015, 78364164097, 470184984575, 2821109907457, 16926659444735, 101559956668417, 609359740010495, 3656158440062977, 21936950640377855, 131621703842267137
Offset: 0

Views

Author

Colin Barker, Jun 09 2016

Keywords

Crossrefs

Sequences of the type k^n+(-1)^n: A014551 (k=2), A102345 (k=3), A201455 (k=4), A087404 (k=5), this sequence (k=6).

Programs

  • Mathematica
    Array[6^# + (-1)^# &, 23, 0] (* or *)
    LinearRecurrence[{5, 6}, {2, 5}, 23] (* or *)
    CoefficientList[ Series[(5x -2)/(6x^2 + 5x -1), {x, 0, 23}], x] (* Robert G. Wilson v, Jan 01 2017 *)
  • PARI
    Vec((2-5*x)/((1+x)*(1-6*x)) + O(x^30))

Formula

O.g.f.: (2-5*x) / ((1+x)*(1-6*x)).
E.g.f.: exp(-x) + exp(6*x).
a(n) = 5*a(n-1)+6*a(n-2) for n>1.

A284129 Hosoya triangle Jacobsthal Lucas type.

Original entry on oeis.org

1, 5, 5, 7, 25, 7, 17, 35, 35, 17, 31, 85, 49, 85, 31, 65, 155, 119, 119, 155, 65, 127, 325, 217, 289, 217, 325, 127, 257, 635, 455, 527, 527, 455, 635, 257, 511, 1285, 889, 1105, 961, 1105, 889, 1285, 511, 1025, 2555, 1799, 2159, 2015, 2015, 2159, 1799, 2555, 1025, 2047, 5125
Offset: 1

Views

Author

Rigoberto Florez, Mar 20 2017

Keywords

Examples

			Triangle begins:
    1,
    5,    5,
    7,   25,    7,
   17,   35,   35,   17,
   31,   85,   49,   85,   31,
   65,  155,  119,  119,  155,   65,
  127,  325,  217,  289,  217,  325,  127,
  257,  635,  455,  527,  527,  455,  635,  257,
  511, 1285,  889, 1105,  961, 1105,  889, 1285,  511,
  ...
		

Crossrefs

Cf. A014551.

Programs

  • Mathematica
    a[n_]:= 2^n + (-1)^n; Table[a[k] a[n - k + 1], {n, 10}, {k, n}] // Flatten (* Indranil Ghosh, Mar 30 2017 *)
  • PARI
    a(n) = 2^n + (-1)^n;
    for(n=1, 10, for(k=1, n, print1(a(k)*a(n - k + 1),", ");); print();); \\ Indranil Ghosh, Mar 30 2017
    
  • Python
    def a(n): return 2**n + (-1)**n
    for n in range(1, 11):
        print([a(k) * a(n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 30 2017

Formula

T(n,k) = A014551(k)*A014551(n - k + 1), where n > 0 and 0 < k <= n.

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

A321373 Array T(n,k) read by antidiagonals where the first row is (-1)^k*A140966(k) and each subsequent row is obtained by adding A001045(k) to the preceding one.

Original entry on oeis.org

2, 2, -1, 2, 0, 3, 2, 1, 4, 1, 2, 2, 5, 4, 7, 2, 3, 6, 7, 12, 9, 2, 4, 7, 10, 17, 20, 23, 2, 5, 8, 13, 22, 31, 44, 41, 2, 6, 9, 16, 27, 42, 65, 84, 87, 2, 7, 10, 19, 32, 53, 86, 127, 172, 169, 2, 8, 11, 22, 37, 64, 107, 170, 257, 340, 343
Offset: 0

Views

Author

Paul Curtz, Nov 08 2018

Keywords

Comments

Array:
2, -1, 3, 1, 7, 9, 23, 41, 87, ... = (-1)^n*A140966(n)
2, 0, 4, 4, 12, 20, 44, 84, 172, ... = abs(A084247(n+1))
2, 1, 5, 7, 17, 31, 65, 127, 257, ... = A014551(n)
2, 2, 6, 10, 22, 42, 86, 170, 342, ... = A078008(n+2) = A014113(n+1)
2, 3, 7, 13, 27, 53, 107, 213, 427, ... = A048573(n)
2, 4, 8, 16, 32, 64, 128, 256, 512, ... = A000079(n+1)
2, 5, 9, 19, 37, 75, 149, 299, 597, ... = A062092(n)
2, 6, 10, 22, 42, 86, 170, 342, 682, ... = A078008(n+3) = A014113(n+2).
T(n+1,k) = (-1)^k*A140966(k) + (n+1)*A001045(k).
Every row T(n+1,k) has the signature (1,2).
T(0,k) = 2, -2, 2, -2, ... = (-1)^n*2.
T(n+1,k) - T(0,k) = (n+1)*A001045(n).
5*A001045(n) is not in the OEIS.

Examples

			Triangle a(n):
  2;
  2, -1;
  2,  0,  3;
  2,  1,  4,  1;
  2,  2,  5,  4,  7;
  2,  3,  6,  7, 12,  9;
  2,  4,  7, 10, 17, 20, 23;
  etc.
Row sums: 2, 1, 5, 8, 20, 39, 83, 166, 338, 677, 1361, 2724, ... = b(n+2).
With b(0) = 2 and b(1) = 0, b(n) = b(n-1) + 2*b(n-2)  + n - 4, n > 1.
b(n) = A001045(n) - A097065(n-1).
b(n) = b(n-2) + A000225(n-2).
		

Crossrefs

Programs

  • Mathematica
    T[_, 0] = 2;
    T[0, k_] := (2^k + 5(-1)^k)/3;
    T[n_ /; n>0, k_ /; k>0] := T[n, k] = T[n-1, k] + (2^k + (-1)^(k+1))/3;
    T[, ] = 0;
    Table[T[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 10 2018 *)

A345380 Number of Jacobsthal-Lucas numbers m <= n.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0

Views

Author

Ovidiu Bagdasar, Jun 16 2021

Keywords

Examples

			a(0)=0 since the least term in A014551 is 1.
a(1)=1 since A014551(0) = 2 is followed in that sequence by 1.
a(k)=2 for 2 <= k <= 4 since the first terms of A014551 are {2, 1, 5}.
		

Crossrefs

Cf. A014551, A108852 (Fibonacci), A130245 (Lucas), A130253.

Programs

  • Mathematica
    Block[{a = 1, b = -2, nn = 105, u, v = {}}, u = {2, a}; Do[AppendTo[u, Total[{-b, a} u[[-2 ;; -1]]]]; AppendTo[v, Count[u, _?(# <= i &)]], {i, nn}]; {Boole[First[u] <= 0]}~Join~v]  (* or *)
    {0}~Join~Accumulate@ ReplacePart[ConstantArray[0, Last[#]], Map[# -> 1 &, #]] &@ LinearRecurrence[{1, 2}, {2, 1}, 8] (* Michael De Vlieger, Jun 16 2021 *)

A369404 a(n) = 3*2^n + 5*(-1)^n.

Original entry on oeis.org

8, 1, 17, 19, 53, 91, 197, 379, 773, 1531, 3077, 6139, 12293, 24571, 49157, 98299, 196613, 393211, 786437, 1572859, 3145733, 6291451, 12582917, 25165819, 50331653, 100663291, 201326597, 402653179, 805306373, 1610612731, 3221225477, 6442450939, 12884901893
Offset: 0

Views

Author

Philippe Deléham, Jan 22 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,2},{8,1},33] (* James C. McMahon, Jan 31 2024 *)
  • Python
    def A369404(n): return (3<Chai Wah Wu, Feb 25 2024

Formula

a(n) = 3*A000079(n) + 5*A033999(n).
a(n) = 4*A014551(n) - 3*A001045(n).
a(n) = a(n-1) + 2*a(n-2).
G.f.: (8 - 7*x)/((1 + x)*(1 - 2*x)).

A137374 Triangular array of the coefficients of the Jacobsthal-Lucas polynomials ordered by descending powers, read by rows.

Original entry on oeis.org

2, 1, 4, 1, 6, 1, 8, 8, 1, 20, 10, 1, 16, 36, 12, 1, 56, 56, 14, 1, 32, 128, 80, 16, 1, 144, 240, 108, 18, 1, 64, 400, 400, 140, 20, 1, 352, 880, 616, 176, 22, 1, 128, 1152, 1680, 896, 216, 24, 1, 832, 2912, 2912, 1248, 260, 26, 1, 256, 3136, 6272, 4704, 1680, 308, 28, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 09 2008

Keywords

Comments

The even rows which start with 4, 8, 16 ... appear to be the absolute values of the Riordan array A128414. - Georg Fischer, Feb 25 2020

Examples

			The triangle starts:
    2;
    1;
    4,   1;
    6,   1;
    8,   8,   1;
   20,  10,   1;
   16,  36,  12,   1;
   56,  56,  14,   1;
   32, 128,  80,  16,  1;
  144, 240, 108,  18,  1;
   64, 400, 400, 140, 20, 1;
  352, 880, 616, 176, 22, 1;
  ...
		

Crossrefs

Row sums give A014551.
Cf. A034807.

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n<2, 2-n, b(n-1)+2*expand(x*b(n-2)))
        end:
    T:= n-> (p-> (d-> seq(coeff(p, x, d-i), i=0..d))(degree(p)))(b(n)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    f[0] = 2; f[1] = 1; f[n_] := 2 x f[n - 2] + f[n - 1];
    Table[Reverse[CoefficientList[f[n], x]], {n, 0, 14}] // Flatten (* Jinyuan Wang, Feb 25 2020 *)

Formula

Let p(n, x) = 2*x*p(n-2, x) + p(n-1, x) with p(0, x) = 2 and p(1, x) = 1. The coefficients of the polynomial p(n, x), listed in reverse order, give row n. - Jinyuan Wang, Feb 25 2020

Extensions

Offset set to 0 by Peter Luschny, Feb 25 2020

A317793 a(n) = (4^n + (-3)^n + 2^n + (-1)^n)/2.

Original entry on oeis.org

1, 15, 22, 177, 406, 2445, 7162, 36177, 121486, 554325, 2009602, 8656377, 32761366, 136617405, 529712842, 2169039777, 8525430046, 34553579685, 136858084882, 551499730377, 2193794127526, 8811785649165, 35137304693722, 140878711512177, 562526325893806
Offset: 1

Views

Author

Jinyuan Wang, Aug 07 2018

Keywords

Comments

This sequence is an extension of A014551; the sequences A014551(n) = 2^n + (-1)^n, a(n) = 4^n + (-3)^n + 2^n + (-1)^n and b(n) = 6^n + (-5)^n + 4^n + (-3)^n + 2^n + (-1)^n, ... can be considered to be of the same type.
For k>0, a(4k-2)/5, a(2k)/3 and a(2k+1)/2 are integers.

Crossrefs

Programs

  • Magma
    [(4^n+(-3)^n+2^n+(-1)^n)/2: n in [1..30]]; // Vincenzo Librandi, Aug 08 2018
  • Mathematica
    CoefficientList[ Series[(-48x^3 - 21x^2 + 13x + 1)/(24x^4 + 14x^3 - 13x^2 - 2x + 1), {x, 0, 25}], x]  (* or *)LinearRecurrence[{2, 13, -14, -24}, {1, 15, 22, 177}, 26] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    Vec(x*(1 + 13*x - 21*x^2 - 48*x^3) / ((1 + x)*(1 - 2*x)*(1 + 3*x)*(1 - 4*x)) + O(x^40)) \\ Colin Barker, Aug 07 2018
    

Formula

a(n) = (4^n + (-3)^n + 2^n + (-1)^n)/2 for n > 0.
From Colin Barker, Aug 07 2018: (Start)
G.f.: x*(1 + 13*x - 21*x^2 - 48*x^3) / ((1 + x)*(1 - 2*x)*(1 + 3*x)*(1 - 4*x)).
a(n) = 2*a(n-1) + 13*a(n-2) - 14*a(n-3) - 24*a(n-4) for n>4.
(End)
E.g.f.: (cosh(3*x/2) + cosh(7*x/2))*(cosh(x/2) + sinh(x/2)) - 2. - Stefano Spezia, Mar 20 2022

Extensions

More terms from Colin Barker, Aug 07 2018

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.

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

Original entry on oeis.org

4, 1, 9, 11, 29, 51, 109, 211, 429, 851, 1709, 3411, 6829, 13651, 27309, 54611, 109229, 218451, 436909, 873811, 1747629, 3495251, 6990509, 13981011, 27962029, 55924051, 111848109, 223696211, 447392429, 894784851, 1789569709, 3579139411, 7158278829, 14316557651, 28633115309, 57266230611, 114532461229, 229064922451
Offset: 0

Views

Author

Paul Curtz, May 09 2021

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,2}, {4,1}, 28] (* Amiram Eldar, May 10 2021 *)

Formula

a(n+1) = 5*2^n - a(n) for n >= 0, with a(0) = 4.
a(n+2) = 5*2^n + a(n) for n >= 0, with a(0) = 4, a(1) = 1.
a(n+3) = 15*2^n - a(n) for n >= 0, with a(0) = 4, a(1) = 1, a(2) = 9.
a(n) = A001045(n+2) + A154879(n).
a(2*n+1) = A321421(n).
a(n) = a(n-1) + 2*a(n-2) for n >= 2. - Pontus von Brömssen, May 09 2021
G.f.: (4 - 3*x)/(1 - x - 2*x^2). - Stefano Spezia, May 10 2021
a(n) = 2*A014551(n) - A001045(n).
a(n) = abs(A156550(n)) - (-1)^n.
a(n+3) = a(n) + 7*A084214(n+1) for n >= 0, with a(0) = 4.
a(n) = 5*A001045(n+1) - A084214(n+1) for n >= 0.
a(n) = A084214(n+1) + 3*(-1)^n for n >= 0.
Previous Showing 51-60 of 60 results.