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.

A067695 Smallest prime factor with minimum exponent in canonical prime factorization of n, a(1)=1.

This page as a plain text file.
%I A067695 #20 Sep 09 2024 02:40:49
%S A067695 1,2,3,2,5,2,7,2,3,2,11,3,13,2,3,2,17,2,19,5,3,2,23,3,5,2,3,7,29,2,31,
%T A067695 2,3,2,5,2,37,2,3,5,41,2,43,11,5,2,47,3,7,2,3,13,53,2,5,7,3,2,59,3,61,
%U A067695 2,7,2,5,2,67,17,3,2,71,3,73,2,3,19,7,2,79,5
%N A067695 Smallest prime factor with minimum exponent in canonical prime factorization of n, a(1)=1.
%H A067695 Alois P. Heinz, <a href="/A067695/b067695.txt">Table of n, a(n) for n = 1..20000</a>
%e A067695 a(12) = a(2^2 * 3^1) = 3, but A020639(12) = 2;
%e A067695 a(36) = a(2^2 * 3^2) = 2 = A020639(36).
%p A067695 a:= n-> `if`(n=1, 1, (l-> (m-> min(map(i-> i[1], select(y->
%p A067695       y[2]=m, l))))(min(map(x-> x[2], l))))(ifactors(n)[2])):
%p A067695 seq(a(n), n=1..80);  # _Alois P. Heinz_, Jan 25 2023
%t A067695 a[n_] := Module[{f = FactorInteger[n], p, e}, Min[Select[f, Last[#] == Min[f[[;;, 2]]] &][[;;, 1]]]]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Sep 08 2024 *)
%o A067695 (Python)
%o A067695 from sympy import factorint
%o A067695 def A067695(n):
%o A067695     if n == 1: return 1
%o A067695     f, g = map(tuple,zip(*sorted(factorint(n).items())))
%o A067695     return f[g.index(min(g))] # _Chai Wah Wu_, Feb 07 2023
%o A067695 (PARI) a(n) = if (n==1, 1, my(f=factor(n), i=vecmin(f[,2])); f[vecmin(select(x->(x==i), f[,2], 1)), 1]); \\ _Michel Marcus_, Jul 17 2023
%Y A067695 Cf. A020639, A034684, A028233, A051904, A067029.
%K A067695 nonn
%O A067695 1,2
%A A067695 _Reinhard Zumkeller_, Feb 23 2002