OFFSET
1,2
COMMENTS
This equivalence criterion splits the divisor set of n into two types of divisors and can be used to compute the number of links of length k on the set of Fibonacci necklaces (A000358) of length n. This counting is a combinatorial problem over the positive integers.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
MAPLE
with(numtheory):
a:= n-> `if`(n=1, 1, (f-> nops(select(d-> irem(phi(n)/phi(f),
phi(n)/phi(d))=0, divisors(n))))(min(factorset(n)))):
seq(a(n), n=1..100); # Alois P. Heinz, Feb 12 2021
MATHEMATICA
Table[Function[{e, f}, DivisorSum[n, 1 &, Mod[e, f/EulerPhi[#]] == 0 &]] @@ {#2/#1, #2} & @@ {EulerPhi[FactorInteger[n][[1, 1]]], EulerPhi[n]}, {n, 86}] (* Michael De Vlieger, Feb 12 2021 *)
PROG
(MATLAB)
n=100;
A=[];
for i=1:n
d=divisors(i);
t=0;
for j=1:size(d, 2)
if checkCD(i, d(j))==1
t=t+1;
end
end
A=[A t];
end
function [res] = checkCD(n, d)
if mod(n, d)==0 && mod(totient(n)/totient(min(factor(n))), totient(n)/totient(d))==0
res=1;
else
res=0;
end
end
function [res] = totient(n)
res=0;
for i=1:n
if gcd(i, n)==1
res=res+1;
end
end
end
(PARI) lpf(n) = if (n==1, 1, factor(n)[1, 1]);
a(n) = my(lp = lpf(n), t = eulerphi(n)); sumdiv(n, d, Mod(t/eulerphi(lp), t/eulerphi(d)) == 0); \\ Michel Marcus, Jan 03 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Maxim Karimov, Jan 02 2021
STATUS
approved