|
|
A220186
|
|
Numbers n >= 0 such that n^2 + n*(n+1)/2 is a square.
|
|
4
|
|
|
0, 8, 800, 78408, 7683200, 752875208, 73774087200, 7229107670408, 708378777612800, 69413891098384008, 6801852948864020000, 666512175097575576008, 65311391306613542428800, 6399849835873029582446408, 627119972524250285537319200
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Equivalently, numbers n such that triangular(2*n) - triangular(n) is a square.
|
|
LINKS
|
|
|
FORMULA
|
a(1) = 0, a(2) = 8, a(3) = 800 and a(n) = 99*a(n-1)-99*a(n-2)+a(n-3) for n>3. - Giovanni Resta, Apr 12 2013
G.f.: -8*x^2*(x+1) / ((x-1)*(x^2-98*x+1)). - Colin Barker, May 31 2013
a(n) = (49+20*sqrt(6))^(-n)*(49+20*sqrt(6)-2*(49+20*sqrt(6))^n+(49-20*sqrt(6))*(49+20*sqrt(6))^(2*n))/12. - Colin Barker, Mar 05 2016
|
|
MATHEMATICA
|
a[n_]:=Floor[(1/12)*(49 + 20*Sqrt[6])^n]; Table[a[n], {n, 0, 10}] (* Giovanni Resta, Apr 12 2013 *)
LinearRecurrence[{99, -99, 1}, {0, 8, 800}, 20] (* Harvey P. Dale, Nov 01 2022 *)
|
|
PROG
|
(C)
#include <stdio.h>
#include <math.h>
int main() {
unsigned long long a, i, t;
for (i=0; i < (1L<<32); ++i) {
a = (i*i) + ((i+1)*i/2);
t = sqrt(a);
if (a == t*t) printf("%llu\n", i);
}
return 0;
}
(PARI) lista(nn) = for(n=0, nn, if(issquare(n^2 + n*(n+1)/2), print1(n, ", "))); \\ Altug Alkan, Mar 05 2016
|
|
CROSSREFS
|
Cf. A011916 (numbers n such that n^2 + n(n+1)/2 is a triangular number).
Cf. A084703 (numbers n such that n^2 + n(n+1) is a square).
Cf. A220185 (numbers n such that n^2 + n(n+1) is an oblong number).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|