cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A340273 a(n) is the number of divisors d of n such that phi(n)/phi(lpf(n)) mod phi(n)/phi(d) = 0, where phi is Euler's totient function (A000010), and lpf(n) is the least prime factor of n (A020639).

This page as a plain text file.
%I A340273 #52 Dec 13 2021 16:14:26
%S A340273 1,2,1,3,1,4,1,4,2,4,1,6,1,4,3,5,1,6,1,6,3,4,1,8,2,4,3,6,1,8,1,6,3,4,
%T A340273 2,9,1,4,3,8,1,8,1,6,5,4,1,10,2,6,3,6,1,8,2,8,3,4,1,12,1,4,5,7,3,8,1,
%U A340273 6,3,8,1,12,1,4,5,6,2,8,1,10,4,4,1,12,3,4
%N A340273 a(n) is the number of divisors d of n such that phi(n)/phi(lpf(n)) mod phi(n)/phi(d) = 0, where phi is Euler's totient function (A000010), and lpf(n) is the least prime factor of n (A020639).
%C A340273 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.
%H A340273 Antti Karttunen, <a href="/A340273/b340273.txt">Table of n, a(n) for n = 1..20000</a>
%p A340273 with(numtheory):
%p A340273 a:= n-> `if`(n=1, 1, (f-> nops(select(d-> irem(phi(n)/phi(f),
%p A340273          phi(n)/phi(d))=0, divisors(n))))(min(factorset(n)))):
%p A340273 seq(a(n), n=1..100);  # _Alois P. Heinz_, Feb 12 2021
%t A340273 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 *)
%o A340273 (MATLAB)
%o A340273 n=100;
%o A340273 A=[];
%o A340273 for i=1:n
%o A340273     d=divisors(i);
%o A340273     t=0;
%o A340273     for j=1:size(d,2)
%o A340273         if checkCD(i,d(j))==1
%o A340273             t=t+1;
%o A340273         end
%o A340273     end
%o A340273     A=[A t];
%o A340273 end
%o A340273 function [res] = checkCD(n,d)
%o A340273     if mod(n,d)==0 && mod(totient(n)/totient(min(factor(n))),totient(n)/totient(d))==0
%o A340273         res=1;
%o A340273     else
%o A340273         res=0;
%o A340273     end
%o A340273 end
%o A340273 function [res] = totient(n)
%o A340273 res=0;
%o A340273     for i=1:n
%o A340273         if gcd(i,n)==1
%o A340273             res=res+1;
%o A340273         end
%o A340273     end
%o A340273 end
%o A340273 (PARI) lpf(n) = if (n==1, 1, factor(n)[1,1]);
%o A340273 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
%Y A340273 Cf. A000005, A000027, A000358.
%K A340273 nonn
%O A340273 1,2
%A A340273 _Maxim Karimov_, Jan 02 2021