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.

A224524 Table read by antidiagonals: T(n,k) is the number of idempotent n X n 0..k matrices of rank 1.

This page as a plain text file.
%I A224524 #20 Feb 04 2023 09:53:16
%S A224524 1,1,6,1,10,27,1,14,69,108,1,18,123,404,405,1,22,195,892,2155,1458,1,
%T A224524 26,273,1716,5845,10830,5103,1,30,375,2732,13525,36042,52241,17496,1,
%U A224524 34,477,4324,24575,99774,213647,244648,59049,1,38,603,6060,44545,208146,705215,1232504,1120599,196830
%N A224524 Table read by antidiagonals: T(n,k) is the number of idempotent n X n 0..k matrices of rank 1.
%C A224524 Table starts
%C A224524       1,      1,      1,      1,      1,     1,    1,   1,  1, 1, ...
%C A224524       6,     10,     14,     18,     22,    26,   30,  34, 38, ...
%C A224524      27,     69,    123,    195,    273,   375,  477, 603, ...
%C A224524     108,    404,    892,   1716,   2732,  4324, 6060, ...
%C A224524     405,   2155,   5845,  13525,  24575, 44545, ...
%C A224524    1458,  10830,  36042,  99774, 208146, ...
%C A224524    5103,  52241, 213647, 705215, ...
%C A224524   17496, 244648, ...
%C A224524   59049, ...
%C A224524   ...
%H A224524 Robert Israel, <a href="/A224524/b224524.txt">Table of n, a(n) for n = 1..10011</a>
%e A224524 Some solutions for n=3, k=4:
%e A224524   1 0 0   0 4 4   0 0 0   0 4 2   1 2 1   0 0 0   0 1 0
%e A224524   0 0 0   0 1 1   3 1 0   0 0 0   0 0 0   0 0 0   0 1 0
%e A224524   1 0 0   0 0 0   0 0 0   0 2 1   0 0 0   1 4 1   0 0 0
%p A224524 f:= proc(n,k)
%p A224524   local tot, a1, a0, a2, m,u;
%p A224524   tot:= 0;
%p A224524   for a1 from 1 to n do
%p A224524     for a0 from 0 to n-a1 do
%p A224524       a2:= n-a1-a0;
%p A224524       if a0 = 0 then tot:= tot + n!/(a1!*a2!)*a1*(k-1)^a2
%p A224524       elif a2 = 0 then tot:= tot + n!/(a0!*a1!)*a1*(k+1)^a0
%p A224524       else
%p A224524         u:= n!/(a0!*a1!*a2!)*a1;
%p A224524         for m from 2 to k do
%p A224524           tot:= tot + u*((m-1)^a2 - (m-2)^a2)*(floor(k/m)+1)^a0
%p A224524         od
%p A224524       fi
%p A224524   od od;
%p A224524   tot
%p A224524 end proc:
%p A224524 seq(seq(f(i,j-i),i=1..j-1),j=2..20); # _Robert Israel_, Dec 15 2019
%t A224524 Unprotect[Power]; 0^0 = 1; Protect[Power];
%t A224524 f[n_, k_] := Module[{tot, a1, a0, a2, m, u}, tot = 0; For[a1 = 1, a1 <= n, a1++, For[a0 = 0, a0 <= n - a1, a0++, a2 = n - a1 - a0; Which[a0 == 0, tot = tot + n!/(a1!*a2!)*a1*(k - 1)^a2, a2 == 0, tot = tot + n!/(a0!*a1!)*a1*(k + 1)^a0, True, u = n!/(a0!*a1!*a2!)*a1; For[m = 2, m <= k, m++, tot = tot + u*((m - 1)^a2 - (m - 2)^a2)*(Floor[k/m] + 1)^a0]]]]; tot];
%t A224524 Table[Table[f[i, j - i], {i, 1, j - 1}], {j, 2, 20}] // Flatten (* _Jean-François Alcover_, Feb 04 2023, after _Robert Israel_ *)
%Y A224524 Column 1 is A027471(n+1).
%K A224524 nonn,tabl
%O A224524 1,3
%A A224524 _R. H. Hardin_, Apr 09 2013