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.

A322791 Irregular triangle read by rows in which the n-th row lists the exponential divisors (or e-divisors) of n.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 7, 2, 8, 3, 9, 10, 11, 6, 12, 13, 14, 15, 2, 4, 16, 17, 6, 18, 19, 10, 20, 21, 22, 23, 6, 24, 5, 25, 26, 3, 27, 14, 28, 29, 30, 31, 2, 32, 33, 34, 35, 6, 12, 18, 36, 37, 38, 39, 10, 40, 41, 42, 43, 22, 44, 15, 45, 46, 47, 6, 12, 48, 7, 49
Offset: 1

Views

Author

Amiram Eldar, Dec 26 2018

Keywords

Examples

			The table starts
  1
  2
  3
  2, 4
  5
  6
  7
  2, 8
  3, 9
  10
		

Crossrefs

Cf. A049419 (row lengths), A051377 (row sums).
Cf. A027750 (all divisors), A077609 (infinitary), A077610 (unitary), A222266 (bi-unitary).

Programs

  • Maple
    A322791 := proc(n)
        local expundivs ,d,isue,p,ai,bi;
        expudvs := {} ;
        for d in numtheory[divisors](n) do
            isue := true ;
            for p in numtheory[factorset](n) do
                ai := padic[ordp](n,p) ;
                bi := padic[ordp](d,p) ;
                if bi > 0 then
                    if modp(ai,bi) <>0 then
                        isue := false;
                    end if;
                else
                    isue := false ;
                end if;
            end do;
            if isue then
                expudvs := expudvs union {d} ;
            end if;
        end do:
        sort(expudvs) ;
    end proc:
    seq(op(A322791(n)),n=1..40) ; # R. J. Mathar, Mar 06 2023
  • Mathematica
    divQ[n_, m_] := (n > 0 && m>0 && Divisible[n, m]); expDivQ[n_, d_] := Module[ {f=FactorInteger[n]}, And@@MapThread[divQ, {f[[;; , 2]], IntegerExponent[ d, f[[;; , 1]]]} ]]; expDivs[1]={1}; expDivs[n_] := Module[ {d=Rest[Divisors[n]]}, Select[ d, expDivQ[n, #]&] ]; Table[expDivs[n], {n, 1, 50}] // Flatten
  • PARI
    isexpdiv(f, d) = { my(e); for (i=1, #f~, e = valuation(d, f[i, 1]); if(!e || (e && f[i, 2] % e), return(0))); 1; }
    row(n) = {my(d = divisors(n), f = factor(n), ediv = []); if(n == 1, return([1])); for(i=2, #d, if(isexpdiv(f, d[i]), ediv = concat(ediv, d[i]))); ediv; } \\ Amiram Eldar, Mar 27 2023