A220185 Numbers n such that n^2 + n(n+1) is an oblong number (A002378).
0, 10, 348, 11830, 401880, 13652098, 463769460, 15754509550, 535189555248, 18180690368890, 617608282987020, 20980500931189798, 712719423377466120, 24211479893902658290, 822477596969312915748, 27940026817062736477150, 949138434183163727307360
Offset: 1
Examples
a(3) = A089928(7) = 348.
Links
- Colin Barker, Table of n, a(n) for n = 1..654
- Index entries for linear recurrences with constant coefficients, signature (35,-35,1).
Crossrefs
Programs
-
C
#include
#include typedef unsigned long long U64; U64 rootPronic(U64 a) { U64 sr = 1L<<31, s, b; if (a < sr*(sr+1)) { sr>>=1; while (a < sr*(sr+1)) sr>>=1; } for (b = sr>>1; b; b>>=1) { s = sr+b; if (a >= s*(s+1)) sr = s; } return sr; } int main() { U64 a, n, r, t; for (n=0; n < (1L<<31); n++) { a = (n*(n+1)) + n*n; t = rootPronic(a); if (a == t*(t+1)) printf("%llu\n", n); } } -
Magma
[Floor(((1+Sqrt(2))^(4*n-3)+(1-Sqrt(2))^(4*n-3)-2)/8): n in [1..20]]; // Vincenzo Librandi, Sep 08 2015
-
Maple
f:= gfun:-rectoproc({a(n)=35*(a(n-1)-a(n-2))+a(n-3),a(1)=0,a(2)=10,a(3)=348},a(n),remember): map(f, [$1..50]); # Robert Israel, Sep 06 2015
-
Mathematica
LinearRecurrence[{35, - 35, 1}, {0, 10, 348}, 20] (* Vincenzo Librandi, Sep 06 2015 *)
-
PARI
concat(0, Vec(2*x^2*(5-x)/((1-x)*(1-34*x+x^2))+O(x^100))) \\ Colin Barker, Dec 10 2014
Formula
For n>1, a(n) = A089928(n*4-5).
From Bruno Berselli, Apr 12 2013: (Start)
G.f.: 2*x^2*(5-x)/((1-x)*(1-34*x+x^2)).
a(n) = ((1+sqrt(2))^(4n-3)+(1-sqrt(2))^(4n-3)-2)/8.
a(n) = 35*a(n-1)-35*a(n-2)+a(n-3). - Colin Barker, Dec 10 2014
Extensions
More terms from Bruno Berselli, Apr 12 2013
Comments