login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Largest squarefree integer < the n-th prime.
70

%I #19 Jan 13 2025 22:03:40

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

%F a(n) = prime(n) - A240473(n). - _Gus Wiseman_, Jan 10 2025

%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 For prime powers instead of squarefree numbers we have A065514, opposite A345531.

%Y Restriction of A070321 (differences A378085) to the primes; see A378619.

%Y The opposite is A112926, differences A378037.

%Y Subtracting each term from prime(n) gives A240473, opposite A240474.

%Y For nonsquarefree numbers we have A378033, differences A378036, see A378034, A378032.

%Y For perfect powers we have A378035.

%Y First differences are A378038.

%Y A000040 lists the primes, differences A001223, seconds A036263.

%Y A005117 lists the squarefree numbers, differences A076259.

%Y A013928 counts squarefree numbers up to n - 1.

%Y A013929 lists the nonsquarefree numbers, differences A078147.

%Y A061398 counts squarefree numbers between primes, zeros A068360.

%Y A061399 counts nonsquarefree numbers between primes, zeros A068361.

%Y A112929 counts squarefree numbers up to prime(n).

%Y Cf. A061400, A112928, A112930.

%Y Cf. A007674, A007947, A045882, A053797, A053806, A067535, A072284, A073247, A081217, A175216, A280892, A377783.

%K nonn,changed

%O 1,2

%A _Leroy Quet_, Oct 06 2005

%E More terms from _Emeric Deutsch_, Oct 14 2005