login
Number of times the greatest prime factor of n is the greatest prime factor for numbers <=n; a(1)=1.
16

%I #12 Jun 09 2018 04:20:58

%S 1,1,1,2,1,2,1,3,3,2,1,4,1,2,3,4,1,5,1,4,3,2,1,6,5,2,7,4,1,6,1,5,3,2,

%T 5,8,1,2,3,7,1,6,1,4,8,2,1,9,7,9,3,4,1,10,5,8,3,2,1,10,1,2,9,6,5,6,1,

%U 4,3,10,1,11,1,2,11,4,7,6,1,12,12,2,1,11,5,2,3,8,1,13,7,4,3,2,5,13,1,12,9

%N Number of times the greatest prime factor of n is the greatest prime factor for numbers <=n; a(1)=1.

%C For n>1: a(n)=1 iff n is prime;

%C a(n) = n/p for n<=p*(p+1) and p = greatest prime factor of n.

%H Alois P. Heinz, <a href="/A078899/b078899.txt">Table of n, a(n) for n = 1..20000</a>

%F Ordinal transform of A006530 (Gpf). - _Franklin T. Adams-Watters_, Aug 28 2006

%p p:= proc() 0 end:

%p a:= proc(n) option remember; local t;

%p t:= max(numtheory[factorset](n)[]);

%p p(t):= p(t)+1

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Oct 09 2015

%t p[_] = 0; a[1] = 1;

%t a[n_] := a[n] = Module[{t}, t = FactorInteger[n][[-1, 1]]; p[t] = p[t]+1];

%t Array[a, 100] (* _Jean-François Alcover_, Jun 09 2018, after _Alois P. Heinz_ *)

%Y Cf. A006530, A078898, A078897.

%K nonn,look

%O 1,4

%A _Reinhard Zumkeller_, Dec 12 2002