OFFSET
1,3
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..100
FORMULA
Conjectures from Colin Barker, Dec 06 2018: (Start)
G.f. = x(1+x)/(1-x-x^3+x^4) [Simplified by N. J. A. Sloane, Dec 06 2018]
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
(End)
Conjecture: a(n) = n - ceiling(n/3) = A004523(n).
MAPLE
hist2:=proc(n) local A, i, j, m, d1, d2, d3, d4;
A:=Array(0..n, 0);
for i from 0 to n-1 do
for j from 0 to n-1 do
d1:=i+j;
d2:=n-i;
d3:=2*n-i-j;
d4:=n-j;
if i+j<n then
m:=min(d1, d2, d3, d4);
elif i+j=n then m:=min(i, j);
else
m:=min(d1, i, j, d3);
fi;
A[m]:=A[m]+1;
od: od:
R:=0;
for i from 0 to n-1 do if A[i] <> 0 then R:=i; fi; od:
R;
end;
RR:=[];
for n from 1 to 100 do RR:=[op(RR), hist2(n)]; od: RR;
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 06 2018
STATUS
approved