Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #6 May 10 2019 21:54:03
%S 2,1,3,2,1,1,1,1,4,2,1,1,1,1,2,1,3,1,1,5,1,1,1,2,1,1,1,1,1,1,1,1,2,2,
%T 1,1,3,1,1,1,1,1,1,1,6,1,1,1,1,1,2,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,
%U 1,1,1,2,1,2,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,2,1,1,1,3,1,7,1,1,1,1,1,1,1,1,1
%N The count of largest prime factors in n-th composite.
%F a(n) = A071178(A002808(n)). - _R. J. Mathar_, Oct 27 2009
%e a(1)=2 (4 = 2*2);
%e a(2)=1 (6 = 2*3);
%e a(3)=3 (8 = 2*2*2);
%e a(4)=2 (9 = 3*3);
%e a(5)=1 (10 = 2*5);
%e a(6)=1 (12 = 2*2*3).
%p A002808 := proc(n) local n ; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do ; end if; end proc; A071178 := proc(n) local p,e,ps,i ; p := -1 ; e := 0 ; ps := ifactors(n)[2] ; for i from 1 to nops(ps) do if op(1,op(i,ps)) > p then p := op(1,op(i,ps)) ; e := op(2,op(i,ps)) ; fi; od: return e ; end proc: A166949 := proc(n) A071178(A002808(n)) ; end proc : seq(A166949(n),n=1..100) ; # _R. J. Mathar_, Oct 27 2009
%Y Cf. A002808.
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Oct 25 2009