|
|
A055396
|
|
Smallest prime dividing n is a(n)-th prime (a(1)=0).
|
|
261
|
|
|
0, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 6, 1, 2, 1, 7, 1, 8, 1, 2, 1, 9, 1, 3, 1, 2, 1, 10, 1, 11, 1, 2, 1, 3, 1, 12, 1, 2, 1, 13, 1, 14, 1, 2, 1, 15, 1, 4, 1, 2, 1, 16, 1, 3, 1, 2, 1, 17, 1, 18, 1, 2, 1, 3, 1, 19, 1, 2, 1, 20, 1, 21, 1, 2, 1, 4, 1, 22, 1, 2, 1, 23, 1, 3, 1, 2, 1, 24, 1, 4, 1, 2, 1, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Grundy numbers of the game in which you decrease n by a number prime to n, and the game ends when 1 is reached. - Eric M. Schmidt, Jul 21 2013
a(n) = the smallest 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(21) = 2; indeed, the partition having Heinz number 21 = 3*7 is [2,4]. - Emeric Deutsch, Jun 04 2015
a(n) is the number of numbers whose largest proper divisor is n, i.e., for n>1, number of occurrences of n in A032742. - Stanislav Sykora, Nov 04 2016
|
|
REFERENCES
|
John H. Conway, On Numbers and Games, 2nd Edition, p. 129.
|
|
LINKS
|
Wikipedia, Nimber (explains the term Grundy number).
|
|
FORMULA
|
(End)
(End)
|
|
EXAMPLE
|
a(15) = 2 because 15=3*5, 3<5 and 3 is the 2nd prime.
|
|
MAPLE
|
with(numtheory):
a:= n-> `if`(n=1, 0, pi(min(factorset(n)[]))):
|
|
MATHEMATICA
|
a[1] = 0; a[n_] := PrimePi[ FactorInteger[n][[1, 1]] ]; Table[a[n], {n, 1, 96}](* Jean-François Alcover, Jun 11 2012 *)
|
|
PROG
|
(Haskell)
(Python)
from sympy import primepi, isprime, primefactors
def a049084(n): return primepi(n)*(1*isprime(n))
def a(n): return 0 if n==1 else a049084(min(primefactors(n))) # Indranil Ghosh, May 05 2017
|
|
CROSSREFS
|
Cf. A004280, A020639, A032742, A038179, A049084, A055399, A061395, A215366, A243055, A257993, A276086.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|