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.

A232176 Least positive k such that n^2 + triangular(k) is a square.

Original entry on oeis.org

1, 2, 6, 10, 14, 18, 7, 5, 8, 34, 6, 42, 46, 15, 54, 16, 14, 66, 70, 74, 23, 82, 9, 90, 17, 98, 102, 10, 110, 15, 25, 122, 126, 16, 39, 48, 40, 21, 150, 34, 158, 29, 54, 48, 30, 13, 182, 63, 55, 194, 56, 202, 14, 45, 214, 63, 222, 26, 41, 234, 31, 42, 39, 250, 32, 63
Offset: 0

Views

Author

Alex Ratushnyak, Nov 19 2013

Keywords

Comments

Triangular(k) = A000217(k) = k*(k+1)/2.
a(n) <= 4*n - 2, because with k = 4*n-2: n^2 + k*(k+1)/2 = n^2 + (4*n-2)*(4*n-1)/2 = 9*n^2 - 6*n + 1 = (3*n-1)^2.
The sequence of numbers n such that a(n)=n begins: 8, 800, 7683200 ... - a subsequence of A220186.

Crossrefs

Cf. A232179 (least k>=0 such that n^2 + triangular(k) is a triangular number).
Cf. A101157 (least k>0 such that triangular(n) + k^2 is a triangular number).
Cf. A232178 (least k>=0 such that triangular(n) + k^2 is a square).

Programs

  • Mathematica
    lpk[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[n^2+(k(k+1))/2]],k++];k]; Array[ lpk,70,0] (* Harvey P. Dale, May 04 2018 *)
  • PARI
    a(n) = {k = 1; while (! issquare(n^2 + k*(k+1)/2), k++); k;} \\ Michel Marcus, Nov 20 2013
  • Python
    import math
    for n in range(77):
      n2 = n*n
      y=1
      for k in range(1,10000001):
        sum = n2 + k*(k+1)//2
        r = int(math.sqrt(sum))
        if r*r == sum:
          print(str(k), end=',')
          y=0
          break
      if y: print('-', end=',')
    

A224419 Numbers n such that triangular(n) + triangular(2*n) is a square.

Original entry on oeis.org

0, 1, 25, 216, 1849, 36481, 311904, 2666689, 52606009, 449765784, 3845364121, 75857828929, 648561949056, 5545012396225, 109386936710041, 935225880773400, 7995904029992761, 157735886878050625, 1348595071513294176, 11530088066237165569, 227455039491212291641, 1944673157896289428824, 16626378995609962758169, 327990009210441246496129
Offset: 1

Views

Author

Alex Ratushnyak, Apr 18 2013

Keywords

Comments

8 of the first 10 terms are of the form x^y. The two exceptions are a(7) = 311904 = 2^5 * 3^3 * 19^2 and a(10) = 449765784 = 2^3 * 3^5 * 13^2 * 37^2.
The corresponding squares are given by A075873(2*n-1)^2. E.g., triangular(a(10)) + triangular(2*a(10)) = 711142146^2 = A075873(19)^2.
Locations of squares in A147875, equivalent to solving the Diophantine equation n*(5*n+3)=2*s^2. - R. J. Mathar, Apr 19 2013

Crossrefs

Cf. A220186 (numbers n such that triangular(2*n) - triangular(n) is a square).

Programs

  • Mathematica
    LinearRecurrence[{1,0,1442,-1442,0,-1,1},{0,1,25,216,1849,36481,311904},30]  (* Harvey P. Dale, Jan 23 2015 *)
  • Python
    import math
    for i in range(1<<30):
            s = i*(i+1)/2 + i*(2*i+1)
            t = int(math.sqrt(s))
            if s == t*t:  print(i)

Formula

a(n) = (A228209(2*n-1) - 3) / 10. - Max Alekseyev, Sep 04 2013
G.f.: x^2*(x+1)*(x^4 + 23*x^3 + 168*x^2 + 23*x + 1) / (x^6 - 1442*x^3 + 1) / (1-x). - Max Alekseyev, Sep 04 2013

Extensions

Terms a(11) onward from Max Alekseyev, Sep 04 2013

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

A225786 Numbers k such that oblong(2*k) + oblong(k) is a square, where oblong(k) = A002378(k) = k*(k+1).

Original entry on oeis.org

0, 48, 15552, 5007792, 1612493568, 519217921200, 167186558132928, 53833552500881712, 17334236718725778432, 5581570389877199773488, 1797248331303739601284800, 578708381109414274413932208, 186342301468900092621684886272
Offset: 1

Views

Author

Alex Ratushnyak, May 16 2013

Keywords

Comments

Numbers k such that k*(5*k+3) is a perfect square. Apparently a(n) = 323*a(n-1) -323*a(n-2) +a(n-3). - R. J. Mathar, May 18 2013

Examples

			48*49 + 96*97 = 108^2, so 48 is in the sequence.
		

Crossrefs

Cf. A002378.
Cf. A098301 (numbers n such that oblong(2*n) - oblong(n) is a square).
Cf. A224419 (triangular(2*n) + triangular(n) is a square).
Cf. A220186 (triangular(2*n) - triangular(n) is a square).
Cf. A225785 (oblong(2*n) + oblong(n) is an oblong number).

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) printf("%llu, ", i);
      }
      return 0;
    }
  • Mathematica
    LinearRecurrence[{323, -323, 1}, {0, 48, 15552}, 15] (* Bruno Berselli, May 18 2013 *)

Formula

G.f.: 48*x*(1+x)/((1-x)*(1-322*x+x^2)). - Bruno Berselli, May 18 2013
a(n) = (3/20)*((2-sqrt(5))^(4n-4)+(2+sqrt(5))^(4n-4)-2). - Bruno Berselli, May 18 2013

Extensions

a(6) from Ralf Stephan, May 17 2013
More terms from Bruno Berselli, May 18 2013
Showing 1-4 of 4 results.