|
|
A055997
|
|
Numbers n such that n(n - 1)/2 is a square.
|
|
16
|
|
|
1, 2, 9, 50, 289, 1682, 9801, 57122, 332929, 1940450, 11309769, 65918162, 384199201, 2239277042, 13051463049, 76069501250, 443365544449, 2584123765442, 15061377048201, 87784138523762, 511643454094369, 2982076586042450, 17380816062160329, 101302819786919522
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Numbers n such that (n-th triangular number - n) is a square.
Number of closed walks of length 2n on the grid graph P_2 X P_3. - Mitch Harris, Mar 06 2004
The product of any term a(n) with an even successor a(n + 2k) is always a square number. The product of any term a(n) with an odd successor a(n + 2k + 1) is always twice a square number. - Bradley Klee & Bill Gosper, Jul 22 2015
It appears that dividing even terms by two and taking the square root gives sequence A079496. - Bradley Klee, Jul 25 2015
|
|
REFERENCES
|
A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, p. 193.
P. Tauvel, Exercices d'Algèbre Générale et d'Arithmétique, Dunod, 2004, Exercice 35 pages 346-347.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 6*a(n - 1) - a(n - 2) - 2; n >= 3, a(1) = 1, a(2) = 2.
G.f.: x*(1 - 5*x + 2*x^2)/((1 - x)*(1 - 6*x + x^2)).
a(n) = IF(mod(n; 2)=0; (((1 - sqrt(2))^n + (1 + sqrt(2))^n)/2)^2; 2*((((1 - sqrt(2))^(n + 1) + (1 + sqrt(2))^(n + 1)) - (((1 - sqrt(2))^n + (1 + sqrt(2))^n)))/4)^2). The odd-indexed terms are a(2n + 1) = [A001333(2n)]^2; the even-indexed terms are a(2n) = [A001333(2n - 1)]^2 + 1 = 2*[A001653(n)]^2. - Antonio Alberto Olivares, Jan 31 2004; corrected by Bernard Schott, Apr 20 2020
a(n) = +7*a(n-1) -7*a(n-2) +1*a(n-3). - Joerg Arndt, Mar 06 2013
E.g.f.: (2*exp(x) + exp((3-2*sqrt(2))*x) + exp((3+2*sqrt(2))*x))/4. - Ilya Gutkovskiy, Jul 09 2016
a(n) = (1/4)*(t^2 + t^(-2) + 2), where t = (1+sqrt(2))^(n-1). - Ridouane Oudra, Nov 29 2019
sqrt(a(n)) + sqrt(a(n) - 1) = (1 + sqrt(2))^(n - 1). - Ridouane Oudra, Nov 29 2019
sqrt(a(n)) - sqrt(a(n) - 1) = (-1 + sqrt(2))^(n - 1). - Bernard Schott, Apr 18 2020
|
|
MAPLE
|
A:= gfun:-rectoproc({a(n) = 6*a(n-1)-a(n-2)-2, a(1) = 1, a(2) = 2}, a(n), remember):
|
|
MATHEMATICA
|
Table[ 1/4*(2 + (3 - 2*Sqrt[2])^k + (3 + 2*Sqrt[2])^k ) // Simplify, {k, 0, 20}] (* Jean-François Alcover, Mar 06 2013 *)
CoefficientList[Series[(1 - 5 x + 2 x^2) / ((1 - x) (1 - 6 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 20 2015 *)
(1 + ChebyshevT[#, 3])/2 & /@ Range[0, 20] (* Bill Gosper, Jul 20 2015 *)
a[1]=1; a[2]=2; a[n_]:=(a[n-1]+1)^2/a[n-2]; a/@Range[25] (* Bradley Klee, Jul 25 2015 *)
LinearRecurrence[{7, -7, 1}, {1, 2, 9}, 30] (* Harvey P. Dale, Dec 06 2015 *)
|
|
PROG
|
(PARI) Vec((1-5*x+2*x^2)/((1-x)*(1-6*x+x^2))+O(x^66)) /* Joerg Arndt, Mar 06 2013 */
(PARI) t(n)=(1+sqrt(2))^(n-1);
for(k=1, 24, print1(round((1/4)*(t(k)^2 + t(k)^(-2) + 2)), ", ")) \\ Hugo Pfoertner, Nov 29 2019
(PARI) a(n) = (1 + polchebyshev(n-1, 1, 3))/2; \\ Michel Marcus, Apr 21 2020
(Magma) I:=[1, 2, 9]; [n le 3 select I[n] else 7*Self(n-1)-7*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Mar 20 2015
|
|
CROSSREFS
|
A001109(n-1) = sqrt{[(a(n))^2 - (a(n))]/2}.
Identical to A115599, but with additional leading term.
|
|
KEYWORD
|
easy,nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|