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

A232177 Least positive k such that triangular(n) + triangular(k) is a square.

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 5, 6, 7, 8, 9, 5, 2, 12, 13, 1, 15, 16, 17, 3, 5, 20, 2, 22, 23, 8, 4, 26, 12, 3, 29, 30, 1, 5, 33, 34, 4, 36, 37, 15, 6, 29, 22, 5, 43, 19, 45, 7, 15, 48, 6, 50, 11, 52, 8, 41, 22, 7, 57, 58, 59, 9, 26, 62, 8, 64, 19, 66, 10, 68, 5, 9, 71, 2
Offset: 0

Views

Author

Alex Ratushnyak, Nov 20 2013

Keywords

Comments

Triangular(k) = A000217(k) = k*(k+1)/2.
For n>1, a(n) <= n-1, because with k=n-1: triangular(n) + triangular(k) = n*(n+1)/2 + (n-1)*n/2 = n^2.

Crossrefs

Cf. A082183 (least k>0 such that triangular(n) + triangular(k) is a triangular number).
Cf. A212614 (least k>1 such that triangular(n) * triangular(k) is a triangular number).
Cf. A232176 (least k>0 such that n^2 + triangular(k) is a square).
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
    Table[k = 1; tri = n*(n + 1)/2; While[k <= n+2 && ! IntegerQ[Sqrt[tri + k*(k + 1)/2]], k++]; k, {n, 0, 100}] (* T. D. Noe, Nov 21 2013 *)
  • Python
    import math
    for n in range(77):
      tn = n*(n+1)//2
      for k in range(1, n+9):
        sum = tn + k*(k+1)//2
        r = int(math.sqrt(sum))
        if r*r == sum:
          print(str(k), end=',')
          break

A212615 Least k > 1 such that the product pen(n) * pen(k) is pentagonal, or zero if no such k exists, where pen(k) is the k-th pentagonal number.

Original entry on oeis.org

2, 39, 2231, 40, 14, 94974, 47, 212, 1071, 477, 124, 261, 15120, 5, 180, 375638, 2413, 22, 4270831, 924, 278, 18, 126, 33510, 355, 376, 9047610, 37313170, 1533015, 7315, 1687018, 520, 363155, 8827, 13514, 11701449166, 670, 3290, 2, 4, 817, 31175067
Offset: 1

Views

Author

T. D. Noe, Jun 07 2012

Keywords

Comments

That is, pen(k) = k*(3k-1)/2.

Examples

			For n = 2, pen(n) = 5 and the first k is 39 because pen(39) = 2262 and 5*2262 = 11310 which is the 87th pentagonal number.
		

Crossrefs

Cf. A188663 (pentagonal numbers that are pen(x) * pen(y) for some x,y > 1).
Cf. A212614 (similar sequence for triangular numbers).
Cf. A000326 (pentagonal numbers).

Programs

  • Mathematica
    kMax = 10^7; PentagonalQ[n_] := IntegerQ[(1 + Sqrt[1 + 24*n])/6]; Table[t = n*(3*n - 1)/2; k = 2; While[t2 = k*(3*k - 1)/2; k < kMax && ! PentagonalQ[t*t2], k++]; If[k == kMax, 0, k], {n, 15}]

Extensions

a(25) corrected and a(28)-a(42) from Donovan Johnson, Feb 08 2013
Showing 1-2 of 2 results.