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!)
A333297 a(n) = Sum_{i=1..n, j=1..n, gcd(i,j)=1} i. 1
1, 4, 13, 25, 55, 73, 136, 184, 265, 325, 490, 562, 796, 922, 1102, 1294, 1702, 1864, 2377, 2617, 2995, 3325, 4084, 4372, 5122, 5590, 6319, 6823, 8041, 8401, 9796, 10564, 11554, 12370, 13630, 14278, 16276, 17302, 18706, 19666, 22126, 22882, 25591, 26911, 28531, 30049, 33292, 34444, 37531, 39031 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
From Alois P. Heinz, Mar 25 2020: (Start)
a(n) = a(n-1) + 3*n*phi(n)/2 for n > 1, a(n) = n for n <= 1.
a(n) = 1 + Sum_{k=2..n} 3*k*phi(k)/2. (End)
a(n) = a(n-1) + 3 * A023896(n) for n > 1. - Hugo Pfoertner, Mar 26 2020
MAPLE
Vi := proc(m, n) local a, i, j; a:=0;
for i from 1 to m do for j from 1 to n do
if igcd(i, j)=1 then a:=a+i; fi; od: od: a; end;
# the diagonal :
[seq(Vi(n, n), n=1..50)];
# second Maple program:
a:= proc(n) option remember; `if`(n<2, n,
a(n-1) + 3*n*numtheory[phi](n)/2)
end:
seq(a(n), n=1..50); # Alois P. Heinz, Mar 25 2020
MATHEMATICA
a[n_] := a[n] = If[n < 2, n, a[n - 1] + 3 n EulerPhi[n]/2];
Array[a, 50] (* Jean-François Alcover, Nov 27 2020, after Alois P. Heinz *)
PROG
(PARI) a(n)={my(s=0); for(i=1, n, for(j=1, n, if(gcd(i, j)==1, s+=i))); s};
for(k=1, 45, print1(a(k), ", ")) \\ Hugo Pfoertner, Mar 25 2020
CROSSREFS
Sequence in context: A154820 A056708 A307271 * A092484 A091823 A024834
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 25 2020
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)