OFFSET
0,4
EXAMPLE
a(19)=4 since 15(=2*3^2-3) is the largest hexagonal less than or equal to 19 and 19-15=4.
MATHEMATICA
Flatten[Range[#]&/@Differences[Array[#(2#-1)&, 10, 0]]-1] (* Harvey P. Dale, Jun 05 2013 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Mar 22 2001
STATUS
approved