A340323 Multiplicative with a(p^e) = (p + 1) * (p - 1)^(e - 1).
1, 3, 4, 3, 6, 12, 8, 3, 8, 18, 12, 12, 14, 24, 24, 3, 18, 24, 20, 18, 32, 36, 24, 12, 24, 42, 16, 24, 30, 72, 32, 3, 48, 54, 48, 24, 38, 60, 56, 18, 42, 96, 44, 36, 48, 72, 48, 12, 48, 72, 72, 42, 54, 48, 72, 24, 80, 90, 60, 72, 62, 96, 64, 3, 84, 144, 68, 54
Offset: 1
Examples
a(2^s) = 3 for all s>0.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Crossrefs
Programs
-
Maple
f:= proc(n) local t; mul((t[1]+1)*(t[1]-1)^(t[2]-1),t=ifactors(n)[2]) end proc: map(f, [$1..100]); # Robert Israel, Jan 07 2021
-
Mathematica
fa[n_]:=fa[n]=FactorInteger[n]; phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1) phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i,Length[fa[n]]}]; Array[phi, 245]
-
PARI
A340323(n) = if(1==n,n,my(f=factor(n)); prod(i=1,#f~,(f[i,1]+1)*((f[i,1]-1)^(f[i,2]-1)))); \\ Antti Karttunen, Jan 06 2021
Formula
Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(6)/(2*zeta(2)*zeta(3))) * Product_{p prime} (1 + 2/p^2) = 0.56361239505... . - Amiram Eldar, Nov 12 2022
Comments