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.

A292948 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where A(0,k) = 1 and A(n,k) = (-1)^(k+1) * Sum_{i=0..n-1} (-1)^i * binomial(n-1,i) * binomial(i+1,k) * A(n-1-i,k) for n > 0.

Original entry on oeis.org

1, 1, -1, 1, 1, 2, 1, 0, -1, -5, 1, 0, 1, -2, 15, 1, 0, 0, -3, 9, -52, 1, 0, 0, 1, 9, -4, 203, 1, 0, 0, 0, -4, -40, -95, -877, 1, 0, 0, 0, 1, 10, 210, 414, 4140, 1, 0, 0, 0, 0, -5, -10, -1176, 49, -21147, 1, 0, 0, 0, 0, 1, 15, -105, 7273, -10088, 115975, 1, 0, 0
Offset: 0

Views

Author

Seiichi Manyama, Sep 27 2017

Keywords

Examples

			Square array begins:
    1,  1,  1,  1, 1, ...
   -1,  1,  0,  0, 0, ...
    2, -1,  1,  0, 0, ...
   -5, -2, -3,  1, 0, ...
   15,  9,  9, -4, 1, ...
		

Crossrefs

Columns k=0-5 give: A292935, A003725, A292909, A292910, A292912, A292950.
Rows n=0 gives A000012.
Main diagonal gives A000012.
Cf. A145460.

Programs

  • Ruby
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      ary = [1]
      (1..n).each{|i| ary << (-1) ** (k % 2 + 1) * (0..i - 1).inject(0){|s, j| s + (-1) ** (j % 2) * ncr(i - 1, j) * ncr(j + 1, k) * ary[i - 1 - j]}}
      ary
    end
    def A292948(n)
      a = []
      (0..n).each{|i| a << A(i, n - i)}
      ary = []
      (0..n).each{|i|
        (0..i).each{|j|
          ary << a[i - j][j]
        }
      }
      ary
    end
    p A292948(20)

A292973 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(0,k) = 1 and T(n,k) = (-1)^(k+1) * k! * Sum_{i=0..n-1} (-1)^i * binomial(n-1,i) * binomial(i+1,k) * T(n-1-i,k) for n > 0.

Original entry on oeis.org

1, 1, -1, 1, 1, 2, 1, 0, -1, -5, 1, 0, 2, -2, 15, 1, 0, 0, -6, 9, -52, 1, 0, 0, 6, 24, -4, 203, 1, 0, 0, 0, -24, -140, -95, -877, 1, 0, 0, 0, 24, 60, 870, 414, 4140, 1, 0, 0, 0, 0, -120, 240, -5922, 49, -21147, 1, 0, 0, 0, 0, 120, 360, -4830, 45416, -10088, 115975
Offset: 0

Views

Author

Seiichi Manyama, Sep 27 2017

Keywords

Examples

			Square array begins:
   1,  1,  1,   1,  1, ...
  -1,  1,  0,   0,  0, ...
   2, -1,  2,   0,  0, ...
  -5, -2, -6,   6,  0, ...
  15,  9, 24, -24, 24, ...
		

Crossrefs

Columns k=0-5 give: A292935, A003725, A292907, A292908, A292969, A292970.
Rows n=0 gives A000012.
Main diagonal gives A000142.

Programs

  • Ruby
    def f(n)
      return 1 if n < 2
      (1..n).inject(:*)
    end
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      ary = [1]
      (1..n).each{|i| ary << (-1) ** (k % 2 + 1) * f(k) * (0..i - 1).inject(0){|s, j| s + (-1) ** (j % 2) * ncr(i - 1, j) * ncr(j + 1, k) * ary[i - 1 - j]}}
      ary
    end
    def A292973(n)
      a = []
      (0..n).each{|i| a << A(i, n - i)}
      ary = []
      (0..n).each{|i|
        (0..i).each{|j|
          ary << a[i - j][j]
        }
      }
      ary
    end
    p A292973(20)

Formula

T(n,k) = n! * Sum_{j=0..floor(n/k)} (-j)^(n-k*j)/(j! * (n-k*j)!) for k > 0. - Seiichi Manyama, Jul 10 2022

A345652 Expansion of the e.g.f. exp(-1 + (x + 1)*exp(-x)).

Original entry on oeis.org

1, 0, -1, 2, 0, -16, 65, -78, -749, 6232, -22068, -28920, 1004685, -7408740, 22263215, 157632230, -2874256740, 21590948480, -53087332675, -956539294506, 16344490525835, -132605481091060, 294656170409328, 9113173803517344, -167298122286332823
Offset: 0

Views

Author

Mélika Tebni, Jun 21 2021

Keywords

Comments

For all p prime, a(p)/(p-1) == 1 (mod p). - Mélika Tebni, Mar 21 2022

Examples

			exp(-1+(x+1)*exp(-x)) = 1 - x^2/2! + 2*x^3/3! - 16*x^5/5! + 65*x^6/6! - 78*x^7/7! - 749*x^8/8! + 6232*x^9/9! + ...
		

Crossrefs

Cf. A292935 (without 1+x: EGF e^(e^(-x)-1)), A000110 (absolute values: Bell numbers, EGF e^(e^x-1))

Programs

  • Maple
    a := series(exp(-1+(x+1)*exp(-x)), x=0, 25): seq(n!*coeff(a, x, n), n=0..24);
    a := proc(n) option remember; `if`(n=0, 1, add((n-1)*binomial(n-2, k)*(-1)^(n-1-k)*a(k), k=0..n-2)) end: seq(a(n), n=0..24);
    # third program:
    A345652 := n -> add((-1)^(n-k)*combinat[bell](k)*A106828(n, k), k=0..iquo(n, 2)):
    seq(A345652(n), n=0..24); # Mélika Tebni, Sep 21 2021
  • Mathematica
    nmax = 24; CoefficientList[Series[Exp[-1+(x+1)*Exp[-x]], {x, 0, nmax}], x] Range[0, nmax]!
  • PARI
    seq(n) = {Vec(serlaplace(exp(-1+(x+1)*exp(-x + O(x*x^n)))))} \\ Andrew Howroyd, Jun 21 2021
    
  • PARI
    a(n) = if(n==0, 1, sum(k=2, n, (-1)^(k-1)*(k-1)*binomial(n-1, k-1)*a(n-k))); \\ Seiichi Manyama, Mar 15 2022

Formula

The e.g.f. y(x) satisfies y' = -x*y*exp(-x).
a(n) = Sum_{k=0..n-2} (n-1)*binomial(n-2, k)*(-1)^(n-1-k)*a(k) for n > 0.
Conjecture: a(n) = 0 for only n = 1 and n = 4.
Conjecture: For all p prime, a(p)^2 == 1 (mod p).
Stronger conjecture: For n > 1, a(n) == -1 (mod n) iff n is a prime or 6. - M. F. Hasler, Jun 23 2021
a(n) = Sum_{k=0..floor(n/2)} (-1)^(n-k)*Bell(k)*A106828(n, k). - Mélika Tebni, Sep 21 2021
a(n) = Sum_{k=0..n} (-1)^k*A003725(n-k)*Bell(k)*binomial(n, k). - Mélika Tebni, Mar 21 2022

A352145 Expansion of e.g.f. exp(-1 + cos(x) + sin(x)).

Original entry on oeis.org

1, 1, 0, -3, -5, 12, 71, 7, -1028, -2573, 14793, 100188, -128831, -3445791, -5741800, 113954461, 601512787, -3296210612, -41316895641, 37322755431, 2570678600548, 6983413204755, -149303353515823, -1080122148248420, 7405149869523649, 119115584584019713
Offset: 0

Views

Author

Seiichi Manyama, Mar 15 2022

Keywords

Crossrefs

Programs

  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(-1+cos(x)+sin(x))))
    
  • PARI
    a(n) = if(n==0, 1, sum(k=1, n, (-1)^(k\2)*binomial(n-1, k-1)*a(n-k)));

Formula

a(0) = 1; a(n) = Sum_{k=1..n} (-1)^floor(k/2) * binomial(n-1,k-1) * a(n-k).
Showing 1-4 of 4 results.