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.

A381232 Count down from k to -k for k = 0, 1, 2, ... .

Original entry on oeis.org

0, 1, 0, -1, 2, 1, 0, -1, -2, 3, 2, 1, 0, -1, -2, -3, 4, 3, 2, 1, 0, -1, -2, -3, -4, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9
Offset: 0

Views

Author

N. J. A. Sloane, Mar 01 2025 [Suggested by Franklin T. Adams-Watters, Sep 21 2011]

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Range[k, -k, -1], {k, 0, 10}]] (* Paolo Xausa, Mar 01 2025 *)
  • Python
    from math import isqrt
    def A381232(n): return (t:=isqrt(n))*(t+1)-n # Chai Wah Wu, Mar 01 2025

Formula

a(n) = -A196199(n) = floor(sqrt(n))*(floor(sqrt(n))+1)-n. - Chai Wah Wu, Mar 01 2025