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.

A240754 Numbers k with digit_sum(k*k) - 1 = digit_sum((k+1)*(k+1)).

Original entry on oeis.org

8, 26, 53, 98, 107, 143, 161, 170, 179, 188, 224, 233, 242, 260, 269, 278, 287, 296, 350, 368, 386, 404, 413, 431, 449, 476, 494, 503, 539, 548, 557, 584, 593, 629, 638, 647, 674, 683, 737, 746, 773, 791, 818, 827, 863, 872, 908, 926, 944, 998, 1007, 1043
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 12 2014

Keywords

Comments

A240752(a(n)) = 0.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a240754 n = a240754_list !! (n-1)
    a240754_list = elemIndices (-1) a240752_list
    
  • Python
    def ds(n): return sum(map(int, str(n)))
    def ok(n): return ds(n*n) - 1 == ds((n+1)*(n+1))
    print(list(filter(ok, range(1044)))) # Michael S. Branicky, Aug 26 2021