OFFSET
1,2
COMMENTS
Also n such that x^2 == 2 (mod n) has a solution. The primes are given in sequence A001132. - T. D. Noe, Jun 13 2003
As indicated in the formula, a(n) is related to the even triangular numbers. - Frederick Magata (frederick.magata(AT)uni-muenster.de), Jun 17 2004
Cf. property described by Gary Detlefs in A113801: more generally, these a(n) are of the form (2*h*n + (h-4)*(-1)^n-h)/4 (h,n natural numbers). Therefore a(n)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 8). Also a(n)^2 - 1 == 0 (mod 16). - Bruno Berselli, Nov 17 2010
A089911(3*a(n)) = 2. - Reinhard Zumkeller, Jul 05 2013
S(a(n+1)/2, 0) = (1/2)*(S(a(n+1), sqrt(2)) - S(a(n+1) - 2, sqrt(2))) = T(a(n+1), sqrt(2)/2) = cos(a(n+1)*Pi/4) = sqrt(2)/2 = A010503, identically for n >= 0, where S is the Chebyshev polynomial (A049310) here extended to fractional n, evaluated at x = 0. (For T see A053120.) - Wolfdieter Lang, Jun 04 2023
REFERENCES
L. B. W. Jolley, Summation of Series, Dover Publications, 1961, p. 16.
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(8*A014494(n)+1) = sqrt(16*ceiling(n/2)*(2*n+1)+1) = sqrt(8*A056575(n)-8*(2n+1)*(-1)^n+1). - Frederick Magata (frederick.magata(AT)uni-muenster.de), Jun 17 2004
1 - 1/7 + 1/9 - 1/15 + 1/17 - ... = (Pi/8)*(1 + sqrt(2)). [Jolley] - Gary W. Adamson, Dec 16 2006
From R. J. Mathar, Feb 19 2009: (Start)
a(n) = 4n - 2 + (-1)^n = a(n-2) + 8.
G.f.: x(1+6x+x^2)/((1+x)(1-x)^2). (End)
a(n) = 8*n - a(n-1) - 8. - Vincenzo Librandi, Aug 06 2010
From Bruno Berselli, Nov 17 2010: (Start)
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 8*A000217(n-1)+1 - 2*Sum_{i=1..n-1} a(i) for n > 1. (End)
E.g.f.: 1 + (4*x - 1)*cosh(x) + (4*x - 3)*sinh(x). - Stefano Spezia, May 13 2021
E.g.f.: 1 + (4*x - 3)*exp(x) + 2*cosh(x). - David Lovler, Jul 16 2022
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sqrt(2+sqrt(2)) (A179260).
Product_{n>=2} (1 + (-1)^n/a(n)) = (Pi/8)*cosec(Pi/8) (A352125). (End)
MATHEMATICA
Select[Range[1, 191, 2], JacobiSymbol[2, # ]==1&]
PROG
(Haskell)
a047522 n = a047522_list !! (n-1)
a047522_list = 1 : 7 : map (+ 8) a047522_list
-- Reinhard Zumkeller, Jan 07 2012
(PARI) a(n)=4*n-2+(-1)^n \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved