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.

A368624 a(n) = Sum_{k = 1..n} (-1)^(n+k) * gcd(2*k, n).

This page as a plain text file.
%I A368624 #19 Jun 16 2024 15:04:43
%S A368624 1,0,3,4,5,0,7,16,9,0,11,20,13,0,15,48,17,0,19,36,21,0,23,80,25,0,27,
%T A368624 52,29,0,31,128,33,0,35,84,37,0,39,144,41,0,43,84,45,0,47,240,49,0,51,
%U A368624 100,53,0,55,208,57,0,59,180,61,0,63,320,65,0,67,132,69,0
%N A368624 a(n) = Sum_{k = 1..n} (-1)^(n+k) * gcd(2*k, n).
%F A368624 a(2*n+1) = 2*n + 1; a(4*n+2) = 0; a(4*n) = 4*A344372(n) = 4*Sum_{k = 1..n} gcd(2*k, n).
%p A368624 seq(add((-1)^(n+k) * gcd(2*k, n), k = 1..n), n = 1..70)
%t A368624 Table[Sum[(-1)^(n+k) GCD[2k,n],{k,n}],{n,70}] (* _Harvey P. Dale_, Jun 16 2024 *)
%Y A368624 Cf. A344371, A344372.
%K A368624 nonn,easy
%O A368624 1,3
%A A368624 _Peter Bala_, Jan 01 2024