This site is supported by donations to The OEIS Foundation.

 Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS". Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A061395 Let p be the largest prime factor of n; if p is the k-th prime then set a(n) = k; a(1) = 0 by convention. 84

%I

%S 0,1,2,1,3,2,4,1,2,3,5,2,6,4,3,1,7,2,8,3,4,5,9,2,3,6,2,4,10,3,11,1,5,

%T 7,4,2,12,8,6,3,13,4,14,5,3,9,15,2,4,3,7,6,16,2,5,4,8,10,17,3,18,11,4,

%U 1,6,5,19,7,9,4,20,2,21,12,3,8,5,6,22,3,2,13,23,4,7,14,10,5,24,3,6,9,11,15

%N Let p be the largest prime factor of n; if p is the k-th prime then set a(n) = k; a(1) = 0 by convention.

%C Records occur at the primes. - _Robert G. Wilson v_, Dec 30 2007.

%C For n > 1: length of n-th row in A067255. - _Reinhard Zumkeller_, Jun 11 2013

%C a(n) = the largest part of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(20) = 3; indeed, the partition having Heinz number 20 = 2*2*5 is [1,1,3]. - _Emeric Deutsch_, Jun 04 2015

%H Álvar Ibeas, <a href="/A061395/b061395.txt">Table of n, a(n) for n = 1..100000</a> (first 1000 terms by Harry J. Smith)

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F A000040(a(n)) = A006530(n); a(n) = A049084(A006530(n)). - _Reinhard Zumkeller_, May 22 2003

%F A243055(n) = a(n) - A055396(n). - _Antti Karttunen_, Mar 07 2017

%e a(20) = 3 since the largest prime factor of 20 is 5, which is the 3rd prime.

%p with(numtheory):

%p a:= n-> `if`(n=1, 0, pi(max(factorset(n)[]))):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 03 2013

%t Insert[Table[PrimePi[FactorInteger[n][[ -1]][[1]]], {n, 2, 120}], 0, 1] (* _Stefan Steinerberger_, Apr 11 2006 *)

%t f[n_] := PrimePi[ FactorInteger@n][[ -1, 1]]; Array[f, 94] (* _Robert G. Wilson v_, Dec 30 2007 *)

%o (PARI) { for (n=1, 1000, if (n==1, a=0, f=factor(n)~; p=f[1, length(f)]; a=primepi(p)); write("b061395.txt", n, " ", a) ) } \\ _Harry J. Smith_, Jul 22 2009

%o a061395 = a049084 . a006530 -- _Reinhard Zumkeller_, Jun 11 2013

%o (Python)

%o from sympy import primepi, primefactors

%o def a(n): return 0 if n==1 else primepi(primefactors(n)[-1])

%o print [a(n) for n in xrange(1, 101)] # _Indranil Ghosh_, May 14 2017

%Y Cf. A006530, A055396, A061394, A133674, A243055.

%K easy,nice,nonn

%O 1,3

%A _Henry Bottomley_, Apr 30 2001

%E Definition reworded by _N. J. A. Sloane_, Jul 01 2008

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.

Last modified December 16 07:41 EST 2017. Contains 296076 sequences.