OFFSET
1,1
COMMENTS
The identity (32*n^2-1)^2 - (256*n^2-16)*(2*n)^2 = 1 can be written as a(n)^2 - A158562(n)*A005843(n)^2 = 1. [comment rewritten by R. J. Mathar, Oct 16 2009]
From Omar E. Pol, Apr 21 2021: (Start)
Sequence found by reading the line from 31, in the direction 31, 127, ..., in the rectangular spiral whose vertices are the generalized 18-gonal numbers A274979.
The spiral begins as follows:
46_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _18
| |
| 0 |
| |_ _ _ _ _ _ _ _ _ _ _ _ _ _|
| 1 15
|
51
(End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Vincenzo Librandi, X^2-AY^2=1, Math Forum, 2007. [Wayback Machine link]
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(-31-34*x+x^2)/(x-1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A244082(n) - 1. - Omar E. Pol, Apr 21 2021
From Amiram Eldar, Mar 09 2023: (Start)
Sum_{n>=1} 1/a(n) = (1 - cot(Pi/(4*sqrt(2)))*Pi/(4*sqrt(2)))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/(4*sqrt(2)))*Pi/(4*sqrt(2)) - 1)/2. (End)
MATHEMATICA
32 Range[40]^2 - 1 (* Harvey P. Dale, Mar 04 2011 *)
CoefficientList[Series[(- 31 - 34 x + x^2) / (x - 1)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Sep 11 2013 *)
PROG
(Magma) [32*n^2-1: n in [1..40]]; // Vincenzo Librandi, Sep 11 2013
(PARI) a(n)=32*n^2-1 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 21 2009
STATUS
approved