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

A135356 Triangle T(n,k) read by rows: coefficients in the recurrence of sequences which equal their n-th differences.

Original entry on oeis.org

2, 2, 0, 3, -3, 2, 4, -6, 4, 0, 5, -10, 10, -5, 2, 6, -15, 20, -15, 6, 0, 7, -21, 35, -35, 21, -7, 2, 8, -28, 56, -70, 56, -28, 8, 0, 9, -36, 84, -126, 126, -84, 36, -9, 2, 10, -45, 120, -210, 252, -210, 120, -45, 10, 0, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 2
Offset: 1

Views

Author

Paul Curtz, Dec 08 2007, Mar 25 2008, Apr 28 2008

Keywords

Comments

Sequences which equal their p-th differences obey recurrences a(n) = Sum_{s=1..p} T(p,s)*a(n-s).
This defines T(p,s) as essentially a signed version of a chopped Pascal triangle A014410, see A130785.
For cases like p=2, 4, 6, 8, 10, 12, 14, the denominator of the rational generating function of a(n) contains a factor 1-x; depending on the first terms in the sequences a(n), additional, simpler recurrences may exist if this cancels with a factor in the numerator. - R. J. Mathar, Jun 10 2008

Examples

			Triangle begins with row n=1:
  2;
  2,   0;
  3,  -3,  2;
  4,  -6,  4,    0;
  5, -10, 10,   -5,   2;
  6, -15, 20,  -15,   6,   0;
  7, -21, 35,  -35,  21,  -7,  2;
  8, -28, 56,  -70,  56, -28,  8,  0;
  9, -36, 84, -126, 126, -84, 36, -9, 2;
		

Crossrefs

Related sequences: A000079 (n=1), A131577 (n=2), (A131708 , A130785, A131562, A057079) (n=3), (A000749, A038503, A009545, A038505) (n=4), A133476 (n=5), A140343 (n=6), A140342 (n=7).

Programs

  • Magma
    A135356:= func< n,k | k eq n select 1-(-1)^n else (-1)^(k+1)*Binomial(n,k) >;
    [A135356(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 09 2023
    
  • Maple
    T:= (p, s)->  `if`(p=s, 2*irem(p, 2), (-1)^(s+1) *binomial(p, s)):
    seq(seq(T(p, s), s=1..p), p=1..11);  # Alois P. Heinz, Aug 26 2011
  • Mathematica
    T[p_, s_]:= If[p==s, 2*Mod[s, 2], (-1)^(s+1)*Binomial[p, s]];
    Table[T[p, s], {p, 12}, {s, p}]//Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
  • SageMath
    def A135356(n,k):
        if (k==n): return 2*(n%2)
        else: return (-1)^(k+1)*binomial(n,k)
    flatten([[A135356(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Apr 09 2023

Formula

T(n,k) = (-1)^(k+1)*A007318(n, k). T(n,n) = 1 - (-1)^n.
Sum_{k=1..n} T(n, k) = 2.
From G. C. Greubel, Apr 09 2023: (Start)
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = 2*A051049(n-1).
Sum_{k=1..n-1} T(n, k) = (1 + (-1)^n).
Sum_{k=1..n-1} (-1)^(k-1)*T(n, k) = A000225(n-1).
T(2*n, n) = (-1)^(n-1)*A000984(n), n >= 1. (End)

Extensions

Edited by R. J. Mathar, Jun 10 2008

A157823 a(n) = A156591(n) + A156591(n+1).

Original entry on oeis.org

-5, -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824
Offset: 0

Views

Author

Paul Curtz, Mar 07 2009

Keywords

Comments

A156591 = 2,-7,6,-8,4,-12,... a(n) is companion to A154589 = 4,-1,-2,-4,-8,.For this kind ,companion of sequence b(n) is first differences a(n), second differences being b(n). Well known case: A131577 and A011782. a(n)+b(n)=A000079 or -A000079. a(n)=A154570(n+2)-A154570(n) ,A154570 = 1,3,-4,2,-6,-2,-14,. See sequence(s) identical to its p-th differences (A130785,A130781,A024495,A000749,A138112(linked to Fibonacci),A139761).

Programs

  • PARI
    Vec(-(9*x-5)/(2*x-1) + O(x^100)) \\ Colin Barker, Feb 03 2015

Formula

a(n) = 2*a(n-1) for n>1. G.f.: -(9*x-5) / (2*x-1). - Colin Barker, Feb 03 2015

Extensions

Edited by Charles R Greathouse IV, Oct 11 2009

A141775 Binomial transform of (1, 2, 0, 1, 2, 0, 1, 2, 0, ...).

Original entry on oeis.org

1, 3, 5, 8, 15, 31, 64, 129, 257, 512, 1023, 2047, 4096, 8193, 16385, 32768, 65535, 131071, 262144, 524289, 1048577, 2097152, 4194303, 8388607, 16777216, 33554433, 67108865, 134217728, 268435455, 536870911, 1073741824, 2147483649, 4294967297, 8589934592, 17179869183
Offset: 0

Views

Author

Gary W. Adamson, Jul 03 2008

Keywords

Comments

From Paul Curtz, Jun 15 2011: (Start)
A square array of a(n) and its higher order differences is defined by T(0,k) = a(k) and T(n,k) = T(n-1,k+1)-T(n-1,k):
1, 3, 5, 8, 15, 31,
2, 2, 3, 7, 16, 33,
0, 1, 4, 9, 17, 32, see A130785(n).
1, 3, 5, 8, 15, 31,
2, 2, 3, 7, 16, 33,
a(n) is identical to its third differences: T(n+3,k) = T(n,k).
The main diagonal is T(n,n) = 2^n. Subdiagonals are T(n,n-1) = A014551(n) and T(n,n-2) = A062510(n).
(End)

Examples

			a(4) = 8 = (1, 2, 0, 1) dot (1, 3, 3, 1) = (1 + 6 + 0 + 1).
		

Crossrefs

Programs

  • Magma
    I:=[1,3,5]; [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,3,5},40] (* Harvey P. Dale, May 29 2012 *)
  • PARI
    x='x+O('x^30); Vec((x-1)*(1+x)/((2*x-1)*(x^2-x+1))) \\ G. C. Greubel, Jan 15 2018
    

Formula

From Paul Curtz, Jun 15 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^n - A128834(n).
a(n) - 2a(n-1)= A057079(n+1).
a(n) + a(n+3) = 9*2^n.
a(n+6) - a(n) = 63*2^n.
a(n) = A130785(n) - A130785(n-1). (End)
G.f.: (x-1)*(1+x) / ( (2*x-1)*(x^2-x+1) ). - R. J. Mathar, Jun 22 2011
a(n) = 2^n + (2*sin((Pi*n)/3))/sqrt(3). - Colin Barker, Feb 10 2017

A158745 a(3n)=A130750(n). a(3n+1)=A130752(n). a(3n+2)=A130755(n).

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 8, 9, 7, 17, 16, 15, 33, 31, 32, 64, 63, 65, 127, 128, 129, 255, 257, 256, 512, 513, 511, 1025, 1024, 1023, 2049, 2047, 2048, 4096, 4095, 4097, 8191, 8192, 8193, 16383, 16385, 16384, 32768, 32769, 32767, 65537, 65536, 65535, 131073, 131071, 131072, 262144
Offset: 0

Views

Author

Paul Curtz, Mar 25 2009

Keywords

Comments

This mixes three sequences which are identical to their third differences.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,3,0,0,-3,0,0,2},{1,2,3,3,5,4,8,9,7},60] (* Harvey P. Dale, Mar 12 2023 *)

Formula

a(3n)+a(3n+1)+a(3n+2)= A007283(n+1).
a(18n) = A130750(6n)= 2^(6n+1)-1.
a(n) = 3*a(n-3)-3*a(n-6)+2*a(n-9). G.f.: -(1+2*x+3*x^2-x^4-5*x^5+2*x^6+4*x^8)/((2*x^3-1)*(x^6-x^3+1)). - R. J. Mathar, Jan 23 2009

Extensions

Edited and extended by R. J. Mathar, Apr 09 2009
Showing 1-4 of 4 results.