OFFSET
0,3
LINKS
MATHEMATICA
f[n_] := NestWhileList[# - (If[First@ # > 0, 1, Length[First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, n^2, # != 0 &]; t = Table[Table[n, {Length[#] - 1 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, ((n + 1)^2) - 1, # != (n^2) - 1 &]}], {n, 20}] // Flatten ; {0}~Join~Table[Length@ f@ t[[n]] - 1 + Length@ f[t[[n]] + 1] - n - 2, {n, 81}] (* Michael De Vlieger, Sep 08 2016 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 07 2016
STATUS
approved