OFFSET
0,5
FORMULA
EXAMPLE
a(9)=3 since spiral is as marked by 9 X's in 4*3=12 rectangle, with 12-9=3 spaces unused:
X.XX
X..X
XXXX
MATHEMATICA
uar[n_]:=Module[{c=(Sqrt[8n+1]-1)/2}, Floor[c]Ceiling[c]-n]; Array[ uar, 80, 0] (* Harvey P. Dale, Oct 29 2015 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jul 13 2000
STATUS
approved