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

A174551 Triangular array T(n,k): functions f:{1,2,...,n}-> {1,2,...,n} such that each of k fixed (but arbitrary) elements are in the image of f.

Original entry on oeis.org

1, 1, 1, 4, 3, 2, 27, 19, 12, 6, 256, 175, 110, 60, 24, 3125, 2101, 1320, 750, 360, 120, 46656, 31031, 19502, 11340, 5880, 2520, 720, 823543, 543607, 341796, 201726, 109200, 52080, 20160, 5040, 16777216, 11012415, 6927230, 4131036, 2298744, 1164240, 514080, 181440, 40320
Offset: 0

Views

Author

Geoffrey Critzer, Mar 22 2010

Keywords

Examples

			Letting the k arbitrary elements be {1,2}, T(3,2) = 12 because there are 12 such functions from [3] into [3]. {1, 1, 2}, {1, 2, 1}, {1, 2, 2}, {1, 2, 3}, {1, 3, 2}, {2, 1, 1}, {2,1, 2}, {2, 1, 3}, {2, 2, 1}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}.
The triangle begins:
1;
1, 1;
4, 3, 2;
27, 19, 12, 6;
256, 175, 110, 60, 24;
3125, 2101, 1320, 750, 360, 120;
46656, 31031, 19502, 11340, 5880, 2520, 720;
823543, 543607, 341796, 201726, 109200, 52080, 20160, 5040;
		

Crossrefs

Programs

  • Maple
    T:= (n,k)-> add((-1)^i*binomial(k, i)*(n-i)^n, i=0..k):
    seq(seq(T(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Dec 26 2012
  • Mathematica
    Table[Table[ Sum[(-1)^i Binomial[k, i] (n - i)^n, {i, 0, k}], {k, 0, n}], {n, 0, 7}] // Grid

Formula

T(n,k) = Sum_{i=0..k} (-1)^i C(k,i) (n-i)^n; T(n,0) = n^n; T(n,n) = n!.

A126232 Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contains 5 fixed elements.

Original entry on oeis.org

120, 2520, 52080, 1164240, 28594440, 771309000, 22746757440, 729419296320, 25295774463960, 943934414262840, 37728367833920400, 1608541146018621360, 72881990543360522280, 3497670707401587171240, 177254235519701336515680
Offset: 5

Views

Author

Aleksandar M. Janjic and Milan Janjic, Mar 08 2007

Keywords

Examples

			a(10)=771309000.
		

Crossrefs

Programs

  • Maple
    a(n):n->n^n-5*(n-1)^n+10*(n-2)^n-10*(n-3)^n+5*(n-4)^n-(n-5)^n;
  • Mathematica
    Drop[Table[Sum[(-1)^k Binomial[5,k] (n-k)^n,{k,0,5}],{n,1,20}],4]  (* Geoffrey Critzer, Dec 23 2012 *)

Formula

a(n)=n^n-5*(n-1)^n+10*(n-2)^n-10*(n-3)^n+5*(n-4)^n-(n-5)^n.
Showing 1-2 of 2 results.