OFFSET
1,3
COMMENTS
Records occur at the primes. - Robert G. Wilson v, Dec 30 2007
For n > 1: length of n-th row in A067255. - Reinhard Zumkeller, Jun 11 2013
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
LINKS
Álvar Ibeas, Table of n, a(n) for n = 1..100000 (first 1000 terms from Harry J. Smith)
FORMULA
EXAMPLE
a(20) = 3 since the largest prime factor of 20 is 5, which is the 3rd prime.
MAPLE
with(numtheory):
a:= n-> pi(max(1, factorset(n)[])):
seq(a(n), n=1..100); # Alois P. Heinz, Aug 03 2013
MATHEMATICA
Insert[Table[PrimePi[FactorInteger[n][[ -1]][[1]]], {n, 2, 120}], 0, 1] (* Stefan Steinerberger, Apr 11 2006 *)
f[n_] := PrimePi[ FactorInteger@n][[ -1, 1]]; Array[f, 94] (* Robert G. Wilson v, Dec 30 2007 *)
PROG
(PARI) a(n) = if (n==1, 0, primepi(vecmax(factor(n)[, 1]))); \\ Michel Marcus, Nov 14 2022
(Haskell)
a061395 = a049084 . a006530 -- Reinhard Zumkeller, Jun 11 2013
(Python)
from sympy import primepi, primefactors
def a(n): return 0 if n==1 else primepi(primefactors(n)[-1])
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 14 2017
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Henry Bottomley, Apr 30 2001
EXTENSIONS
Definition reworded by N. J. A. Sloane, Jul 01 2008
STATUS
approved