login
Exponent of least prime factor in prime factorization of n, a(1)=0.
155

%I #62 Sep 28 2023 08:18:06

%S 0,1,1,2,1,1,1,3,2,1,1,2,1,1,1,4,1,1,1,2,1,1,1,3,2,1,3,2,1,1,1,5,1,1,

%T 1,2,1,1,1,3,1,1,1,2,2,1,1,4,2,1,1,2,1,1,1,3,1,1,1,2,1,1,2,6,1,1,1,2,

%U 1,1,1,3,1,1,1,2,1,1,1,4,4,1,1,2,1,1,1,3,1,1

%N Exponent of least prime factor in prime factorization of n, a(1)=0.

%C Even bisection is A001511: a(2n) = A007814(n) + 1. - _Ralf Stephan_, Jan 31 2004

%C Number of occurrences of the smallest part in the partition with Heinz number n. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product_{j=1..r} (p_j-th prime) (concept used by _Alois P. Heinz_ in A215366 as an "encoding" of a partition). Example: a(24)=3 because the partition with Heinz number 24 = 3*2*2*2 is [2,1,1,1]. - _Emeric Deutsch_, Oct 02 2015

%C Together with A028234 is useful for defining sequences that are multiplicative with a(p^e) = f(e), as recurrences of the form: a(1) = 1 and for n > 1, a(n) = f(A067029(n)) * a(A028234(n)). - _Antti Karttunen_, May 29 2017

%H T. D. Noe, <a href="/A067029/b067029.txt">Table of n, a(n) for n = 1..10000</a>

%H Project Euler, <a href="https://projecteuler.net/problem=779">Problem 779: Prime factor and exponent</a>, (2022).

%F a(n) = A124010(n,1). - _Reinhard Zumkeller_, Aug 27 2011

%F A028233(n) = A020639(n)^a(n). - _Reinhard Zumkeller_, May 13 2006

%F a(A247180(n)) = 1. - _Reinhard Zumkeller_, Nov 23 2014

%F Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} (Product_{i=1..k-1} (1 - 1/prime(i)))/(prime(k)-1) = 1/(prime(1)-1) + (1-1/prime(1))*(1/(prime(2)-1) + (1-1/prime(2))*(1/(prime(3)-1) + (1-1/prime(3))*( ... ))) = 1.6125177915... - _Amiram Eldar_, Oct 26 2021

%e a(18) = a(2^1 * 3^2) = 1.

%p A067029 := proc(n)

%p local f,lp,a;

%p a := 0 ;

%p lp := n+1 ;

%p for f in ifactors(n)[2] do

%p p := op(1,f) ;

%p if p < lp then

%p a := op(2,f) ;

%p lp := p;

%p fi;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Jul 08 2015

%t Join[{0},Table[FactorInteger[n][[1,2]],{n,2,100}]] (* _Harvey P. Dale_, Oct 14 2011 *)

%o (Haskell)

%o a067029 = head . a124010_row

%o -- _Reinhard Zumkeller_, Jul 05 2013, Jun 04 2012

%o (Python)

%o from sympy import factorint

%o def a(n):

%o f=factorint(n)

%o return 0 if n==1 else f[min(f)] # _Indranil Ghosh_, May 15 2017

%o (PARI) a(n) = if (n==1, 0, factor(n)[1,2]); \\ _Michel Marcus_, May 15 2017

%o (Scheme)

%o ;; Naive implementation of A020639 is given under that entry. All of these functions could be also defined with definec to make them faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme

%o (define (A067029 n) (if (< n 2) 0 (let ((mp (A020639 n))) (let loop ((e 0) (n (/ n mp))) (cond ((integer? n) (loop (+ e 1) (/ n mp))) (else e)))))) ;; _Antti Karttunen_, May 29 2017

%Y Cf. A051903, A020639, A028233, A034684, A071178, first column of A124010, A247180.

%K nonn,nice

%O 1,4

%A _Reinhard Zumkeller_, Feb 17 2002