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.

A257631 Near-repunit triangular numbers.

Original entry on oeis.org

10, 15, 21, 91, 171, 1711
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 12 2015

Keywords

Comments

A near-repunit number is a number all but one of whose digits are 1's. No other near-repunit triangular number is known up to 10^15.
No more terms less than 10^1000. It is likely there are no more terms. - Chai Wah Wu, Mar 25 2020

Crossrefs

Programs

  • Python
    from sympy import integer_nthroot
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def near_repunits(digits):
        for loc in range(1, digits):
            yield int("1"*loc + "0" + "1"*(digits-loc-1))
        for loc in range(1, digits+1):
            for d in "23456789":
                yield int("1"*(digits-loc) + d + "1"*(loc-1))
    def afind(maxdigits):
        for digits in range(2, maxdigits+1):
            for t in near_repunits(digits):
                if istri(t): print(t, end=", ")
    afind(200) # Michael S. Branicky, Oct 15 2021