OFFSET
1,2
COMMENTS
Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n - h)/4 (h, n natural numbers), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2-1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 10). - Bruno Berselli, Nov 17 2010
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = sqrt(40*A057569(n) + 1). - Gary Detlefs, Feb 22 2010
From Bruno Berselli, Sep 16 2010 - Nov 17 2010: (Start)
G.f.: x*(1 + 8*x + x^2)/((1 + x)*(1 - x)^2).
a(n) = (10*n + 3*(-1)^n - 5)/2.
a(n) = -a(-n + 1) = a(n-1) + a(n-2) - a(n-3) = a(n-2) + 10.
a(n) = 10*A000217(n-1) + 1 - 2*Sum_{i=1..n-1} a(i) for n > 1. (End)
a(n) = 10*n - a(n-1) - 10 (with a(1) = 1). - Vincenzo Librandi, Nov 16 2010
a(n) = sqrt(10*A132356(n-1) + 1). - Ivan N. Ianakiev, Nov 09 2012
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi/10)*cot(Pi/10) = A000796 * A019970 / 10 = sqrt(5 + 2*sqrt(5))*Pi/10. - Amiram Eldar, Dec 04 2021
E.g.f.: 1 + ((10*x - 5)*exp(x) + 3*exp(-x))/2. - David Lovler, Sep 03 2022
MATHEMATICA
Flatten[Table[10n - {9, 1}, {n, 30}]] (* Alonso del Arte, Sep 02 2014 *)
LinearRecurrence[{1, 1, -1}, {1, 9, 11}, 60] (* Harvey P. Dale, Jul 05 2020 *)
PROG
(Haskell)
a090771 n = a090771_list !! (n-1)
a090771_list = 1 : 9 : map (+ 10) a090771_list
-- Reinhard Zumkeller, Jan 07 2012
(PARI) a(n)=n\2*10-(-1)^n \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Giovanni Teofilatto, Feb 07 2004
EXTENSIONS
Edited and extended by Ray Chandler, Feb 10 2004
STATUS
approved