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.

A065651 a(n) = Sum_{k=1..n} (-1)^tau(k) = n - 2*floor(sqrt(n)).

This page as a plain text file.
%I A065651 #35 Apr 25 2023 19:13:51
%S A065651 0,1,0,1,2,3,4,3,4,5,6,7,8,9,8,9,10,11,12,13,14,15,16,15,16,17,18,19,
%T A065651 20,21,22,23,24,25,24,25,26,27,28,29,30,31,32,33,34,35,36,35,36,37,38,
%U A065651 39,40,41,42,43,44,45,46,47,48,49,48,49,50,51,52,53,54,55,56,57,58,59
%N A065651 a(n) = Sum_{k=1..n} (-1)^tau(k) = n - 2*floor(sqrt(n)).
%H A065651 Harry J. Smith, <a href="/A065651/b065651.txt">Table of n, a(n) for n = 2..1000</a>
%t A065651 Table[n-2*Floor[Sqrt[n]],{n,2,80}] (* _Harvey P. Dale_, Jul 27 2012 *)
%o A065651 (PARI) a(n) = n - 2*sqrtint(n); \\ _Harry J. Smith_, Oct 25 2009
%o A065651 (Python)
%o A065651 import math
%o A065651 def a(n): return n - 2 * math.isqrt(n) # _DarĂ­o Clavijo_, Apr 23 2023
%Y A065651 Cf. A000005 (tau), A000196, A028391, A028392.
%K A065651 nonn,easy
%O A065651 2,5
%A A065651 _Vladeta Jovovic_, Dec 03 2001