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).

Original entry on oeis.org

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, 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, 6, 3, 8, 1, 12, 1, 4, 5, 6, 2, 8, 1, 10, 4, 4, 1, 12, 3, 4
Offset: 1

Views

Author

Maxim Karimov, Jan 02 2021

Keywords

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.

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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