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.

A245692 Number T(n,k) of endofunctions f on [n] that are self-inverse on [k] but not on [k+1]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 12, 7, 4, 4, 144, 62, 28, 12, 10, 2000, 695, 264, 100, 40, 26, 32400, 9504, 3126, 1050, 370, 130, 76, 605052, 154007, 44716, 13458, 4256, 1366, 456, 232, 12845056, 2891776, 751872, 204776, 58784, 17292, 5272, 1624, 764
Offset: 0

Views

Author

Alois P. Heinz, Jul 29 2014

Keywords

Comments

T(n,k) counts endofunctions f:{1,...,n}-> {1,...,n} with f(f(i))=i for all i in {1,...,k} and f(f(k+1))<>k+1 if k

Examples

			T(3,1) = 7: (1,1,1), (1,1,2), (1,1,3), (1,3,1), (1,3,3), (3,1,1), (3,3,1).
T(3,2) = 4: (1,2,1), (1,2,2), (2,1,1), (2,1,2).
T(3,3) = 4: (1,2,3), (1,3,2), (2,1,3), (3,2,1).
Triangle T(n,k) begins:
0 :       1;
1 :       0,      1;
2 :       1,      1,     2;
3 :      12,      7,     4,     4;
4 :     144,     62,    28,    12,   10;
5 :    2000,    695,   264,   100,   40,   26;
6 :   32400,   9504,  3126,  1050,  370,  130,  76;
7 :  605052, 154007, 44716, 13458, 4256, 1366, 456, 232;
     ...
		

Crossrefs

Column k=0 gives A076728 for n>1.
Row sums give A000312.
Main diagonal gives A000085.
Cf. A245348, A245693 (the same for permutations).

Programs

  • Maple
    g:= proc(n) g(n):= `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
    H:= (n, k)-> add(binomial(n-k, i)*binomial(k, i)*i!*
                 g(k-i)*n^(n-k-i), i=0..min(k, n-k)):
    T:= (n, k)-> H(n, k) -H(n, k+1):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    g[n_] := g[n] = If[n<2, 1, g[n-1] + (n-1)*g[n-2]]; H[0, 0] = 1; H[n_, k_] := Sum[Binomial[n-k, i]*Binomial[k, i]*i!*g[k-i]*n^(n-k-i), {i, 0, Min[k, n-k]}]; T[n_, k_] := H[n, k] - H[n, k+1]; Table[T[n, k], {n, 0, 10}, { k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)

Formula

T(n,k) = A245348(n,k) - A245348(n,k+1).

A185391 a(n) = Sum_{k=0..n} A185390(n,k) * k.

Original entry on oeis.org

0, 1, 10, 114, 1556, 25080, 468462, 9971920, 238551336, 6339784320, 185391061010, 5917263922944, 204735466350780, 7633925334590464, 305188474579874550, 13023103577435351040, 590850477768105474128, 28401410966866912051200, 1441935117039649859464986
Offset: 0

Author

Geoffrey Critzer, Feb 09 2012

Keywords

Comments

The total number of elements, x in the domain of definition of all partial functions on n labeled objects such that for all i in {1,2,3,...} (f^i)(x) is defined.

Crossrefs

Programs

  • Mathematica
    nn=20; tx=Sum[n^(n-1) x^n/n!,{n,1,nn}]; txy=Sum[n^(n-1) (x y)^n/n!, {n,1,nn}]; f[list_] := Select[list, #>0&];
      D[Range[0,nn]! CoefficientList[Series[Exp[tx]/(1-txy),{x,0,nn}],x],y]/.y->1
  • PARI
    {a(n) = (n+1)^(n+1)-sum(k=1, n+1, binomial(n+1, k)*k^k*(n+1-k)^(n+1-k))/(n+1)} \\ Seiichi Manyama, Jun 01 2019

Formula

a(n) = (n+1)^(n+1) - A001865(n+1). - Seiichi Manyama, Jun 01 2019

A262458 Number of possible conjunction tables in the n-valued logics.

Original entry on oeis.org

1, 1, 256, 14348907, 281474976710656, 2910383045673370361328125, 22452257707354557240087211123792674816, 174251498233690814305510551794710260107945042018748343, 1766847064778384329583297500742918515827483896875618958121606201292619776
Offset: 1

Author

Max Alekseyev, Sep 23 2015

Keywords

Comments

In a conjunction table, the only requirements are (i) True ^ True = True; and (ii) no other conjunction gives True. So each of the other n^2-1 entries can be assigned any of n-1 non-True values, giving raise to the formula (n-1)^(n^2-1).

References

  • H. Eves, C. V. Newsom, An Introduction to the Foundation and Fundamental concepts of Mathematics, Rinehart & Co., New York, 1958.

Crossrefs

Cf. A076728 (number of negation tables), A262459 (number of logics).

Programs

Formula

a(n) = (n-1)^(n^2-1).

A262459 Number of n-valued logics.

Original entry on oeis.org

0, 1, 3072, 2066242608, 562949953421312000, 94296410679817199707031250000, 13584783430350289567229247264873005482770432, 2238270252895659596439884146393953794861120109653175515742208
Offset: 1

Author

Yan A. Denenberg and Max Alekseyev, Sep 23 2015

Keywords

References

  • H. Eves and C. V. Newsom, An Introduction to the Foundation and Fundamental concepts of Mathematics, Rinehart & Co., New York, 1958.

Crossrefs

Cf. A076728 (number of negation tables), A262458 (number of conjunction tables).

Programs

Formula

a(n) = (n-1)^(n^2+1) * n^(n-2) = A076728(n) * A262458(n).
Showing 1-4 of 4 results.