OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
6 is the largest squarefree less than the 4th prime, 7. So a(4) = 6.
MAPLE
with(numtheory): a:=proc(n) local p, B, j: p:=ithprime(n): B:={}: for j from 1 to p-1 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[nops(B)] end: seq(a(m), m=1..75); # Emeric Deutsch, Oct 14 2005
MATHEMATICA
With[{k = 120}, Table[SelectFirst[Range[Prime@ n - 1, Prime@ n - Min[Prime@ n - 1, k], -1], SquareFreeQ], {n, 60}]] (* Michael De Vlieger, Aug 16 2017 *)
PROG
(PARI) a(n, p=prime(n))=while(!issquarefree(p--), ); p \\ Charles R Greathouse IV, Aug 16 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 06 2005
EXTENSIONS
More terms from Emeric Deutsch, Oct 14 2005
STATUS
approved