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-5 of 5 results.

A216134 Numbers k such that 2 * A000217(k) + 1 is triangular.

Original entry on oeis.org

0, 1, 4, 9, 26, 55, 154, 323, 900, 1885, 5248, 10989, 30590, 64051, 178294, 373319, 1039176, 2175865, 6056764, 12681873, 35301410, 73915375, 205751698, 430810379, 1199208780, 2510946901, 6989500984, 14634871029, 40737797126, 85298279275, 237437281774
Offset: 0

Views

Author

Raphie Frank, Sep 01 2012

Keywords

Comments

Numbers n such that 2*triangular(n) + 1 is a triangular number. Equivalently, numbers n such that n^2 + n + 1 is a triangular number. - Alex Ratushnyak, Apr 18 2013
For n > 0, a(n) is the n-th almost cobalancing number of first type (see Tekcan and Erdem). - Stefano Spezia, Nov 25 2022

Crossrefs

Cf. A000217, A069017 (triangular numbers of the form k^2 + k + 1).

Programs

  • Mathematica
    LinearRecurrence[{1, 6, -6, -1, 1}, {0, 1, 4, 9, 26}, 40] (* T. D. Noe, Sep 03 2012 *)
  • PARI
    Vec( x*(1+3*x-x^2-x^3)/((1-x)*(1+2*x-x^2)*(1-2*x-x^2)) + O(x^66) ) \\ Joerg Arndt, Aug 13 2014
    
  • PARI
    isok(n) = ispolygonal(n*(n+1) + 1, 3); \\ Michel Marcus, Aug 13 2014

Formula

G.f.: x*(1+3*x-x^2-x^3)/((1-x)*(1+2*x-x^2)*(1-2*x-x^2)). - R. J. Mathar, Sep 08 2012
sqrt(2) = lim_{k->infinity} ((a(2k+1) + a(2k) + 1)/2)/(a(2k+1) - a(2k)) = lim_{k->infinity} A001333(2k + 1)/A000129(2k + 1).
1 + (sqrt 2) = lim_{k->infinity} (a(2k + 1) - a(2k))/(a(2k + 1) - 2*a(2k) + a(2k - 1)) = lim_{k->infinity} A000129(2k + 1)/A000129(2k).
1 + 1/(sqrt 2) = lim_{k->infinity} (a(2k+1) - a(2k))/(a(2k) - a(2k - 1)) = lim_{k->infinity} A000129(2k + 1)/A001333(2k).
a(n) = (2*A000129(n) + (-1)^n*(A000129(2*floor(n/2) - 1) - (-1)^n)/2). - Raphie Frank, Jan 04 2013
From Raphie Frank, Jan 04 2013: (Start)
A124174(n) = a(n)*(a(n) + 1)/2.
A079496(n) = a(n + 1) - a(n).
A000129(2n) = a(2n) - 2*a(2n - 1) + a(2n - 2).
A000129(2n) = a(2n + 1) - 2*a(2n) + a(2n - 1).
A000129(2n + 1) = a(2n + 1) - a(2n).
A001333(2n) = a(2n) - a(2n - 1).
A001333(2n + 1) = (a(2n + 1) + a(2n) + 1)/2.
A006451(n + 1) = (a(n + 2) + a(n))/2.
A006452(n + 2) = (a(n + 2) - a(n))/2.
A124124(n + 2) = (a(n + 2) + a(n))/2 + (a(n + 2) - a(n)).
(End)
a(n + 2) = sqrt(8*a(n)^2 + 8*a(n) + 9) + 3*a(n) + 1; a(0) = 0, a(1) = 1. - Raphie Frank, Feb 02 2013
a(n) = (3/8 + sqrt(2)/4)*(1 + sqrt(2))^n + (-1/8 - sqrt(2)/8)*(-1 + sqrt(2))^n + (3/8 - sqrt(2)/4)*(1 - sqrt(2))^n + (-1/8 + sqrt(2)/8)*(-1 - sqrt(2))^n - 1/2. - Robert Israel, Aug 13 2014
E.g.f.: (1/4)*(-2*cosh(x) - 2*sinh(x) + 2*cosh(sqrt(2)*x)*(cosh(x) + 2*sinh(x)) + sqrt(2)*(cosh(x) + 3*sinh(x))*sinh(sqrt(2)*x)). - Stefano Spezia, Dec 10 2019

A214838 Triangular numbers of the form k^2 + 2.

Original entry on oeis.org

3, 6, 66, 171, 2211, 5778, 75078, 196251, 2550411, 6666726, 86638866, 226472403, 2943171003, 7693394946, 99981175206, 261348955731, 3396416785971, 8878171099878, 115378189547778, 301596468440091, 3919462027838451, 10245401755863186, 133146330756959526, 348042063230908203
Offset: 1

Views

Author

Alex Ratushnyak, Mar 07 2013

Keywords

Comments

Corresponding k values are in A077241.
Except 3, all terms are in A089982: in fact, a(2) = 3+3 and a(n) = (k-2)*(k-1)/2+(k+1)*(k+2)/2, where k = sqrt(a(n)-2) > 2 for n > 2. [Bruno Berselli, Mar 08 2013]

Examples

			2211 is in the sequence because 2211 = 47^2 + 2.
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(-3*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)))); // Bruno Berselli, Mar 08 2013
    
  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1}, {3, 6, 66, 171, 2211}, 25] (* Bruno Berselli, Mar 08 2013 *)
  • Maxima
    t[n]:=((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4$
    makelist(expand(t[n]*(t[n]+1)/2), n, 1, 25); /* Bruno Berselli, Mar 08 2013 */
  • PARI
    for(n=1, 10^9, t=n*(n+1)/2; if(issquare(t-2), print1(t,", "))); \\ Joerg Arndt, Mar 08 2013
    
  • Python
    import math
    for i in range(2, 1<<32):
          t = i*(i+1)//2 - 2
          sr = int(math.sqrt(t))
          if sr*sr == t:
              print(f'{sr:10} {i:10} {t+2}')
    

Formula

G.f.: -3*x*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)). - Joerg Arndt, Mar 08 2013
a(n) = A000217(t), where t = ((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4. - Bruno Berselli, Mar 08 2013

A076049 Numbers k such that the sum of the k-th triangular number and (k+2)-nd triangular number is a triangular number.

Original entry on oeis.org

0, 3, 8, 25, 54, 153, 322, 899, 1884, 5247, 10988, 30589, 64050, 178293, 373318, 1039175, 2175864, 6056763, 12681872, 35301409, 73915374, 205751697, 430810378, 1199208779, 2510946900, 6989500983, 14634871028, 40737797125
Offset: 1

Views

Author

Bruce Corrigan (scentman(AT)myfamily.com), Oct 29 2002

Keywords

Comments

T(a(n)) + T(a(n)+2) = A069017(n+1) where T(k) = k*(k+1)/2.

Crossrefs

Formula

Let b(n) = A001109(n). Then we have a pair of recursion formulas:
a(2n+2) = 2*a(2n+1) - a(2n) + 2*b(n+1);
a(2n+3) = 2*a(2n+2) - a(2n+1) + 2*b(n+2).
G.f.: x*(3 + 5*x - x^2 - x^3)/((1-x)*(1 - 6*x^2 + x^4)).
a(n) = -3 + (1/8)*(-1^n)((7 + 5*sqrt(2))*(-1 - sqrt(2))^n + (7 - 5*sqrt(2))*(-1 + sqrt(2))^n - (1 + sqrt(2))^n - (1 - sqrt(2))^n).

Extensions

Edited by Jon E. Schoenfield, Sep 02 2019

A226500 Triangular numbers representable as 3 * x^2.

Original entry on oeis.org

0, 3, 300, 29403, 2881200, 282328203, 27665282700, 2710915376403, 265642041604800, 26030209161894003, 2550694855824007500, 249942065661590841003, 24491771739980078410800, 2399943688452386093417403, 235169989696593857076494700, 23044259046577745607403063203
Offset: 1

Views

Author

Alex Ratushnyak, Jun 09 2013

Keywords

Crossrefs

Cf. A029549 (triangular numbers representable as x^2 + x).

Programs

  • C
    #include 
    #include 
    typedef unsigned long long U64;
    U64 isTriangular(U64 a) {   // input must be < 1ULL<<63
        U64 r = sqrt(a*2);
        return (r*(r+1) == a*2);
    }
    int main() {
      for (U64 j, i = 0; (j=i*i*3) < (1ULL<<63); i++)
          if (isTriangular(j)) printf("%llu, ", j);
      return 0;
    }
  • Mathematica
    a[1]=0; a[2]=3; a[3]=300; a[n_] := a[n] = 99*(a[n-1] - a[n-2]) + a[n-3]; Array[a, 10] (* Giovanni Resta, Jun 09 2013 *)
    Rest@ CoefficientList[Series[3 x^2 (1 + x)/((1 - x) (1 - 98 x + x^2)), {x, 0, 16}], x] (* or *)
    3 LinearRecurrence[{99, -99, 1}, {0, 1, 100}, 16] (* Michael De Vlieger, Mar 03 2016, latter after Vincenzo Librandi at A108741 *)

Formula

a(n) = 99*a(n-1) - 99*a(n-2) + a(n-3), for n > 3. a(n) = floor((49 + 20*sqrt(6))^(n-1)/32). - Giovanni Resta, Jun 09 2013
G.f.: 3*x^2*(1+x)/((1-x)*(1-98*x+x^2)); a(n)=3*A108741(n-1). - Joerg Arndt, Jun 10 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))/32. - Colin Barker, Mar 03 2016

Extensions

a(12)-a(15) from Giovanni Resta, Jun 09 2013

A217758 Triangular numbers of the form k^2 + k - 1.

Original entry on oeis.org

1, 55, 1891, 64261, 2183005, 74157931, 2519186671, 85578188905, 2907139236121, 98757155839231, 3354836159297755, 113965672260284461, 3871478020690373941, 131516287031212429555, 4467682281040532230951, 151769681268346883422801
Offset: 1

Views

Author

Alex Ratushnyak, Mar 23 2013

Keywords

Comments

Triangular numbers belonging to A028387. - Bruno Berselli, Apr 18 2018
Since this sequence lists triangular numbers t such that 4*t + 5 = u^2 and 8*t + 1 = v^2 by definition of triangular numbers, 2*u^2 - 9 = 2*(4*t + 5) - 9 = 8*t + 1 = v^2, that is, sqrt(4*a(n) + 5) is in A075841. - Altug Alkan, Apr 18 2018

Examples

			Triangular(10) = 55 = 7^2 + 7 - 1, so 55 is in the sequence.
		

Crossrefs

Programs

  • C
    #include 
    typedef unsigned long long U64;
    U64 rootPronic(U64 a) {
        U64 sr = 1L<<32, s, b;
        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, i, t;
      for (i=0; i < 1L<<32; ++i) {
          a = i*(i+1)/2 + 1;
          t = rootPronic(a);
          if (a == t*(t-1))  printf("%llu %llu %llu\n", i, t, a-1);
      }
      return 0;
    }
    
  • Mathematica
    a[1]=1; a[2]=55; a[3]=1891; a[n_] := a[n] = 35*a[n-1] - 35*a[n-2] + a[n-3]; Array[a,20] (* Giovanni Resta, Mar 24 2013 *)
    Table[Floor@(9 (17 + Sqrt@ 288)^n*(3 - Sqrt@ 8)/32), {n, 0, 16}] (* or *)
    CoefficientList[Series[-x (1 + 20 x + x^2)/((x - 1) (x^2 - 34 x + 1)), {x, 0, 16}], x] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    Vec(x*(1+20*x+x^2)/(1-35*x+35*x^2-x^3)+O(x^66)) \\ Joerg Arndt, Mar 25 2013

Formula

From Giovanni Resta, Mar 24 2013: (Start)
G.f.: -x*(1 + 20*x + x^2) / ( (x - 1)*(x^2 - 34*x + 1) ).
a(n) = floor(9 * (17 + sqrt(288))^n * (3 - sqrt(8))/32). (End)
a(n) = (A075841(n)^2 - 5)/4. - Altug Alkan, Apr 18 2018
Showing 1-5 of 5 results.