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.

A069752 Smallest k>n such that the triangular number n*(n+1)/2 divides the triangular number k*(k+1)/2.

Original entry on oeis.org

2, 3, 8, 15, 9, 14, 48, 63, 35, 44, 32, 39, 77, 20, 80, 255, 135, 152, 75, 35, 77, 230, 183, 200, 299, 324, 188, 203, 144, 155, 960, 351, 153, 84, 224, 296, 665, 246, 104, 615, 245, 258, 472, 99, 414, 1034, 704, 735, 1175, 374, 272, 636, 1377, 539, 175, 399, 551
Offset: 1

Views

Author

Benoit Cloitre, May 01 2002

Keywords

Comments

Note that k <= n^2-1, with equality occurring only if n and n+1 are a prime and a power of 2 (in either order); that is, when n is a Mersenne prime or n+1 is a Fermat prime. - T. D. Noe, Apr 08 2011

Crossrefs

Programs

  • Mathematica
    Clear[k]; Join[{2}, Table[Reduce[k*(k+1) == 0, k, Modulus -> n*(n+1)][[3, 2]], {n, 2, 100}]] (* T. D. Noe, Apr 08 2011 *)
  • PARI
    for(s=1,1000,s1=s*(s+1);n=s+1; while(n*(n+1)%s1>0,n++); print1(n,","); ) \\ Zak Seidov, Apr 08 2011

A267077 Least m>0 for which m*n^2 + 1 is a square and m*triangular(n) + 1 is a triangular number (A000217). Or -1 if no such m exists.

Original entry on oeis.org

1, 35, 30, 18135, 189, 27, 321300, 23760, 1188585957, 1656083, 26, 244894427400, 82093908624206325, 1858717755529547, 86478, 21491811639746039592, 26135932603458945934958445, 353382195058506640426335, 26780050, 7859354769338288038121982384, 274554988002
Offset: 0

Views

Author

Alex Ratushnyak, Jan 10 2016

Keywords

Examples

			26*10^2+1 = 2601 is a square, and 26*10*11/2+1 = 1431 = triangular(53), and 26 is the smallest such multiplier, therefore a(10) = 26.
		

Crossrefs

Programs

  • Python
    from math import sqrt
    def A267077(n):
        if n == 0:
            return 1
        u,v,t,w = max(8,2*n),max(4,n)**2-9,4*n*(n+1),n**2
        while True:
            m,r = divmod(v,t)
            if not r and int(sqrt(m*w+1))**2 == m*w+1:
                return m
            v += u+1
            u += 2 # Chai Wah Wu, Jan 15 2016
    
  • Python
    #!/usr/bin/python3
    # This sequence is easy if you use a Pell-equation solver such as labmath.py
    # Solve the A267077 Pell equation:
    # nx^2 - (4n+4)y^2 = 5n-4; but also y^2 == 1 mod n^2
    # Let u = nx, then # u^2 - n*(4n+4)y^2 = n*(5n-4)
    #   and (y > n) and (u == 0 mod n) and (y^2 == 1 mod n^2)
    # (y > n makes m > 0)
    # Report m = (y^2 - 1) / n^2
    import labmath
    print(0, 1)
    print(1, 35) # When n<2, the Pell equation is elliptical.
    for nn in range(2,1001):
        nsq = nn * nn
        ps = labmath.pell(nn*(4*nn+4), nn*(5*nn-4))
        uu,yy = next(ps[0])
        while (yy <= nn) or ((uu % nn) != 0) or ((yy*yy) % nsq != 1):
            uu,yy = next(ps[0])
        print(nn, (yy*yy - 1) // nsq)
    # From Don Reble, Apr 15 2022, added by N. J. A. Sloane, Apr 15 2022.

Extensions

a(12)-a(15) from Chai Wah Wu, Jan 16 2016
a(16) and beyond from Don Reble, Apr 15 2022
Showing 1-2 of 2 results.