cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A220185 Numbers n such that n^2 + n(n+1) is an oblong number (A002378).

Original entry on oeis.org

0, 10, 348, 11830, 401880, 13652098, 463769460, 15754509550, 535189555248, 18180690368890, 617608282987020, 20980500931189798, 712719423377466120, 24211479893902658290, 822477596969312915748, 27940026817062736477150, 949138434183163727307360
Offset: 1

Views

Author

Alex Ratushnyak, Apr 12 2013

Keywords

Comments

Also numbers n such that the sum of the hexagonal numbers H(n) and H(n+1) is equal to m^2 + (m+1)^2 for some m. - Colin Barker, Dec 10 2014
Also nonnegative integers x in the solutions to 4*x^2-2*y^2+2*x-2*y = 0, the corresponding values of y being A251867. - Colin Barker, Dec 10 2014

Examples

			a(3) = A089928(7) = 348.
		

Crossrefs

Cf. A002378, A014105 (n^2 + n(n+1)), A029546, A084703 (numbers n such that n^2 + n(n+1) is a square).

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+2) = 10*A029546(n)-2*A029546(n-1). (End)
a(n) = 35*a(n-1)-35*a(n-2)+a(n-3). - Colin Barker, Dec 10 2014
a(n) = A251867(n) - A001542(n-1)^2. - Alexander Samokrutov, Sep 05 2015

Extensions

More terms from Bruno Berselli, Apr 12 2013
Showing 1-1 of 1 results.