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.

A209295 Antidiagonal sums of the gcd(.,.) array A109004.

This page as a plain text file.
%I A209295 #40 Jun 24 2024 04:12:19
%S A209295 0,2,5,8,12,14,21,20,28,30,37,32,52,38,53,60,64,50,81,56,92,86,85,68,
%T A209295 124,90,101,108,132,86,165,92,144,138,133,152,204,110,149,164,220,122,
%U A209295 237,128,212,234,181,140,288,182,245,216,252,158,297,244
%N A209295 Antidiagonal sums of the gcd(.,.) array A109004.
%H A209295 Alois P. Heinz, <a href="/A209295/b209295.txt">Table of n, a(n) for n = 0..10000</a> (first 5000 terms from G. C. Greubel)
%F A209295 a(0) = 0; a(n) = A018804(n) + n for n > 0. [Amended by _Georg Fischer_, Jan 25 2020]
%F A209295 a(n) = Sum_{d|n} phi(d)*(n/d + 1) for n >= 1. - _Peter Luschny_, Aug 25 2019
%p A209295 a:= n-> add(igcd(j, n-j), j=0..n):
%p A209295 seq(a(n), n=0..70);  # _Alois P. Heinz_, Aug 25 2019
%p A209295 # Alternative (computes [a(n), n=0..10000] about 25 times faster):
%p A209295 a := n -> add(numtheory:-phi(d)*(n/d + 1), d = numtheory:-divisors(n)):
%p A209295 seq(a(n), n = 0..57); # _Peter Luschny_, Aug 25 2019
%t A209295 Table[Sum[GCD[n-k,k], {k,0,n}], {n,0,50}] (* _G. C. Greubel_, Jan 04 2018 *)
%t A209295 f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := n + Times @@ f @@@ FactorInteger[n]; a[0] = 0; Array[a, 100, 0] (* _Amiram Eldar_, Apr 28 2023 *)
%o A209295 (PARI) a(n) = n + sum(k=1, n, gcd(n,k)); \\ _Michel Marcus_, Jan 05 2018
%o A209295 (Magma)
%o A209295 A209295:= func< n | n eq 0 select 0 else (&+[(n/d+1)*EulerPhi(d): d in Divisors(n)]) >;
%o A209295 [A209295(n): n in [0..40]]; // _G. C. Greubel_, Jun 24 2024
%o A209295 (SageMath)
%o A209295 def A209295(n): return sum((n/k+1)*euler_phi(k) for k in (1..n) if (k).divides(n))
%o A209295 [A209295(n) for n in range(41)] # _G. C. Greubel_, Jun 24 2024
%Y A209295 Cf. A006580, A018804, A109004.
%K A209295 nonn,easy
%O A209295 0,2
%A A209295 _R. J. Mathar_, Jan 17 2013