login
a(n) = 20*n^2 - 1.
5

%I #38 Jan 25 2025 19:11:32

%S 19,79,179,319,499,719,979,1279,1619,1999,2419,2879,3379,3919,4499,

%T 5119,5779,6479,7219,7999,8819,9679,10579,11519,12499,13519,14579,

%U 15679,16819,17999,19219,20479,21779,23119,24499,25919,27379,28879,30419,31999,33619,35279

%N a(n) = 20*n^2 - 1.

%C The identity (20*n^2 - 1)^2 - (100*n^2 - 10)*(2*n)^2 = 1 can be written as a(n)^2 - A158490(n)*A005843(n)^2 = 1.

%C Sequence found by reading the line from 19, in the direction 19, 79, ... in the square spiral whose vertices are the generalized dodecagonal numbers A195162. - _Omar E. Pol_, Nov 05 2012

%H Vincenzo Librandi, <a href="/A158491/b158491.txt">Table of n, a(n) for n = 1..10000</a>

%H Vincenzo Librandi, <a href="https://web.archive.org/web/20090309225914/http://mathforum.org/kb/message.jspa?messageID=5785989&amp;tstart=0">X^2-AY^2=1</a>, Math Forum, 2007. [Wayback Machine link]

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).

%F G.f: x*(-19-22*x+x^2)/(x-1)^3.

%F From _Amiram Eldar_, Mar 06 2023: (Start)

%F Sum_{n>=1} 1/a(n) = (1 - cot(Pi/(2*sqrt(5)))*Pi/(2*sqrt(5)))/2.

%F Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/(2*sqrt(5)))*Pi/(2*sqrt(5)) - 1)/2. (End)

%F From _Elmo R. Oliveira_, Jan 25 2025: (Start)

%F E.g.f.: exp(x)*(20*x^2 + 20*x - 1) + 1.

%F a(n) = A134538(2*n). (End)

%t LinearRecurrence[{3,-3,1},{19,79,179},50]

%t 20*Range[40]^2-1 (* _Harvey P. Dale_, Aug 24 2021 *)

%o (Magma) I:=[19, 79, 179]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]];

%o (PARI) a(n)=20*n^2-1 \\ _Charles R Greathouse IV_, Dec 23 2011

%Y Cf. A005843, A134538, A158490, A195162.

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Mar 20 2009