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.

A163770 Triangle read by rows interpolating the swinging subfactorial (A163650) with the swinging factorial (A056040).

This page as a plain text file.
%I A163770 #29 Aug 22 2025 04:25:41
%S A163770 1,0,1,1,1,2,2,3,4,6,-9,-7,-4,0,6,44,35,28,24,24,30,-165,-121,-86,-58,
%T A163770 -34,-10,20,594,429,308,222,164,130,120,140,-2037,-1443,-1014,-706,
%U A163770 -484,-320,-190,-70,70,6824,4787,3344,2330,1624,1140,820,630,560,630
%N A163770 Triangle read by rows interpolating the swinging subfactorial (A163650) with the swinging factorial (A056040).
%C A163770 An analog to the derangement triangle (A068106).
%H A163770 G. C. Greubel, <a href="/A163770/b163770.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%H A163770 Peter Luschny, <a href="/A180000/a180000.pdf">Die schwingende Fakultät und Orbitalsysteme</a>, August 2011.
%H A163770 Peter Luschny, <a href="http://www.luschny.de/math/swing/SwingingFactorial.html">Swinging Factorial</a>.
%H A163770 M. Z. Spivey and L. L. Steil, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Spivey/spivey7.html">The k-Binomial Transforms and the Hankel Transform</a>, J. Integ. Seqs. Vol. 9 (2006), #06.1.1.
%F A163770 T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*i$ where i$ denotes the swinging factorial of i (A056040).
%e A163770 1
%e A163770 0, 1
%e A163770 1, 1, 2
%e A163770 2, 3, 4, 6
%e A163770 -9, -7, -4, 0, 6
%e A163770 44, 35, 28, 24, 24, 30
%e A163770 -165, -121, -86, -58, -34, -10, 20
%p A163770 DiffTria := proc(f,n,display) local m,A,j,i,T; T:=f(0);
%p A163770 for m from 0 by 1 to n-1 do A[m] := f(m);
%p A163770 for j from m by -1 to 1 do A[j-1] := A[j-1] - A[j] od;
%p A163770 for i from 0 to m do T := T,(-1)^(m-i)*A[i] od;
%p A163770 if display then print(seq(T[i],i=nops([T])-m..nops([T]))) fi;
%p A163770 od; subsop(1=NULL,[T]) end:
%p A163770 swing := proc(n) option remember; if n = 0 then 1 elif
%p A163770 irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
%p A163770 Computes n rows of the triangle.
%p A163770 A163770 := n -> DiffTria(k->swing(k),n,true);
%p A163770 A068106 := n -> DiffTria(k->factorial(k),n,true);
%t A163770 sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[(-1)^(n - i)*Binomial[n - k, n - i]*sf[i], {i, k, n}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jun 28 2013 *)
%Y A163770 Row sums are A163773.
%Y A163770 Cf. A056040, A163650, A163771, A163772, A068106.
%K A163770 sign,tabl,changed
%O A163770 0,6
%A A163770 _Peter Luschny_, Aug 05 2009