OFFSET
1,1
FORMULA
EXAMPLE
a(1)=2 (4 = 2*2);
a(2)=1 (6 = 2*3);
a(3)=3 (8 = 2*2*2);
a(4)=2 (9 = 3*3);
a(5)=1 (10 = 2*5);
a(6)=1 (12 = 2*2*3).
MAPLE
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Oct 25 2009
STATUS
approved