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.

This page as a plain text file.
%I A385998 #9 Aug 12 2025 18:47:06
%S A385998 2,3,5,7,11,12,13,17,18,19,20,23,24,28,29,31,37,40,41,43,44,45,47,50,
%T A385998 52,53,54,56,59,61,63,67,68,71,73,75,76,79,83,88,89,92,97,98,99,101,
%U A385998 103,104,107,109,113,116,117,124,127,131,135,136,137,139,147,148,149
%N A385998 Numbers that are divisible by an equal number of distinct primes and squares.
%C A385998 The smallest term such that number of distinct primes = number of squares = k is:
%C A385998   k = 1: 2,
%C A385998   k = 2: 12,
%C A385998   k = 3: 240,
%C A385998   k = 4: 1260.
%H A385998 Felix Huber, <a href="/A385998/b385998.txt">Table of n, a(n) for n = 1..10000</a>
%e A385998 12 is divisible by 2 distinct primes (2, 3) and by 2 squares (1, 4).
%p A385998 c:=(n,d)->igcd(n,d)=d and igcd(n/d,d)=d:
%p A385998 b:=n->nops(select(k->c(n,k),[seq(1..n)])):
%p A385998 A385998:=proc(n)
%p A385998     option remember;
%p A385998     local k;
%p A385998     if n=1 then
%p A385998         2
%p A385998     else
%p A385998         for k from procname(n-1)+1 do
%p A385998             if b(k)=NumberTheory:-Omega(k,'distinct') then
%p A385998                 return k
%p A385998             fi
%p A385998         od
%p A385998     fi;
%p A385998 end proc;	
%p A385998 seq(A385998(n),n=1..63);
%t A385998 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 *)
%o A385998 (PARI) isok(m) = my(d=divisors(m)); #select(isprime, d) == #select(issquare, d); \\ _Michel Marcus_, Aug 05 2025
%Y A385998 Supersequence of A000040.
%Y A385998 Cf. A000290, A001221, A046951.
%K A385998 nonn
%O A385998 1,1
%A A385998 _Felix Huber_, Aug 05 2025