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-4 of 4 results.

A366521 Largest squarefree divisor of n which is <= sqrt(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 3, 5, 2, 3, 2, 1, 5, 1, 2, 3, 2, 5, 6, 1, 2, 3, 5, 1, 6, 1, 2, 5, 2, 1, 6, 7, 5, 3, 2, 1, 6, 5, 7, 3, 2, 1, 6, 1, 2, 7, 2, 5, 6, 1, 2, 3, 7, 1, 6, 1, 2, 5, 2, 7, 6, 1, 5, 3, 2, 1, 7, 5, 2, 3, 2, 1, 6, 7, 2, 3, 2, 5, 6, 1, 7, 3, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 11 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Last[Select[Divisors[n], # <= Sqrt[n] && SquareFreeQ[#] &]], {n, 100}]
  • PARI
    a(n) = {my(m=1); fordiv(n, d, if(d^2 <= n && issquarefree(d), m=max(m,d))); m} \\ Andrew Howroyd, Oct 11 2023

A366522 Largest squarefree divisor of n which is < sqrt(n), for n >= 2; a(1) = 1.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 11 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < Sqrt[n] && SquareFreeQ[#] &]], {n, 2, 100}]]
  • PARI
    a(n) = {my(m=1); fordiv(n, d, if(d^2 < n && issquarefree(d), m=max(m,d))); m} \\ Andrew Howroyd, Oct 11 2023

A365837 Largest proper square divisor of n, for n >= 2; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 9, 1, 4, 1, 1, 1, 4, 1, 1, 9, 4, 1, 1, 1, 16, 1, 1, 1, 9, 1, 1, 1, 4, 1, 1, 1, 4, 9, 1, 1, 16, 1, 25, 1, 4, 1, 9, 1, 4, 1, 1, 1, 4, 1, 1, 9, 16, 1, 1, 1, 4, 1, 1, 1, 36, 1, 1, 25, 4, 1, 1, 1, 16, 9, 1, 1, 4, 1, 1, 1, 4, 1, 9, 1, 4, 1, 1, 1, 16, 1, 49, 9, 25
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 17 2023

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local F, t;
      if issqr(n) then
        n/min(numtheory:-factorset(n))^2
      else
        F:= ifactors(n)[2];
        mul(t[1]^(2*floor(t[2]/2)),t=F)
      fi
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Nov 20 2023
  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < n && IntegerQ[Sqrt[#]]  &]], {n, 2, 100}]]
    f[p_, e_] := p^(2*Floor[e/2]); a[n_] := Module[{fct = FactorInteger[n]}, Times @@ f @@@ fct/If[AllTrue[fct[[;; , 2]], EvenQ], fct[[1, 1]]^2, 1]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
  • PARI
    a(n) = if (n==1, 1, my(d=divisors(n)); vecmax(select(issquare, Vec(d, #d-1)))); \\ Michel Marcus, Oct 17 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A365837(n):
        if n<=1: return 1
        f = factorint(n)
        return prod(p**(e&-2) for p, e in f.items())//(min(f)**2 if all(e&1^1 for e in f.values()) else 1) # Chai Wah Wu, Oct 20 2023

A366649 Largest prime power (including 1) proper divisor of n, for n >= 2; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 4, 1, 7, 5, 8, 1, 9, 1, 5, 7, 11, 1, 8, 5, 13, 9, 7, 1, 5, 1, 16, 11, 17, 7, 9, 1, 19, 13, 8, 1, 7, 1, 11, 9, 23, 1, 16, 7, 25, 17, 13, 1, 27, 11, 8, 19, 29, 1, 5, 1, 31, 9, 32, 13, 11, 1, 17, 23, 7, 1, 9, 1, 37, 25, 19, 11, 13, 1, 16, 27, 41, 1, 7, 17
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 17 2023

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= ifactors(n)[2];
      if nops(F) = 1 then n/F[1,1]
      else max(map(t -> t[1]^t[2], F))
      fi
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Nov 19 2023
  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < n && (# == 1 || PrimePowerQ[#]) &]], {n, 2, 85}]]
    a[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]]^(f[[1, 2]] - 1), Max[Power @@@ f]]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
  • PARI
    a(n) = if (n==1, 1, my(d=divisors(n)); vecmax(select(x->(isprimepower(x) || (x==1)), Vec(d, #d-1)))); \\ Michel Marcus, Oct 17 2023
Showing 1-4 of 4 results.