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.

A166387 a(n) = sum (floor (j^2/n), 1 <= j <= n-1) - floor ((n-1)(n-2)/3), n >= 2.

This page as a plain text file.
%I A166387 #13 May 12 2016 13:10:57
%S A166387 0,1,1,0,1,1,2,2,0,1,3,0,1,3,4,0,2,1,3,2,1,3,6,2,0,3,3,0,3,3,6,2,0,3,
%T A166387 7,0,1,5,6,0,2,1,5,4,3,5,10,4,2,3,3,0,3,5,8,2,0,3,9,0,3,7,10,0,2,1,5,
%U A166387 4,3,7,12,0,0,7,5,2,5,5,12,6,0,3,9,0,1,7,8,0,4,3,7,4,5,9,16,0,4
%N A166387 a(n) = sum (floor (j^2/n), 1 <= j <= n-1) - floor ((n-1)(n-2)/3), n >= 2.
%C A166387 a(n) = 0 when n = 2, any prime of the form 4k+1 with k >= 1 and any product of these without repetition, e.g. 2x5x17.
%H A166387 G. C. Greubel, <a href="/A166387/b166387.txt">Table of n, a(n) for n = 2..10000</a>
%F A166387 a(n) = A166375(n) - A128422(n).
%t A166387 Table[Sum[Floor[k^2/n], {k, 1, n - 1}] - Floor[(n - 1)*(n - 2)/3], {n, 2, 100}] (* _G. C. Greubel_, May 12 2016 *)
%o A166387 (PARI) a(n) = sum(j=1,n-1, j^2\n) - ((n-1)*(n-2))\3 \\ _Michel Marcus_, Jun 21 2013
%Y A166387 Cf. A166375, A128422.
%K A166387 nonn
%O A166387 2,7
%A A166387 _Christopher Hunt Gribble_, Oct 13 2009
%E A166387 Corrected and enhanced by _Christopher Hunt Gribble_, Dec 01 2009