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.

A385998 Numbers that are divisible by an equal number of distinct primes and squares.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 13, 17, 18, 19, 20, 23, 24, 28, 29, 31, 37, 40, 41, 43, 44, 45, 47, 50, 52, 53, 54, 56, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 83, 88, 89, 92, 97, 98, 99, 101, 103, 104, 107, 109, 113, 116, 117, 124, 127, 131, 135, 136, 137, 139, 147, 148, 149
Offset: 1

Views

Author

Felix Huber, Aug 05 2025

Keywords

Comments

The smallest term such that number of distinct primes = number of squares = k is:
k = 1: 2,
k = 2: 12,
k = 3: 240,
k = 4: 1260.

Examples

			12 is divisible by 2 distinct primes (2, 3) and by 2 squares (1, 4).
		

Crossrefs

Supersequence of A000040.

Programs

  • Maple
    c:=(n,d)->igcd(n,d)=d and igcd(n/d,d)=d:
    b:=n->nops(select(k->c(n,k),[seq(1..n)])):
    A385998:=proc(n)
        option remember;
        local k;
        if n=1 then
            2
        else
            for k from procname(n-1)+1 do
                if b(k)=NumberTheory:-Omega(k,'distinct') then
                    return k
                fi
            od
        fi;
    end proc;	
    seq(A385998(n),n=1..63);
  • Mathematica
    q[k_] := Module[{e = FactorInteger[k][[;; , 2]]}, k > 1 && Length[e] == Times @@ (1 + Floor[e/2])]; Select[Range[150], q] (* Amiram Eldar, Aug 05 2025 *)
  • PARI
    isok(m) = my(d=divisors(m)); #select(isprime, d) == #select(issquare, d); \\ Michel Marcus, Aug 05 2025