login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028233 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = p_1^e_1, with a(1) = 1. 24

%I

%S 1,2,3,4,5,2,7,8,9,2,11,4,13,2,3,16,17,2,19,4,3,2,23,8,25,2,27,4,29,2,

%T 31,32,3,2,5,4,37,2,3,8,41,2,43,4,9,2,47,16,49,2,3,4,53,2,5,8,3,2,59,

%U 4,61,2,9,64,5,2,67,4,3,2,71,8,73,2,3,4,7,2,79,16,81,2,83,4,5,2

%N If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = p_1^e_1, with a(1) = 1.

%C Highest power of smallest prime dividing n. - _Reinhard Zumkeller_, Apr 09 2015

%H T. D. Noe and Reinhard Zumkeller, <a href="/A028233/b028233.txt">Table of n, a(n) for n = 1..10000</a>, first 1000 terms from T. D. Noe

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

%F a(n) = A141809(n,1). - _Reinhard Zumkeller_, Jun 04 2012

%F a(n) = n / A028234(n). - _Antti Karttunen_, May 29 2017

%e From _Muniru A Asiru_, Jan 27 2018: (Start)

%e If n=10, then a(10) = 2 since 10 = 2^1*5^1.

%e If n=16, then a(16) = 16 since 16 = 2^4.

%e If n=29, then a(29) = 29 since 29 = 29^1.

%e (End)

%p A028233 := proc(n)

%p local spf,pf;

%p if n = 1 then

%p return 1 ;

%p end if;

%p spf := A020639(n) ;

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

%p if pf[1] = spf then

%p return pf[1]^pf[2] ;

%p end if;

%p end do:

%p end proc: # _R. J. Mathar_, Jul 09 2016

%p # second Maple program:

%p a:= n-> `if`(n=1, 1, (i->i[1]^i[2])(sort(ifactors(n)[2])[1])):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jan 29 2018

%t a[n_] := Power @@ First[ FactorInteger[n]]; Table[a[n], {n, 1, 86}] (* _Jean-Fran├žois Alcover_, Dec 01 2011 *)

%o (Haskell)

%o a028233 = head . a141809_row

%o -- _Reinhard Zumkeller_, Jun 04 2012, Aug 17 2011

%o (PARI) a(n)=if(n>1,n=factor(n);n[1,1]^n[1,2],1) \\ _Charles R Greathouse IV_, Apr 26 2012

%o (Python)

%o from sympy import factorint

%o def a(n):

%o f = factorint(n)

%o return 1 if n==1 else min(f)**f[min(f)] # _Indranil Ghosh_, May 12 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 (A028233 n) (if (< n 2) n (let ((lpf (A020639 n))) (let loop ((m lpf) (n (/ n lpf))) (cond ((not (zero? (modulo n lpf))) m) (else (loop (* m lpf) (/ n lpf)))))))) ;; _Antti Karttunen_, May 29 2017

%o (GAP) List(List(List(List([1..10^3], Factors), Collected), i -> i[1]), j -> j[1]^j[2]); # _Muniru A Asiru_, Jan 27 2018

%Y Cf. A020639, A006530, A034684, A034699, A053585.

%Y See also A028234.

%Y Cf. A008475.

%Y Cf. A141809.

%K nonn,nice,easy

%O 1,2

%A _Marc LeBrun_

%E Edited name to include a(1) = 1 by _Franklin T. Adams-Watters_, Jan 27 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 20:51 EDT 2018. Contains 316428 sequences. (Running on oeis4.)