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 11-19 of 19 results.

A140950 a(n) = A140944(n+1) - 3*A140944(n).

Original entry on oeis.org

1, -3, -1, 5, -6, 3, -11, 10, -12, -5, 21, -22, 20, -24, 11, -43, 42, -44, 40, -48, -21, 85, -86, 84, -88, 80, -96, 43, -171, 170, -172, 168, -176, 160, -192, -85, 341, -342, 340, -344, 336, -352, 320, -384, 171, -683, 682, -684, 680, -688
Offset: 0

Views

Author

Paul Curtz, Jul 25 2008

Keywords

Comments

Jacobsthal numbers appear twice: 1) A001045(n+2) signed, terms 0, 1, 3, 6, 10 (A000217); 2) A001045(n+1) signed, terms 0, 2, 5, 9 (n*(n+3)/2=A000096); between them are -3; 5, -6; -11, 10, -12; which appear (opposite sign) by rows in A140503 (1, -1, 2, 3, -2, 4) square.
Consider the permutation of the nonnegative numbers
0, 2, 5, 9, 14, 20, 27,
1, 3, 6, 10, 15, 21, 28,
4, 7, 11, 16, 22, 29,
8, 12, 17, 23, 30,
13, 18, 24, 31,
19, 25, 32,
26, 33,
34, etc.
The corresponding distribution of a(n) is
1, -1, 3, -5, 11, -21, 43,
-3, 5, -11, 21, -43, 85, -171,
-6, 10, -22, 42, -86, 170,
-12, 20, -44, 84, -172,
-24, 40, -88, 168,
-48, 80, -176,
-96, 160,
-192, etc.
Column sums: -2, -2, -10, -10, -42, -42, -170, ... duplicate of a bisection of -A078008(n+2).
b(n)= 1, -1, 3, -5, 11, 21, ... = (-1)^n*A001045(n+1) = A077925(n). Every row is b(n) or b(n+2) multiplied by 1, -1, -2, -4, -8, -16, ..., essentially -A011782(n).

Crossrefs

Programs

  • Mathematica
    T[0, 0] = 0; T[1, 0] = T[0, 1] = 1; T[0, n_] := T[0, n] = T[0, n - 1] + 2*T[0, n - 2]; T[d_, d_] = 0; T[d_, n_] := T[d, n] = T[d - 1, n + 1] - T[d - 1, n]; A140944 = Table[T[d, n], {d, 0, 10}, {n, 0, d}] // Flatten; a[n_] := A140944[[n + 2]] - 3*A140944[[n + 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Dec 18 2014 *)

Extensions

More terms and a(19)=-48 instead of 42 corrected by Jean-François Alcover, Dec 22 2014

A141416 First differences of A133730.

Original entry on oeis.org

-1, -1, 2, 0, 0, -2, 4, -2, 4, -6, 12, -10, 20, -22, 44, -42, 84, -86, 172, -170, 340, -342, 684, -682, 1364, -1366, 2732, -2730, 5460, -5462, 10924, -10922, 21844, -21846, 43692, -43690, 87380, -87382, 174764, -174762, 349524, -349526, 699052, -699050, 1398100, -1398102
Offset: 0

Views

Author

Paul Curtz, Aug 05 2008

Keywords

Crossrefs

Programs

  • Magma
    I:=[-1,-1,2,0]; [n le 4 select I[n] else Self(n-2) +2*Self(n-4): n in [1..51]]; // G. C. Greubel, Mar 30 2021
    
  • Mathematica
    LinearRecurrence[{0,1,0,2}, {-1,-1,2,0}, 50] (* G. C. Greubel, Mar 30 2021 *)
    Differences[LinearRecurrence[{0,1,0,2},{1,0,-1,1},70]] (* Harvey P. Dale, Sep 04 2024 *)
  • Sage
    [((4*i^(n+1) - 2^((n+1)/2))*(1-(-1)^n) - 2*(4*i^n - 2^(n/2))*(1+(-1)^n))/12 for n in (0..50)] # G. C. Greubel, Mar 30 2021

Formula

a(2n) = (-1)^(n+1)*A084247(n).
a(2n+1) = -A078008(n).
a(2n) = -2*a(2n-1), n>0.
a(2n) + a(2n+1) = 2*(-1)^(n+1).
G.f.: (-1 -x +3*x^2 +x^3)/( (1-2*x^2)*(1+x^2) ). - R. J. Mathar, Jul 02 2011
a(n) = ((4*i^(n+1) - 2^((n+1)/2))*(1-(-1)^n) - 2*(4*i^n - 2^(n/2))*(1+(-1)^n))/12. - G. C. Greubel, Mar 30 2021

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

Original entry on oeis.org

1, 5, -15, 85, -415, 2085, -10415, 52085, -260415, 1302085, -6510415, 32552085, -162760415, 813802085, -4069010415, 20345052085, -101725260415, 508626302085, -2543131510415, 12715657552085, -63578287760415
Offset: 0

Views

Author

Philippe Deléham, Sep 22 2009

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-4,5},{1,5},30] (* Harvey P. Dale, Nov 28 2015 *)

Formula

a(n)=(-5)*a(n-1)+10 with a(0)=1. a(0)=1, a(1)=5, a(n)=5*a(n-2)-4*a(n-1). G.f.: (1+9x)/(1+4x-5x^2). a(n)= Sum_{k, 0<=k<=n} A112555(n,k)*4^(n-k).

A166065 Triangle, read by rows, given by [0,1,1,0,0,0,0,0,0,0,...] DELTA [2,-1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 2, 0, 2, 2, 0, 4, 2, 2, 0, 8, 4, 2, 2, 0, 16, 8, 4, 2, 2, 0, 32, 16, 8, 4, 2, 2, 0, 64, 32, 16, 8, 4, 2, 2, 0, 128, 64, 32, 16, 8, 4, 2, 2, 0, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 512, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 2048, 1024
Offset: 0

Views

Author

Philippe Deléham, Oct 05 2009

Keywords

Examples

			Triangle begins :
1,
0,2,
0,2,2,
0,4,2,2,
0,8,4,2,2,
0,16,8,4,2,2,
0,32,16,8,4,2,2,
0,64,32,16,8,4,2,2,
0,128,64,32,16,8,4,2,2,
0,256,128,64,32,16,8,4,2,2,
0,512,256,128,64,32,16,8,4,2,2,
		

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n*A084247(n), A000007(n), A000079(n), A001787(n+1), A166060(n), A165665(n), A083585(n) for x= -1, 0, 1, 2, 3, 4, 5 respectively. Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A040000(n), A000079(n), A095121(n), A047851(n), A047853(n), A047855(n) for x = 0, 1, 2, 3, 4, 5 respectively.
G.f.: (1-2*x+x*y)/((-1+2*x)*(x*y-1)). - R. J. Mathar, Aug 11 2015

A176961 a(n) = (3*2^(n+1) - 8 - (-2)^n)/6.

Original entry on oeis.org

1, 2, 8, 12, 36, 52, 148, 212, 596, 852, 2388, 3412, 9556, 13652, 38228, 54612, 152916, 218452, 611668, 873812, 2446676, 3495252, 9786708, 13981012, 39146836, 55924052, 156587348, 223696212, 626349396, 894784852
Offset: 1

Views

Author

Roger L. Bagula, Apr 29 2010

Keywords

Programs

  • Magma
    [(3*2^(n+1)-8-(-2)^n)/6:n in [1..40]]; // Vincenzo Librandi, Sep 15 2011
  • Mathematica
    a[1] := 1;
    a[n_] := a[n] = a[n - 1]/2 + Sqrt[(5 + 4*(-1)^(n - 1))]/2:
    Table[2^(n - 1)*a[n], {n, 1, 30}]
  • PARI
    a(n)=(3<<(n+1)-(-2)^n)\/6-1 \\ Charles R Greathouse IV, Sep 14 2011
    

Formula

a(n) - a(n-1) = A081631(n-2).
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3).
G.f.: x*(1 + x + 2*x^2) / ((x-1)*(2*x+1)*(2*x-1)). - R. J. Mathar, Apr 30 2010
a(n) = 2^n - A084247(n-1). - Bruno Berselli, Sep 15 2011

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

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 *)

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).

A166124 Triangle, read by rows, given by [0,1/2,1/2,0,0,0,0,0,0,0,...] DELTA [2,-1,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 0

Views

Author

Philippe Deléham, Oct 07 2009

Keywords

Examples

			Triangle begins :
1 ;
0,2 ;
0,1,2 ;
0,1,1,2 ;
0,1,1,1,2 ;
0,1,1,1,1,2 ;
0,1,1,1,1,1,2 ; ...
		

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^(n-k)= A166122(n), A166114(n), A084222(n), A084247(n), A000034(n), A040000(n), A000027(n+1), A000079(n), A007051(n), A047849(n), A047850(n), A047851(n), A047852(n), A047853(n), A047854(n), A047855(n), A047856(n) for x= -5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^k= A000007(n), A000027(n+1), A033484(n), A134931(n), A083597(n) for x= 0,1,2,3,4 respectively.
T(n,k)= A166065(n,k)/2^(n-k).
G.f.: (1-x+x*y)/(1-x-x*y+x^2*y). - Philippe Deléham, Nov 09 2013
T(n,k) = T(n-1,k) + T(n-1,k-1) - T(n-2,k-1), T(0,0) = 1, T(1,0) = 0, T(1,1) = 2, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 09 2013
Previous Showing 11-19 of 19 results.