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.

Showing 1-3 of 3 results.

A137927 a(n) = the largest divisor of A000005(n) that is coprime to n. (A000005(n) = the number of positive divisors of n.).

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 4, 5, 2, 1, 2, 3, 4, 1, 2, 1, 3, 1, 4, 3, 2, 1, 2, 3, 4, 1, 4, 1, 2, 1, 4, 1, 2, 1, 2, 3, 2, 1, 2, 5, 3, 3, 4, 3, 2, 1, 4, 1, 4, 1, 2, 1, 2, 1, 2, 7, 4, 1, 2, 3, 4, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1
Offset: 1

Views

Author

Leroy Quet, Feb 23 2008

Keywords

Comments

Apparently also the denominator of A007955(n)/A000005(n). See A291186. - Jaroslav Krizek, Sep 05 2017

Examples

			20 has 6 positive divisors. The divisors of 6 are 1,2,3,6. The divisors of 6 that are coprime to 20 are 1 and 3. 3 is the largest of these; so a(20) = 3.
		

Crossrefs

Programs

  • Maple
    A137927 := proc(n)
        local a;
        a := 1 ;
        for d in numtheory[divisors](numtheory[tau](n)) do
            if igcd(d,n) = 1 then
                a := max(a,d) ;
            end if:
        end do:
        a ;
    end proc:
    seq(A137927(n),n=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    Table[Select[Divisors[Length[Divisors[n]]], GCD[ #, n] == 1 &][[ -1]], {n, 1, 80}] (* Stefan Steinerberger, Mar 09 2008 *)
  • PARI
    a(n) = my(d=divisors(numdiv(n))); forstep(k=#d, 1, -1, if (gcd(d[k], n) == 1, return (d[k]))); \\ Michel Marcus, Sep 22 2017; corrected Jun 13 2022

Extensions

More terms from Stefan Steinerberger, Mar 09 2008

A152442 n is included if the largest divisor of n that is coprime to d(n) is a composite, where d(n) is the number of divisors of n.

Original entry on oeis.org

4, 15, 16, 21, 25, 27, 30, 33, 35, 36, 39, 42, 49, 50, 51, 54, 55, 57, 64, 65, 66, 69, 70, 75, 77, 78, 81, 85, 87, 91, 93, 95, 98, 100, 102, 105, 110, 111, 114, 115, 119, 120, 121, 123, 125, 129, 130, 133, 135, 138, 140, 141, 143, 144, 145, 147, 150, 154, 155, 159, 161
Offset: 1

Views

Author

Leroy Quet, Dec 04 2008

Keywords

Comments

A137926(a(n)) is composite for all n.

Crossrefs

Programs

  • Mathematica
    a = {}; For[n = 2, n < 1000, n++, b = Max[Select[Divisors[n], GCD[DivisorSigma[0, n], # ] == 1 &]]; If[b > 1 && ! PrimeQ[b], AppendTo[a, n]]]; a (* Stefan Steinerberger, Dec 06 2008 *)
    ldcQ[n_]:=CompositeQ[Max[Select[Divisors[n],CoprimeQ[#,DivisorSigma[0,n]]&]]]; Select[Range[200],ldcQ] (* Harvey P. Dale, Feb 19 2025 *)

Extensions

More terms from Stefan Steinerberger and Ray Chandler, Dec 06 2008

A152443 a(n) = the largest proper divisor of n that is coprime to d(n), where d(n) = the number of divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 1, 5, 1, 1, 1, 7, 5, 8, 1, 1, 1, 5, 7, 11, 1, 3, 5, 13, 9, 7, 1, 15, 1, 1, 11, 17, 7, 4, 1, 19, 13, 5, 1, 21, 1, 11, 5, 23, 1, 3, 7, 25, 17, 13, 1, 27, 11, 7, 19, 29, 1, 5, 1, 31, 7, 32, 13, 33, 1, 17, 23, 35, 1, 1, 1, 37, 25, 19, 11, 39, 1, 1, 27, 41, 1, 7, 17, 43, 29, 11, 1, 5
Offset: 2

Views

Author

Leroy Quet, Dec 04 2008

Keywords

Comments

If n is squarefree then a(n) = A032742(n). - Robert Israel, Jun 23 2025

Examples

			There are 4 divisors of 27. These are 1,3,9,27. The proper divisors of 27 are therefore 1,3,9. The largest of these that is coprime to d(27) = 4 is 9. So a(27) = 9. (Note that in this case, the largest divisor of 27 coprime to 4 is 27, not 9.)
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d,D;
       D:= numtheory:-divisors(n);
       d:= nops(D);
       max(select(t -> igcd(d,t)=1, D minus {n}))
    end proc:
    map(f, [$2..100]); # Robert Israel, Jun 23 2025
  • Mathematica
    Table[Max[Select[Drop[Divisors[n], -1], GCD[DivisorSigma[0, n], # ] == 1 &]], {n, 2, 100}] (* Stefan Steinerberger, Dec 06 2008 *)

Extensions

Extended by Ray Chandler and Stefan Steinerberger, Dec 05 2008
Showing 1-3 of 3 results.