OFFSET
1,2
COMMENTS
Also, floor( harmonic mean of next n numbers ).
Also, floor(sqrt(A131479(n)+1)). - Richard R. Forberg, Aug 04 2013
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n+3) = 2*a(n+2) - a(n+1) if n even, a(n+3) = 2*a(n+2) - a(n+1) + 2 if n odd, with a(1) = 1, a(2) = 2, a(3) = 4. - Yosu Yurramendi, Sep 12 2008
From Colin Barker, Aug 08 2013: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 5.
G.f.: x*(x^4 - 2*x^3 - 1)/((x - 1)^3*(x + 1)). (End)
E.g.f.: (2*x + x*(x + 1)*cosh(x) + (x^2 + x - 1)*sinh(x))/2. - Stefano Spezia, Feb 18 2023
EXAMPLE
a(4) = floor( (7*8*9*10)^(1/4) ) = 8.
a(4) = floor( 1/( (1/7 + 1/8 + 1/9 + 1/10 )*(1/4)) ) = 8.
PROG
(PARI) a(n)=if(n<2, n>0, n^2\2);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Mar 11 2003
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
STATUS
approved