cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A112925 Largest squarefree integer < the n-th prime.

Original entry on oeis.org

1, 2, 3, 6, 10, 11, 15, 17, 22, 26, 30, 35, 39, 42, 46, 51, 58, 59, 66, 70, 71, 78, 82, 87, 95, 97, 102, 106, 107, 111, 123, 130, 134, 138, 146, 149, 155, 161, 166, 170, 178, 179, 190, 191, 195, 197, 210, 222, 226, 227, 231, 238, 239, 249, 255, 262, 267, 269, 274, 278
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Examples

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

Crossrefs

For prime powers instead of squarefree numbers we have A065514, opposite A345531.
Restriction of A070321 (differences A378085) to the primes; see A378619.
The opposite is A112926, differences A378037.
Subtracting each term from prime(n) gives A240473, opposite A240474.
For nonsquarefree numbers we have A378033, differences A378036, see A378034, A378032.
For perfect powers we have A378035.
First differences are A378038.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013928 counts squarefree numbers up to n - 1.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A112929 counts squarefree numbers up to prime(n).

Programs

  • 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 *)
  • PARI
    a(n,p=prime(n))=while(!issquarefree(p--),); p \\ Charles R Greathouse IV, Aug 16 2017

Formula

a(n) = prime(n) - A240473(n). - Gus Wiseman, Jan 10 2025

Extensions

More terms from Emeric Deutsch, Oct 14 2005