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.
%I A128248 #14 Feb 11 2019 01:38:51 %S A128248 -1,-1,1,2,2,4,3,4,3,4,5,8,6,8,8,8,8,12,9,8,8,12,11,16,10,12,9,16,14, %T A128248 16,15,16,16,16,16,24,18,20,16,16,20,16,21,24,24,24,23,32,21,20,24,24, %U A128248 26,36,24,32,24,28,29,32,30,32,24,32,32,32,33,32,32,32,35,48,36,36,40,40,40,32,39,32,27,40,41,32,40,44,40,48,44,48,48 %N A128248 a(n) = Sum_{k=1..phi(n)} t(k,n)*(-1)^k, where t(k,n) is the k-th positive integer that is coprime to n and phi(n) = A000010(n). %C A128248 a(1) and a(2) are the only negative terms of the sequence. %H A128248 Harvey P. Dale, <a href="/A128248/b128248.txt">Table of n, a(n) for n = 1..1000</a> %e A128248 The positive integers which are <= 10 and are coprime to 10 are 1,3,7,9. So a(10) = -1 + 3 - 7 + 9 = 4. %p A128248 with(numtheory): t:=proc(k,n) local A,i: A:={}: for i from 1 while nops(A)<=k do if igcd(i,n)=1 then A:=A union {i} else A:=A: fi od: A[k] end: a:=n->add((-1)^k*t(k,n),k=1..phi(n)): seq(a(n),n=1..100); # _Emeric Deutsch_, May 06 2007 %t A128248 Table[Total[Times@@@Partition[Riffle[Select[Range[n],CoprimeQ[#,n]&],{-1,1},{2,-1,2}],2]],{n,100}] (* _Harvey P. Dale_, May 05 2013 *) %Y A128248 Cf. A000010, A038566. %K A128248 sign %O A128248 1,4 %A A128248 _Leroy Quet_, May 03 2007 %E A128248 More terms from _Emeric Deutsch_, May 06 2007