OFFSET
1,1
COMMENTS
Decimal expansion is A019762. - Michael Somos, May 07 2012
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,1,0,0,-1).
FORMULA
First 5 terms are 5, 2, 3, 2, 3.
For k >= 1, a(6k)=1; a(6k+1)=2k; a(6k+2)=1; a(6k+3)=3; a(6k+4)=2k+2; a(6k+5)=3.
EXAMPLE
2*e = 5 + 1 / (2 + 1 / (3 + 1 / (2 + 1 / (3 + 1 / (1 + ...))))). - Michael Somos, May 07 2012
MATHEMATICA
ContinuedFraction[ 2E, 94] (* Robert G. Wilson v, May 07 2012 *)
PROG
(PARI) A081750(n) = if(1==n, 5, if(n<6, 2+(n%2), my(k=n\6, r=n%6); if(0==r || 2==r, 1, if(1==r, 2*k, if(n%2, 3, 2*(k+1)))))); \\ Antti Karttunen, Feb 20 2023
CROSSREFS
KEYWORD
cofr,easy,nonn
AUTHOR
Benoit Cloitre, Apr 08 2003
STATUS
approved