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.

A117441 Periodic with repeating part {1,1,0,1,-1,0,-1,-1,0,-1,1,0}.

Original entry on oeis.org

1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0
Offset: 0

Views

Author

Paul Barry, Mar 16 2006

Keywords

Comments

Diagonal sums of number triangle A117440.

Examples

			G.f. = 1 + x + x^3 - x^4 - x^6 - x^7 - x^9 + x^10 + x^12 + x^13 + x^15 + ...
		

Crossrefs

Programs

  • Mathematica
    a[1] := 1; a[2] := 1; a[n_] := a[n] = a[n - 2] + (-1)^(n) a[n - 1]; Array[a, 100] (* José María Grau Ribas, Jan 08 2012 *)
    PadRight[{},84,{1,1,0,1,-1,0,-1,-1,0,-1,1,0}] (* Harvey P. Dale, Mar 30 2012 *)
    a[ n_] := KroneckerSymbol[ -6, 2 n + 5]; (* Michael Somos, Jul 18 2015 *)
    LinearRecurrence[{0, 1, 0, -1},{1, 1, 0, 1},78] (* Ray Chandler, Aug 25 2015 *)
  • PARI
    Vec((1+x-x^2)/(1-x^2+x^4)+O(x^99)) \\ Charles R Greathouse IV, Jan 10 2012
    
  • PARI
    {a(n) = kronecker( -6, 2*n + 5)}; /* Michael Somos, Jul 18 2015 */

Formula

G.f.: (1+x-x^2)/(1-x^2+x^4).
a(n) = Sum_{k=0..floor(n/2)} C(n-k,k)*(cos(Pi*(n-2*k)/2)+sin(Pi*(n-2*k)/2)).
a(1)=a(2)=1; a(n) = a(n-2) + (-1)^n*a(n-1). - José María Grau Ribas, Jan 08 2012
a(n) = A260190(n+2) = A260192(n-1). a(2*n + 1) = A010892(n). a(3*n) = A057077(n). a(3*n + 1) = A087960(n). a(3*n + 2) = 0. - Michael Somos, Jul 18 2015

Extensions

More terms from Sean A. Irvine, Sep 26 2011

A117442 Number triangle read by rows, related to exp(x)/(cos(x) + sin(x)).

Original entry on oeis.org

1, -1, 1, 3, -2, 1, -11, 9, -3, 1, 57, -44, 18, -4, 1, -361, 285, -110, 30, -5, 1, 2763, -2166, 855, -220, 45, -6, 1, -24611, 19341, -7581, 1995, -385, 63, -7, 1, 250737, -196888, 77364, -20216, 3990, -616, 84, -8, 1, -2873041, 2256633, -885996, 232092, -45486, 7182, -924, 108, -9, 1
Offset: 0

Views

Author

Paul Barry, Mar 16 2006

Keywords

Examples

			Triangle begins
       1;
      -1,     1;
       3,    -2,     1;
     -11,     9,    -3,    1;
      57,   -44,    18,   -4,    1;
    -361,   285,  -110,   30,   -5,  1;
    2763, -2166,   855, -220,   45, -6,  1;
  -24611, 19341, -7581, 1995, -385, 63, -7, 1;
		

Crossrefs

Inverse of A117440.
Second column contains A161722 as subsequence.

Programs

  • Maple
    A117442_row := proc(n) 2^n*add(binomial(n,k)*euler(k)*((x+1)/2)^(n-k), k=0..n);
    seq((-1)^(n-j)*abs(coeff(%,x,j)),j=0..n) end:
    seq(print(A117442_row(n)),n=0..5);  # Peter Luschny, Jun 08 2013
  • Mathematica
    row[n_] := row[n] = 2^n Sum[Binomial[n, k] EulerE[k] ((x+1)/2)^(n-k), {k, 0, n}];
    T[n_, k_] := (-1)^(n-k) Abs[Coefficient[row[n], x, k]];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] (* Jean-François Alcover, Jun 13 2019, from Maple *)
    Table[(-1)^(n-k)*Binomial[n, k]*Abs[Numerator[EulerE[n-k, 1/4]]], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jun 02 2021 *)
  • PARI
    E(n) = 2^n*2^(n+1)*(subst(bernpol(n+1, x), x, 3/4) - subst(bernpol(n+1, x), x, 1/4))/(n+1); \\ A122045
    p(n) = 2^n*sum(k=0, n, binomial(n,k)*E(k)*((x+1)/2)^(n-k));
    row(n) = my(rp=p(n)); vector(n+1, k, k--; (-1)^(n-k)*abs(polcoeff(rp, k))); \\ Michel Marcus, Nov 16 2020
    
  • Sage
    def f(n): return (1/4)^n*sum( binomial(n, j)*2^j*euler_number(j) for j in (0..n)) # f(n) = Euler(n, 1/4)
    def A117442(n,k): return (-1)^(n+k)*binomial(n,k)*abs(numerator(f(n-k)))
    flatten([[A117442(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 02 2021

Formula

T(n, 0) = (-1)^n*A001586(n).
Sum_{k=0..n} T(n, k) = A117443(n).
Column k has e.g.f. (x^k/k!)/(cos(x) + sin(x)).
Apart from signs the T(n,k) are the coefficients of the polynomials p(n, x) = 2^n*Sum_{k=0..n} binomial(n,k)*euler(k)*((x+1)/2)^(n-k). - Peter Luschny, Jun 08 2013
From G. C. Greubel, Jun 02 2021: (Start)
T(n, k) = (-1)^(n+k) * binomial(n, k) * abs(numerator( Euler(n-k, 1/4) )), where Euler(n, x) is the Euler number polynomial.
T(n, n) = 1.
T(n, n-1) = -A000027(n) = -binomial(n+1, 1).
T(n, n-2) = A045943(n+1) = 3*binomial(n+2, 2).
T(n, n-3) = -A111080(n) = -11*binomial(n+3, 3).
T(j, k) = (-1)^k * binomial(j+k, k) * abs(numerator( Euler(k, 1/4) )) (columns).
T(n, n-j) = (-1)^n * binomial(n+j, j) * abs(numerator( Euler(n, 1/4) )) (downward diagonals). (End)
The pair of triangles P*((I + P^4)/2)^(-1) and P^3*((I + P^4)/2)^(-1), where P denotes Pascal's triangle A007318, give the present triangle but with a different pattern of signs. - Peter Bala, Mar 07 2024

A168557 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial (-1)^n*((x + 1)^n - x^n + 1), 0 <= k <= max(0, n - 1).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Nov 29 2009

Keywords

Comments

A variant of Pascal's triangle, the first column replaced by 2 (if n > 0), the last column dropped, and then odd rows multiplied by (-1)^n.
Absolute value row sums are A000079.

Examples

			Triangle begins:
   1;
  -2;
   2,   2;
  -2,  -3,  -3;
   2,   4,   6,    4;
  -2,  -5, -10,  -10,   -5;
   2,   6,  15,   20,   15,    6;
  -2,  -7, -21,  -35,  -35,  -21,   -7;
   2,   8,  28,   56,   70,   56,   28,    8;
  -2,  -9, -36,  -84, -126, -126,  -84,  -36,   -9;
   2,  10,  45,  120,  210,  252,  210,  120,   45,  10;
  -2, -11, -55, -165, -330, -462, -462, -330, -165, -55, -11;
   2,  12,  66,  220,  495,  792,  924,  792,  495,  220, 66, 12;
   ...
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[(-1)^n*(x + 1)^n - (-1)^n*(x^n - 1), x], {n, 0, 12}]
  • Maxima
    create_list((-1)^n*binomial(n, k) + (-1)^n*kron_delta(0, k) - kron_delta(0, n), n, 0, 12, k, 0, max(0, n - 1)); /* Franck Maminirina Ramaharo, Nov 21 2018 */

Formula

From Franck Maminirina Ramaharo, Nov 22 2018: (Start)
T(n,k) = (-1)^n*binomial(n, k) + (-1)^n*delta(0, k) - delta(0, n), where delta is Kronecker's delta-symbol.
G.f.: (1 + 2*x*y - (1 - x - x^2)*y^2)/((1 + y)*(1 + x*y)*(1 + y + x*y)).
E.g.f.: (1 - exp(y) + exp(x*y))*exp(-(1 + x)*y). (End)
Showing 1-3 of 3 results.