OFFSET
1,1
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(9) = 4. Take {n*k} with k = .414213...= sqrt(2) - 1. Then {9*.414...} = .727922...with (.727922...)*(1 - .727922...) = .1980515...Invert, taking floor = 5. Finally, subtract 1 = 4.
MAPLE
A090038 := proc(n)
k := sqrt(2)-1 ;
fn := fpart(n*k) ;
1/fn/(1-fn);
floor(%)-1 ;
end proc: # R. J. Mathar, May 11 2013
MATHEMATICA
Table[Floor[1/(FractionalPart[n*(Sqrt[2] - 1)] - FractionalPart[n*(Sqrt[2] - 1)]^2)] - 1, {n, 1, 100}] (* G. C. Greubel, Sep 27 2018 *)
PROG
(PARI) a(n) = floor(1/(frac(n*sqrt(2))-frac(n*sqrt(2))^2)) - 1; \\ Michel Marcus, Sep 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Nov 20 2003
STATUS
approved