login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112925 Largest squarefree integer < the n-th prime. 7

%I #14 Sep 03 2017 03:27:49

%S 1,2,3,6,10,11,15,17,22,26,30,35,39,42,46,51,58,59,66,70,71,78,82,87,

%T 95,97,102,106,107,111,123,130,134,138,146,149,155,161,166,170,178,

%U 179,190,191,195,197,210,222,226,227,231,238,239,249,255,262,267,269,274,278

%N Largest squarefree integer < the n-th prime.

%H Michael De Vlieger, <a href="/A112925/b112925.txt">Table of n, a(n) for n = 1..10000</a>

%e 6 is the largest squarefree less than the 4th prime, 7. So a(4) = 6.

%p 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

%t 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 *)

%o (PARI) a(n,p=prime(n))=while(!issquarefree(p--),); p \\ _Charles R Greathouse IV_, Aug 16 2017

%Y Cf. A061400, A112926, A112928, A112929, A112930.

%K nonn

%O 1,2

%A _Leroy Quet_, Oct 06 2005

%E More terms from _Emeric Deutsch_, Oct 14 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 06:57 EDT 2024. Contains 371265 sequences. (Running on oeis4.)