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 A119584 #15 Mar 07 2024 08:56:41 %S A119584 0,0,2,3,20,5,70,53,121,87,330,117,572,305,507,553,1360,481,1938,873, %T A119584 1586,1405,3542,1241,3846,2415,4006,2765,7308,1875,8990,4945,6828, %U A119584 5675,9333,4525,15540,8053,11567,7745,21320,6047,24682,12005,15244,14625 %N A119584 a(n) = Sum_{k=1..phi(n)-1} t(n,k)*t(n,k+1), where t(n,k) is the k-th positive integer which is coprime to n and phi(n) is the number of positive integers which are <= n and are coprime to n. %C A119584 All primes are records and there exists records which are not primes, but they are rare (see A120033). - _Robert G. Wilson v_, Jun 05 2006 %e A119584 The positive integers which are <= 8 and are coprime to 8 are 1, 3, 5 and 7. So a(8) = 1*3 + 3*5 + 5*7 = 53. %t A119584 a[n_] := Block[{s = Select[ Range@n, GCD[ #, n] == 1 &]}, Plus @@ (Most@s*Rest@s)]; Array[a, 46] (* _Robert G. Wilson v_, Jun 05 2006 *) %o A119584 (PARI) a(n) = my(v=select(x->gcd(x, n)==1, [1..n])); sum(k=1, #v-1, v[k]*v[k+1]); \\ _Michel Marcus_, Mar 07 2024 %K A119584 nonn %O A119584 1,3 %A A119584 _Leroy Quet_, May 31 2006 %E A119584 More terms from _Robert G. Wilson v_, Jun 05 2006