login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209295 Antidiagonal sums of the gcd(.,.) array A109004. 4
0, 2, 5, 8, 12, 14, 21, 20, 28, 30, 37, 32, 52, 38, 53, 60, 64, 50, 81, 56, 92, 86, 85, 68, 124, 90, 101, 108, 132, 86, 165, 92, 144, 138, 133, 152, 204, 110, 149, 164, 220, 122, 237, 128, 212, 234, 181, 140, 288, 182, 245, 216, 252, 158, 297, 244 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 5000 terms from G. C. Greubel)
FORMULA
a(0) = 0; a(n) = A018804(n) + n for n > 0. [Amended by Georg Fischer, Jan 25 2020]
a(n) = Sum_{d|n} phi(d)*(n/d + 1) for n >= 1. - Peter Luschny, Aug 25 2019
MAPLE
a:= n-> add(igcd(j, n-j), j=0..n):
seq(a(n), n=0..70); # Alois P. Heinz, Aug 25 2019
# Alternative (computes [a(n), n=0..10000] about 25 times faster):
a := n -> add(numtheory:-phi(d)*(n/d + 1), d = numtheory:-divisors(n)):
seq(a(n), n = 0..57); # Peter Luschny, Aug 25 2019
MATHEMATICA
a[n_, m_] := GCD[n, m]; Table[Sum[a[n - k, k], {k, 0, n}], {n, 0, 50}] (* G. C. Greubel, Jan 04 2018 *)
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 *)
PROG
(PARI) a(n) = n + sum(k=1, n, gcd(n, k)); \\ Michel Marcus, Jan 05 2018
CROSSREFS
Sequence in context: A189531 A190347 A193767 * A184813 A108311 A092767
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Jan 17 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 21 06:29 EDT 2024. Contains 371850 sequences. (Running on oeis4.)