login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #20 Feb 04 2023 09:53:16

%S 1,1,6,1,10,27,1,14,69,108,1,18,123,404,405,1,22,195,892,2155,1458,1,

%T 26,273,1716,5845,10830,5103,1,30,375,2732,13525,36042,52241,17496,1,

%U 34,477,4324,24575,99774,213647,244648,59049,1,38,603,6060,44545,208146,705215,1232504,1120599,196830

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

%C Table starts

%C 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%C 6, 10, 14, 18, 22, 26, 30, 34, 38, ...

%C 27, 69, 123, 195, 273, 375, 477, 603, ...

%C 108, 404, 892, 1716, 2732, 4324, 6060, ...

%C 405, 2155, 5845, 13525, 24575, 44545, ...

%C 1458, 10830, 36042, 99774, 208146, ...

%C 5103, 52241, 213647, 705215, ...

%C 17496, 244648, ...

%C 59049, ...

%C ...

%H Robert Israel, <a href="/A224524/b224524.txt">Table of n, a(n) for n = 1..10011</a>

%e Some solutions for n=3, k=4:

%e 1 0 0 0 4 4 0 0 0 0 4 2 1 2 1 0 0 0 0 1 0

%e 0 0 0 0 1 1 3 1 0 0 0 0 0 0 0 0 0 0 0 1 0

%e 1 0 0 0 0 0 0 0 0 0 2 1 0 0 0 1 4 1 0 0 0

%p f:= proc(n,k)

%p local tot, a1, a0, a2, m,u;

%p tot:= 0;

%p for a1 from 1 to n do

%p for a0 from 0 to n-a1 do

%p a2:= n-a1-a0;

%p if a0 = 0 then tot:= tot + n!/(a1!*a2!)*a1*(k-1)^a2

%p elif a2 = 0 then tot:= tot + n!/(a0!*a1!)*a1*(k+1)^a0

%p else

%p u:= n!/(a0!*a1!*a2!)*a1;

%p for m from 2 to k do

%p tot:= tot + u*((m-1)^a2 - (m-2)^a2)*(floor(k/m)+1)^a0

%p od

%p fi

%p od od;

%p tot

%p end proc:

%p seq(seq(f(i,j-i),i=1..j-1),j=2..20); # _Robert Israel_, Dec 15 2019

%t Unprotect[Power]; 0^0 = 1; Protect[Power];

%t 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 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 Column 1 is A027471(n+1).

%K nonn,tabl

%O 1,3

%A _R. H. Hardin_, Apr 09 2013