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

A234141 Numbers k such that triangular(k) - m is a triangular number (A000217), where m is the largest square less than triangular(k).

Original entry on oeis.org

1, 4, 5, 7, 10, 13, 16, 19, 21, 22, 25, 28, 40, 42, 59, 60, 64, 76, 85, 89, 93, 109, 110, 124, 127, 142, 144, 148, 161, 165, 178, 184, 195, 212, 229, 233, 246, 247, 263, 265, 268, 280, 297, 313, 314, 331, 346, 348, 349, 365, 373, 376, 382, 399, 416, 433, 445, 450
Offset: 1

Views

Author

Alex Ratushnyak, Dec 19 2013

Keywords

Comments

The sequence of triangular(a(n)) begins: 1, 10, 15, 28, 55, 91, 136, 190, 231, 253, 325, ...

Crossrefs

Programs

  • Mathematica
    Select[Range[450], IntegerQ@Sqrt[8 ((#^2 + #)/2 - (Ceiling@Sqrt[(#^2 + #)/2] - 1)^2) + 1] &] (* Ivan Neretin, May 29 2016 *)

A234142 Numbers k such that m - triangular(k) is a triangular number (A000217), where m is the least square above triangular(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 11, 12, 15, 19, 20, 22, 25, 26, 29, 32, 33, 36, 40, 43, 47, 50, 52, 54, 57, 61, 64, 68, 70, 71, 73, 75, 78, 82, 85, 89, 90, 92, 96, 99, 103, 106, 110, 113, 114, 117, 120, 121, 122, 124, 127, 131, 134, 135, 141, 148, 152, 155, 172, 173, 188, 189, 196, 213
Offset: 1

Views

Author

Alex Ratushnyak, Dec 19 2013

Keywords

Comments

The sequence of triangular(a(n)) begins: 1, 3, 6, 10, 15, 66, 78, 120, 190, 210, 253, 325, ...

Crossrefs

Programs

  • Mathematica
    Select[Range[215], IntegerQ@Sqrt[8 ((Floor@Sqrt[(#^2 + #)/2] + 1)^2 - (#^2 + #)/2) + 1] &] (* Ivan Neretin, May 29 2016 *)

A229909 Triangular numbers t such that the following are three triangular numbers: x, y, x+y, where x and y are distances from t to the two nearest squares.

Original entry on oeis.org

1, 2080, 8038045
Offset: 1

Views

Author

Alex Ratushnyak, Dec 19 2013

Keywords

Comments

No more terms through 10^34. - Jon E. Schoenfield, Feb 09 2014

Examples

			2080 is in the sequence because the following three are triangular numbers:
2080-2025 = 55,
2116-2080 = 36,
55 + 36 = 91.
2025 = 45^2 and 2116 = 46^2 are the nearest to 2080 squares.
		

Crossrefs

Programs

  • Mathematica
    ttnQ[n_]:=Module[{s=Sqrt[n],x,y},x=If[IntegerQ[s],n-(s-1)^2,n- Floor[ s]^2];y=If[IntegerQ[s],(s+1)^2-n,Ceiling[s]^2-n];AllTrue[ {Sqrt[ 8x+1],Sqrt[8y+1],Sqrt[8(x+y)+1]},OddQ]]; Join[{1},Select[Accumulate[ Range[10000]],ttnQ]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 30 2015 *)
  • Python
    import math
    def isTriangular(a):
        a+=a
        sr = int(math.sqrt(a))
        return (a==sr*(sr+1))
    for n in range(1, 1000000000):
        tn = int(n*(n+1)/2)  # = x+y = distance between squares
        if tn&1:
            k = tn>>1
            k*= k       # square below t
            a = int(math.sqrt(k*2))
            t = a*(a+1)/2
            if t <= k:
                a+=1
                t+=a
            ktn = k+tn   # square above t
            while t <= ktn:  # check if x and y are triangular:
                if isTriangular(t-k) and isTriangular(ktn-t):
                    print(int(t))
                a+=1
                t+=a
        if (n&0xfffff)==0: print('.', end='')
Showing 1-3 of 3 results.