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, ... .

This page as a plain text file.
%I A381232 #18 Mar 02 2025 08:01:42
%S A381232 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,
%T A381232 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,
%U A381232 -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
%N A381232 Count down from k to -k for k = 0, 1, 2, ... .
%H A381232 Paolo Xausa, <a href="/A381232/b381232.txt">Table of n, a(n) for n = 0..10200</a> (k = 0..100)
%F A381232 a(n) = -A196199(n) = floor(sqrt(n))*(floor(sqrt(n))+1)-n. - _Chai Wah Wu_, Mar 01 2025
%t A381232 Flatten[Table[Range[k, -k, -1], {k, 0, 10}]] (* _Paolo Xausa_, Mar 01 2025 *)
%o A381232 (Python)
%o A381232 from math import isqrt
%o A381232 def A381232(n): return (t:=isqrt(n))*(t+1)-n # _Chai Wah Wu_, Mar 01 2025
%Y A381232 Cf. A196199, A381233.
%K A381232 sign,easy
%O A381232 0,5
%A A381232 _N. J. A. Sloane_, Mar 01 2025 [Suggested by _Franklin T. Adams-Watters_, Sep 21 2011]