A307997 a(n) is the sum of A023896(k) over the totatives of n.
1, 1, 2, 4, 9, 11, 25, 35, 53, 52, 109, 87, 188, 174, 218, 255, 432, 301, 622, 492, 636, 633, 1109, 725, 1288, 1113, 1468, 1287, 2275, 1121, 2801, 2305, 2598, 2499, 3227, 2266, 4760, 3550, 4229, 3449, 6556, 3311, 7628, 5527, 5846, 6199, 10017, 5736, 10453, 7282, 9654, 8832, 14451, 8143, 13060
Offset: 1
Examples
a(6) = 11 because the totatives of 6, i.e. the numbers from 1 to 6 that are coprime to 6, are 1 and 5, A023896(1) = 1 and A023896(5) = 1+2+3+4=10, and 1+10=11.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Robert Israel, Plot of a(n)/n^3 for n=3 to 20000
Programs
-
Maple
A023896:= proc(n) option remember; convert(select(t -> igcd(t,n)=1, [$1..n]),`+`) end proc: f:= n -> convert(map(A023896, select(t -> igcd(t,n)=1, [$1..n])),`+`): map(f, [$1..100]);
-
Mathematica
A023896[n_] := If[n == 1, 1, (n/2) EulerPhi[n]]; a[n_] := Sum[Boole[GCD[n, k] == 1] A023896[k], {k, 1, n}]; Array[a, 100] (* Jean-François Alcover, Jul 31 2020 *)
-
PARI
s(n) = if(n<2, n>0, n*eulerphi(n)/2); \\ A023896 a(n) = sum(k=1, n, if (gcd(n,k)==1, s(k))); \\ Michel Marcus, May 10 2019
Comments