login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = floor(1/({n*k}-{n*k}^2)) -1, where k = sqrt(2)-1 and {} is the fractional part.
1

%I #11 Sep 28 2018 02:54:27

%S 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,

%T 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,

%U 10,3,13,3,4,6,3,198,3,5,4,3,15

%N a(n) = floor(1/({n*k}-{n*k}^2)) -1, where k = sqrt(2)-1 and {} is the fractional part.

%C a(P(n)) = A002203(n), n>=2, where P=A000129 are the Pell numbers.

%C Example: a(29) = 82, where 29 = P(5) and 82 = A002203(5).

%C a(A002203(n)) = P(n), n>=3.

%C Example: a(34) = 12, where 34 = A002203(4) and 12 = P(4).

%H G. C. Greubel, <a href="/A090038/b090038.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%p A090038 := proc(n)

%p k := sqrt(2)-1 ;

%p fn := fpart(n*k) ;

%p 1/fn/(1-fn);

%p floor(%)-1 ;

%p end proc: # _R. J. Mathar_, May 11 2013

%t Table[Floor[1/(FractionalPart[n*(Sqrt[2] - 1)] - FractionalPart[n*(Sqrt[2] - 1)]^2)] - 1, {n, 1, 100}] (* _G. C. Greubel_, Sep 27 2018 *)

%o (PARI) a(n) = floor(1/(frac(n*sqrt(2))-frac(n*sqrt(2))^2)) - 1; \\ _Michel Marcus_, Sep 28 2018

%Y Cf. A090038, A002203, A089959, A089960, A089961.

%K nonn

%O 1,1

%A _Gary W. Adamson_, Nov 20 2003