|
|
A090038
|
|
a(n) = floor(1/({n*k}-{n*k}^2)) -1, where k = sqrt(2)-1 and {} is the fractional part.
|
|
1
|
|
|
3, 6, 4, 3, 14, 3, 10, 3, 4, 7, 3, 34, 3, 5, 4, 3, 24, 3, 7, 3, 3, 9, 3, 17, 3, 4, 5, 3, 82, 3, 6, 4, 3, 12, 3, 11, 3, 4, 6, 3, 58, 3, 5, 4, 3, 18, 3, 8, 3, 3, 8, 3, 21, 3, 4, 5, 3, 41, 3, 6, 4, 3, 10, 3, 13, 3, 4, 6, 3, 198, 3, 5, 4, 3, 15
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Example: a(29) = 82, where 29 = P(5) and 82 = A002203(5).
Example: a(34) = 12, where 34 = A002203(4) and 12 = P(4).
|
|
LINKS
|
|
|
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
|
k := sqrt(2)-1 ;
fn := fpart(n*k) ;
1/fn/(1-fn);
floor(%)-1 ;
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|