login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226554 Number of squares in all tilings of an n X n square using integer-sided square tiles. 4

%I #18 Apr 27 2022 08:55:43

%S 0,1,5,34,386,6940,221672,12582472,1293374998,242394178200,

%T 83374069529638,52845726291860344,61928161880183204434,

%U 134499571879749571406816,542432658409586214809714176,4068438590479352629770422328000,56820656114941381799512710314429768

%N Number of squares in all tilings of an n X n square using integer-sided square tiles.

%p b:= proc(n, l) option remember; local i, k, s, t;

%p if max(l[])>n then [0, 0] elif n=0 or l=[] then [1, 0]

%p elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))

%p else for k do if l[k]=0 then break fi od; s:=[0$2];

%p for i from k to nops(l) while l[i]=0 do s:=s+(h->h+[0, h[1]])

%p (b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))

%p od; s

%p fi

%p end:

%p a:= n-> b(n, [0$n])[2]:

%p seq(a(n), n=0..10);

%t b[n_, l_] := b[n, l] = Module[{i, k, s, t},

%t Which[Max[l] > n, {0, 0}, n == 0 || l == {}, {1, 0},

%t Min[l] > 0, t = Min[l]; b[n - t, l - t], True,

%t k = Position[l, 0, 1][[1, 1]]; s = {0, 0};

%t For[i = k, i <= Length[l] && l[[i]] == 0, i++,

%t s = s + Function[h, h + {0, h[[1]]}][b[n, Join[l[[1;; k-1]],

%t Table[1+i-k, {j, k, i}], l[[i+1;;]]]]]]; s]];

%t a[n_] := b[n, Array[0&, n]][[2]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 15}] (* _Jean-François Alcover_, Apr 27 2022, after _Alois P. Heinz_ in A226545 *)

%Y Main diagonal of A226545.

%Y Row sums of A226936.

%Y Cf. A045846.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jun 10 2013

%E a(16) from _Alois P. Heinz_, Nov 16 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 05:46 EDT 2024. Contains 372300 sequences. (Running on oeis4.)