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.

A225785 Numbers n such that triangular(n) + triangular(2*n) is a triangular number.

Original entry on oeis.org

0, 12, 84, 3960, 27144, 1275204, 8740380, 410611824, 2814375312, 132215732220, 906220110180, 42573055163112, 291800061102744, 13708391546789940, 93958713454973484, 4414059505011197664, 30254413932440359200, 1421313452222058857964
Offset: 1

Views

Author

Alex Ratushnyak, May 16 2013

Keywords

Comments

Equivalently, numbers n such that oblong(n) + oblong(2*n) is an oblong number, where oblong(n) = A002378(n) = n*(n+1).
Also, x values in the equation A147875(x) = A000217(y) - see Ralf Stephan in Program lines. - Bruno Berselli, May 18 2013
Also, numbers m such that 2*m+1 and 10*m+1 are both squares. - Bruno Berselli, Mar 03 2016

Examples

			12*13/2 + 24*25/2 = 27*28/2, so 12 is in the sequence.
		

Crossrefs

Cf. A224419 (numbers n such that triangular(n) + triangular(2*n) is a square).
Cf. A011916 (numbers n such that triangular(2*n) - triangular(n) is a triangular number).
Cf. A225786 (numbers n such that oblong(2*n) + oblong(n) is a square).
Cf. A225839 (triangular numbers of the form triangular(x) + triangular(2*x)).

Programs

  • C
    #include 
    #include 
    int main() {
      unsigned long long i, s, t;
      for (i = 0; i< (1ULL<<31); i++) {
        s = 2*i*(2*i+1) + i*(i+1);
        t = sqrt(s);
        if (s==t*(t+1)) printf("%llu, ", i);
      }
      return 0;
    }
    
  • Mathematica
    CoefficientList[Series[12 x (1 + 6 x + x^2)/((1 - x) (1 - 18 x + x^2) (1 + 18 x + x^2)), {x, 0, 20}], x] (* Bruno Berselli, May 18 2013 *)
    LinearRecurrence[{1,322,-322,-1,1},{0,12,84,3960,27144},20] (* Harvey P. Dale, Apr 08 2021 *)
  • PARI
    for(n=1,10^9,t=n*(5*n+3)/2;x=sqrtint(2*t);if(t==x*(x+1)/2,print(n))) /* Ralf Stephan, May 17 2013 */

Formula

G.f.: 12*x*(1+6*x+x^2)/((1-x)*(1-18*x+x^2)(1+18*x+x^2)). [Bruno Berselli, May 18 2013]
a(n) = (1/20)*((3+(-1)^n*sqrt(5))*(2-sqrt(5))^(4*floor(n/2))+(3-(-1)^n*sqrt(5))*(2+sqrt(5))^(4*floor(n/2))-6). [Bruno Berselli, May 18 2013]
a(2*n) = (Fibonacci(6*n-3)^2 + Lucas(6*n-3)*Fibonacci(6*n-1))/2. - Greg Dresden, Sep 24 2023

Extensions

More terms from Bruno Berselli, May 18 2013