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.

Previous Showing 11-11 of 11 results.

A257630 Near-repdigit triangular numbers.

Original entry on oeis.org

10, 15, 21, 28, 36, 45, 78, 91, 171, 300, 595, 990, 1711, 5565, 6555, 66066, 333336
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 12 2015

Keywords

Comments

A near-repdigit is a number having all digits but one equal. No other near-repdigit 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

  • Mathematica
    nrepQ[n_] := Module[{dg = Select[DigitCount[n], # > 0 &]},Length[dg] == 2 && Min[dg] == 1 && Max[dg] > 0]; Select[
    Table[n*(n + 1)/2, {n, 10000}], nrepQ]
  • Python
    from sympy import integer_nthroot
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def near_repdigits(digits):
        s = set()
        for d1 in "0123456789":
            for d2 in set("0123456789") - {d1}:
                for loc in range(1, digits+1):
                    nrd = d1*(digits-loc) + d2 + d1*(loc-1)
                    if nrd[0] != "0": s.add(int(nrd))
        return sorted(s)
    def afind(maxdigits):
        for digits in range(2, maxdigits+1):
            for t in near_repdigits(digits):
                if istri(t): print(t, end=", ")
    afind(100) # Michael S. Branicky, Oct 15 2021
Previous Showing 11-11 of 11 results.