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.

A056197 Diagonal of A056151.

Original entry on oeis.org

1, 7, 38, 222, 1464, 10920, 91440, 851760, 8749440, 98340480, 1201132800, 15846969600, 224651750400, 3406180377600, 55009501747200, 942833219328000, 17093919338496000, 326876746420224000, 6575237795782656000
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2000

Keywords

Crossrefs

Cf. A056151.

Programs

  • Mathematica
    Table[(3n(n+1)+1)n!, {n, 0, 18}]

Formula

a(n)=(3n^2+3n+1)n!=((n+1)^3-n^3)n!=n!A003215(n). - Paul Barry, Apr 02 2003
E.g.f.: (1 + 4*x + x^2)/(1 - x)^3. - Ilya Gutkovskiy, May 12 2017

Extensions

More terms from Wouter Meeussen, Aug 05 2000

A056182 First differences of A003063.

Original entry on oeis.org

0, 2, 10, 38, 130, 422, 1330, 4118, 12610, 38342, 116050, 350198, 1054690, 3172262, 9533170, 28632278, 85962370, 258018182, 774316690, 2323474358, 6971471650, 20916512102, 62753730610, 188269580438, 564825518530, 1694510110022, 5083597438930, 15250926534518, 45753048039010
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2000

Keywords

Comments

Let V be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xVy if x is a proper subset of y or y is a proper subset of x. Then a(n) = |V|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For nonempty subsets see a(n+1) in A260217. - If "proper" is omitted see A027649. - For nonempty subsets with "proper" omitted see A091344. - Manfred Boergens, Sep 04 2023
It appears that a(n) is the number of permutations p of 1,..,(n+2) such that max[p(i+1)-p(i)] is 2. For example, for n=1, the permutations (1,3,2) and (2,1,3) and no others have the desired property, so a(1)=2. This approach gives values in agreement with all listed terms. [John W. Layman, Nov 09 2011]
In the terdragon curve, a(n-1) is the number of enclosed unit triangles in expansion level n. - Kevin Ryde, Oct 20 2020

Crossrefs

3rd column of A056151. Cf. A028243 (partial sums).
A002783(n) - 1.
a(n) = A293181(n+1,3).

Programs

  • Maple
    A056182:=n->2 * (3^n - 2^n); seq(A056182(n), n=0..30); # Wesley Ivan Hurt, Feb 10 2014
  • Mathematica
    Table[ -((-1 + k)^(1-k+n)*(-1+k)!)+k^(-k+n)*k! /. k -> 3, {n, 3, 36} ]
    Table[2 (3^n - 2^n), {n, 0, 30}] (* Wesley Ivan Hurt, Feb 10 2014 *)
    CoefficientList[Series[2 x/((2 x - 1) (3 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
    LinearRecurrence[{5,-6},{0,2},30] (* Harvey P. Dale, Sep 22 2015 *)

Formula

a(n) = 2 * (3^n - 2^n).
a(n) = 5*a(n-1)-6*a(n-2). G.f.: 2*x/((2*x-1)*(3*x-1)). [Colin Barker, Dec 10 2012]
a(n) = A217764(n,3). - Ross La Haye, Mar 27 2013
a(n) = sum_{i=1..n} binomial(n, i) * 2^(n - i + 1). - Wesley Ivan Hurt, Feb 10 2014
a(n) = 2 * A001047(n). - Wesley Ivan Hurt, Feb 10 2014
E.g.f.: 2*exp(2*x)*(exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

More terms from Wouter Meeussen, Aug 05 2000

A130152 Triangle read by rows: T(n,k) = number of permutations p of [n] such that max(|p(i)-i|)=k (n>=1, 0<=k<=n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 4, 9, 10, 1, 7, 23, 47, 42, 1, 12, 60, 157, 274, 216, 1, 20, 151, 503, 1227, 1818, 1320, 1, 33, 366, 1669, 4833, 10402, 13656, 9360, 1, 54, 877, 5472, 18827, 50879, 96090, 115080, 75600, 1, 88, 2088, 17531, 75693, 234061, 569602, 966456, 1077840, 685440, 1, 143, 4937, 55135, 304900, 1076807, 3111243, 6791994, 10553640, 11123280, 6894720
Offset: 1

Views

Author

Emeric Deutsch, May 27 2007

Keywords

Comments

Row sums are the factorials. T(n,n) = (n-2)!*(2n-3) = A007680(n-2) (for n>=2). T(n,1) = Fibonacci(n+1)-1 = A000071(n+1). Sum_{k=0..n-1} k*T(n,k) = A130153(n). For the statistic max(p(i)-i) see A056151.

Examples

			T(4,1) = 4 because we have 1243, 1324, 2134 and 2143.
Triangle starts:
  1;
  1,  1;
  1,  2,  3;
  1,  4,  9,  10;
  1,  7, 23,  47,  42;
  1, 12, 60, 157, 274, 216;
  ...
		

Crossrefs

Row sums give A000142.
T(n,floor(n/2)) gives A323807.

Programs

  • Maple
    with(combinat): for n from 1 to 7 do P:=permute(n): for i from 0 to n-1 do ct[i]:=0 od: for j from 1 to n! do if max(seq(abs(P[j][i]-i),i=1..n))=0 then ct[0]:=ct[0]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=1 then ct[1]:=ct[1]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=2 then ct[2]:=ct[2]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=3 then ct[3]:=ct[3]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=4 then ct[4]:=ct[4]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=5 then ct[5]:=ct[5]+1 elif max(seq(abs(P[j][i]-i),i=1..n))=6 then ct[6]:=ct[6]+1 else fi od: a[n]:=seq(ct[i],i=0..n-1): od: for n from 1 to 7 do a[n] od; # a cumbersome program to obtain, by straightforward counting, the first 7 rows of the triangle
    n := 8: st := proc (p) max(seq(abs(p[j]-j), j = 1 .. nops(p))) end proc: with(combinat): P := permute(n): f := sort(add(t^st(P[i]), i = 1 .. factorial(n))); # program gives the row generating polynomial for the specified n - Emeric Deutsch, Aug 13 2009
    # second Maple program:
    b:= proc(s) option remember; (n-> `if`(n=0, 1, add((p-> add(
          coeff(p, x, i)*x^max(i, abs(n-j)), i=0..degree(p)))(
            b(s minus {j})), j=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b({$1..n})):
    seq(T(n), n=1..10);  # Alois P. Heinz, Jan 21 2019
    # third Maple program:
    A:= proc(n, k) option remember; LinearAlgebra[Permanent](
          Matrix(n, (i, j)-> `if`(abs(i-j)<=k, 1, 0)))
        end:
    T:= (n, k)-> A(n, k)-A(n, k-1):
    seq(seq(T(n, k), k=0..n-1), n=1..10);  # Alois P. Heinz, Jan 22 2019
  • Mathematica
    (* from second Maple program: *)
    b[s_List] := b[s] = Function[n, If[n == 0, 1, Sum[Function[p, Sum[ Coefficient[p, x, i]*x^Max[i, Abs[n - j]], {i, 0, Exponent[p, x]}]][b[s ~Complement~ {j}]], {j, s}]]][Length[s]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n-1}]][b[Range[n]] ];
    Table[T[n], {n, 1, 11}] // Flatten
    (* from third Maple program: *)
    A[n_, k_] := A[n, k] = Permanent[Table[If[Abs[i-j] <= k, 1, 0], {i, 1, n}, {j, 1, n}]];
    T[n_, k_] := A[n, k] - A[n, k - 1];
    Table[Table[T[n, k], {k, 0, n - 1}], {n, 1, 11}] // Flatten (* Jean-François Alcover, Dec 06 2019, after Alois P. Heinz *)

Formula

T(n,k) = A306209(n,k) - A306209(n,k-1) for k > 0, T(n,0) = 1. - Alois P. Heinz, Jan 29 2019

Extensions

More terms from R. J. Mathar, Oct 15 2007

A018927 For each permutation p of {1,2,...,n} define maxjump(p) = max(p(i) - i); a(n) is sum of maxjumps of all p.

Original entry on oeis.org

0, 1, 7, 45, 313, 2421, 20833, 198309, 2073793, 23664021, 292834513, 3907994949, 55967406433, 856355084661, 13944569166193, 240803714700069, 4395998055854593, 84596337986326101, 1711691067680320273, 36329581765125539589, 807099012174816776353
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[k*k!*((k+1)^(n-k)-k^(n-k)),{k,0,n-1}],{n,1,20}] (* Vaclav Kotesovec, Mar 17 2014 *)

Formula

a(n) = Sum_{k=0..n-1} k*k!*((k+1)^(n-k)-k^(n-k)).
a(n) = Sum_{k=0..n*(n-1)/2} k*A127452(n-1,k). - Paul D. Hanna, Jan 15 2007
a(n) = Sum_{k=0..n-1} k * A180190(n,k). - Alois P. Heinz, Feb 21 2019
Showing 1-4 of 4 results.