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

A220186 Numbers n >= 0 such that n^2 + n*(n+1)/2 is a square.

Original entry on oeis.org

0, 8, 800, 78408, 7683200, 752875208, 73774087200, 7229107670408, 708378777612800, 69413891098384008, 6801852948864020000, 666512175097575576008, 65311391306613542428800, 6399849835873029582446408, 627119972524250285537319200
Offset: 1

Views

Author

Alex Ratushnyak, Apr 12 2013

Keywords

Comments

Equivalently, numbers n such that triangular(2*n) - triangular(n) is a square.

Crossrefs

Cf. A005449 (n^2 + n(n+1)/2).
Cf. A011916 (numbers n such that n^2 + n(n+1)/2 is a triangular number).
Cf. A014105 (n^2 + n(n+1)).
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).

Programs

  • C
    #include 
    #include 
    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;
    }
    
  • 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 *)
  • PARI
    lista(nn) = for(n=0, nn, if(issquare(n^2 + n*(n+1)/2), print1(n, ", "))); \\ Altug Alkan, Mar 05 2016

Formula

a(n) = A098308(2*n-2).
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
a(n) = 8*A108741(n). - R. J. Mathar, Feb 19 2017

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

Original entry on oeis.org

0, 1, 28, 117, 2760, 11481, 270468, 1125037, 26503120, 110242161, 2597035308, 10802606757, 254482957080, 1058545220041, 24936732758548, 103726628957277, 2443545327380640, 10164151092593121, 239442505350544188, 995983080445168597, 23462921979025949800
Offset: 1

Views

Author

Alex Ratushnyak, Apr 13 2013

Keywords

Comments

Numbers n such that 6*n^2 + 2*n + 1 is a square. - Joerg Arndt, Apr 14 2013
a(n+4) - a(n) is divisible by 40. (a(n+2) - a(n)) mod 10 = period 4: repeat 8, 6, 2, 4. See A000689. - Paul Curtz, Apr 15 2013
For this 5 consecutive terms recurrence,the main (or principal) sequence is: CRR(n)= 0, 0, 0, 0, 1, 1, 99, 99, 9702, 9702,... . - Paul Curtz, Apr 16 2013
Also numbers n such that the sum of the octagonal numbers N(n) and N(n+1) is equal to the sum of two consecutive triangular numbers. - Colin Barker, Dec 09 2014

Crossrefs

Cf. A000217, A005449 (n^2 + n(n+1)/2).
Cf. A011916 (numbers n>=0 such that n^2 + n(n+1)/2 is a triangular number).
Cf. A220186 (numbers n>=0 such that n^2 + n(n+1)/2 is a square).
Cf. A220185 (numbers n>=0 such that n^2 + n(n+1) is an oblong number).
(Example of a family of main sequences: A131577, A024495, A000749, A139761. )
Cf. A251793.

Programs

  • C
    #include 
    typedef unsigned long long U64;
    U64 rootPronic(U64 a) {
        U64 sr = 1L<<31, 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, n, r, t;
      for (n=0; n < 3L<<30; n++) {
        a = n*(n+1)/2 + n*n;
        t = rootPronic(a);
        if (a == t*(t+1)) {
            printf("%llu\n", n);
        }
      }
    }
    
  • Mathematica
    LinearRecurrence[{1, 98, -98, -1, 1}, {0, 1, 28, 117, 2760}, 30] (* Giovanni Resta, Apr 14 2013 *)
    CoefficientList[Series[x (1 + 27 x - 9 x^2 - 3 x^3)/((1 - x) (1 - 10 x + x^2) (1 + 10 x + x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 13 2014 *)
  • Maxima
    makelist(expand(((-(-1)^n+sqrt(6))*(5+2*sqrt(6))^(n-1)-((-1)^n+sqrt(6))*(5-2*sqrt(6))^(n-1)-2)/12), n, 1, 25); /* Bruno Berselli, Apr 14 2013 */
  • PARI
    concat([0], Vec( x * (1+27*x-9*x^2-3*x^3) / ( (1-x)*(1-10*x+x^2)*(1+10*x+x^2) ) + O(x^66) ) )  /* Joerg Arndt, Apr 14 2013 */
    

Formula

G.f.: x^2 * (1+27*x-9*x^2-3*x^3) / ( (1-x)*(1-10*x+x^2)*(1+10*x+x^2) ). - Giovanni Resta, Apr 14 2013, adapted by Vincenzo Librandi Aug 13 2014
a(n) = ((-(-1)^n+sqrt(6))*(5+2*sqrt(6))^(n-1)-((-1)^n+sqrt(6))*(5-2*sqrt(6))^(n-1)-2)/12. - Bruno Berselli, Apr 14 2013
a(n) = a(n-1) + 98*a(n-2) - 98*a(n-3) - a(n-4) + a(n-5).

Extensions

a(11)-a(21) from Giovanni Resta, Apr 14 2013

A251867 Numbers n such that n^2 + (n+1)^2 is equal to the sum of the hexagonal numbers H(m) and H(m+1) for some m.

Original entry on oeis.org

0, 14, 492, 16730, 568344, 19306982, 655869060, 22280241074, 756872327472, 25711378892990, 873430010034204, 29670908962269962, 1007937474707144520, 34240203231080643734, 1163158972382034742452, 39513164857758100599650, 1342284446191393385645664
Offset: 1

Views

Author

Colin Barker, Dec 10 2014

Keywords

Comments

Also nonnegative integers y in the solutions to 4*x^2-2*y^2+2*x-2*y = 0, the corresponding values of x being A220185.

Examples

			14 is in the sequence because 14^2+15^2 = 196+225 = 421 = 190+231 = H(10)+H(11).
		

Crossrefs

Programs

  • Magma
    I:=[0,14,492]; [n le 3 select I[n] else 35*Self(n-1)-35*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Sep 06 2015
  • Mathematica
    LinearRecurrence[{35, -35, 1}, {0, 14, 492}, 20] (* Vincenzo Librandi, Sep 06 2015 *)
  • PARI
    concat(0, Vec(-2*x^2*(x+7)/((x-1)*(x^2-34*x+1)) + O(x^100)))
    

Formula

a(n) = 35*a(n-1)-35*a(n-2)+a(n-3).
G.f.: -2*x^2*(x+7) / ((x-1)*(x^2-34*x+1)).
a(n) = A220185(n) + A001542(n-1)^2. - Alexander Samokrutov, Sep 05 2015
a(n) = (-4+(10+7*sqrt(2))*(17+12*sqrt(2))^(-n)+(10-7*sqrt(2))*(17+12*sqrt(2))^n)/8. - Colin Barker, Mar 02 2016
a(n) = A105635(4*n-4). - Greg Dresden, Aug 30 2021

A276916 Subsequence of centered square numbers obtained by adding four triangles from A276914 and a central element, a(n) = 4*A276914(n) + 1.

Original entry on oeis.org

1, 5, 41, 61, 145, 181, 313, 365, 545, 613, 841, 925, 1201, 1301, 1625, 1741, 2113, 2245, 2665, 2813, 3281, 3445, 3961, 4141, 4705, 4901, 5513, 5725, 6385, 6613, 7321, 7565, 8321, 8581, 9385, 9661, 10513, 10805, 11705, 12013, 12961, 13285, 14281, 14621, 15665
Offset: 0

Views

Author

Daniel Poveda Parrilla, Sep 27 2016

Keywords

Comments

All terms of this sequence are centered square numbers. Graphically, each term of the sequence is made of four squares, eight triangles and a central element.
a(A220185(n+1)) = A008844(2n) = A079291(4n+1), which is a square of a Pell number.

Crossrefs

Programs

  • Magma
    [4*n*(2*n+(-1)^n)+1 : n in [0..60]]; // Wesley Ivan Hurt, Sep 27 2016
    
  • Maple
    A276916:=n->4*n*(2*n+(-1)^n)+1: seq(A276916(n), n=0..60); # Wesley Ivan Hurt, Sep 27 2016
  • Mathematica
    Table[4 n (2 n + (-1)^n) + 1, {n, 0, 44}] (* or *)
    CoefficientList[Series[(1 +4x +34x^2 +12x^3 +13x^4)/((1-x)^3*(1+x)^2), {x, 0, 44}], x] (* Michael De Vlieger, Sep 28 2016 *)
  • PARI
    Vec((1+4*x+34*x^2+12*x^3+13*x^4)/((1-x)^3*(1+x)^2) + O(x^50)) \\ Colin Barker, Sep 27 2016
    
  • SageMath
    [4*n*(2*n+(-1)^n) +1 for n in (0..60)] # G. C. Greubel, Aug 19 2022

Formula

a(n) = 4*n*(2*n + (-1)^n) + 1.
a(n) = 4*n*(2*n + 1) + 1 for n even.
a(n) = 4*n*(2*n - 1) + 1 for n odd.
a(n) is sum of two squares; a(n) = k^2 + (k+1)^2 where k = 2n-(n mod 2). - David A. Corneth, Sep 27 2016
From Colin Barker, Sep 27 2016: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (1+4*x+34*x^2+12*x^3+13*x^4) / ((1-x)^3*(1+x)^2). (End)
E.g.f.: (1+8*x+8*x^2)*exp(x) - 4*x*exp(-x). - G. C. Greubel, Aug 19 2022
Showing 1-4 of 4 results.