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.

Showing 1-5 of 5 results.

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

A112926 Smallest squarefree integer > the n-th prime.

Original entry on oeis.org

3, 5, 6, 10, 13, 14, 19, 21, 26, 30, 33, 38, 42, 46, 51, 55, 61, 62, 69, 73, 74, 82, 85, 91, 101, 102, 105, 109, 110, 114, 129, 133, 138, 141, 151, 154, 158, 165, 170, 174, 181, 182, 193, 194, 199, 201, 213, 226, 229, 230, 235, 241, 246, 253, 258, 265, 271, 273
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Examples

			10 is the smallest squarefree number greater than the 4th prime, 7. So a(4) = 10.
From _Gus Wiseman_, Dec 07 2024: (Start)
The first number line below shows the squarefree numbers. The second shows the primes:
--1--2--3-----5--6--7-------10-11----13-14-15----17----19----21-22-23-------26--
=====2==3=====5=====7==========11====13==========17====19==========23===========
(End)
		

Crossrefs

Restriction of A067535, differences A378087.
The unrestricted opposite is A070321, differences A378085.
The opposite is A112925, differences A378038.
Subtracting prime(n) from each term gives A240474, opposite A240473.
For nonsquarefree we have A377783, restriction of A120327.
The nonsquarefree differences are A377784, restriction of A378039.
First differences are A378037.
For perfect power we have A378249, A378617, A378250, A378251.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from p+1 to p+20 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[1] end: seq(a(m),m=1..75); # Emeric Deutsch, Oct 10 2005
  • Mathematica
    Do[k = Prime[n] + 1; While[ !SquareFreeQ[k], k++ ]; Print[k], {n, 1, 100}] (* Ryan Propper, Oct 10 2005 *)
    With[{k = 120}, Table[SelectFirst[Range[Prime@ n + 1, Prime@ n + k], SquareFreeQ], {n, 58}]] (* 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) + A240474(n). - Gus Wiseman, Dec 07 2024

Extensions

More terms from Ryan Propper and Emeric Deutsch, Oct 10 2005

A112929 Number of squarefree integers less than the n-th prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 12, 15, 17, 19, 23, 26, 28, 30, 32, 36, 37, 41, 44, 45, 49, 51, 55, 60, 61, 63, 66, 67, 70, 77, 80, 83, 85, 91, 92, 95, 99, 102, 104, 108, 109, 116, 117, 120, 121, 129, 138, 140, 141, 144, 148, 149, 153, 157, 161, 165, 166, 169, 171, 173, 179, 187
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005 and Emeric Deutsch, Oct 14 2005

Keywords

Comments

a(n) = order of n-th term of A112925 among squarefree integers.

Examples

			a(5)=7 because the 5th prime is 11 and the squarefree numbers not exceeding 11 are: 2,3,5,6,7,10,11.
The 5th term of A112925 is 10 and 10 is the 7th squarefree integer (with 1 counted as the first squarefree integer). So a(5) = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from 2 to p do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: nops(B) end: seq(a(m),m=1..75);
    # Or:
    a := n -> nops(select(NumberTheory:-IsSquareFree, [seq(1..ithprime(n)-1)])):
    seq(a(n), n=1..63);  # Peter Luschny, Dec 12 2024
  • Mathematica
    f[n_] := Prime[n] - Sum[ If[ MoebiusMu[k]==0, 1, 0], {k, Prime[n]}] - 1; Table[ f[n], {n, 63}] (* Robert G. Wilson v, Oct 15 2005; syntax corrected by Frank M Jackson, Dec 28 2018 *)
  • PARI
    a(n)={
    my(lim=prime(n)-1,b=sqrtint(lim\2));
    sum(k=1,b,moebius(k)*(lim\k^2))+
    sum(k=b+1,sqrt(lim),moebius(k))
    }; \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    a(n,p=prime(n))=p--; my(s,b=sqrtint(p\2)); forsquarefree(k=1, b, s += p\k[1]^2*moebius(k)); forsquarefree(k=b+1, sqrtint(p), s += moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from math import isqrt
    from sympy import prime, mobius
    def A112929(n): return (p:=prime(n))-1+sum(mobius(k)*(p//k**2) for k in range(2,isqrt(p)+1)) # Chai Wah Wu, Dec 12 2024

Formula

A005117(a(n)) = A112925(n). - R. J. Mathar, Apr 19 2008
a(n) = A013928(A000040(n)). - Reinhard Zumkeller, Apr 05 2010
a(n) ~ 6/Pi^2 * n log n. - Charles R Greathouse IV, Apr 26 2012

Extensions

More terms from Diana L. Mecum, May 29 2007
Edited by N. J. A. Sloane, Apr 26 2008 at the suggestion of R. J. Mathar

A061400 Primes p such that there is no squarefree number between p and the next prime.

Original entry on oeis.org

2, 3, 11, 17, 59, 71, 97, 107, 149, 179, 191, 197, 227, 239, 269, 311, 347, 349, 419, 431, 521, 599, 659, 809, 827, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1277, 1319, 1427, 1447, 1451, 1487, 1607, 1619, 1663, 1667, 1787, 1871, 1931, 1949, 1997, 2027, 2087
Offset: 1

Views

Author

Labos Elemer, Jun 07 2001

Keywords

Comments

Primes in sequence A112925. - Leroy Quet, Oct 06 2005

Examples

			Between 71 and 73, the only composite is 72 = 2*2*2*3*3, not squarefree. Each of the integers between 97 and 101 has at least one squared divisor.
		

Crossrefs

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: A:=[seq(a(m),m=1..400)]: b:=proc(k) if isprime(A[k])=true then A[k] else fi end: seq(b(i),i=1..400); # Emeric Deutsch, Oct 14 2005
  • Mathematica
    Select[Prime@ Range@ 310, Count[Range[# + 1, NextPrime@ # - 1], k_ /; SquareFreeQ@ k] == 0 &] (* Michael De Vlieger, Feb 19 2017 *)
  • PARI
    { n=0; p=2; forprime (q=3, 109621, c=0; for (i=p+1, q-1, c+=issquarefree(i); if (c, break)); if (c==0, write("b061400.txt", n++, " ", p)); p=q ) } \\ Harry J. Smith, Jul 22 2009

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A112928 Primes in sequence A112926.

Original entry on oeis.org

3, 5, 13, 19, 61, 73, 101, 109, 151, 181, 193, 199, 229, 241, 271, 313, 349, 353, 421, 433, 523, 601, 661, 811, 829, 883, 1021, 1033, 1051, 1063, 1093, 1153, 1279, 1321, 1429, 1451, 1453, 1489, 1609, 1621, 1667, 1669, 1789, 1873, 1933, 1951, 1999, 2029
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from p+1 to p+20 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[1] end: A:=[seq(a(m),m=1..400)]: b:=proc(k) if isprime(A[k])=true then A[k] else fi end: seq(b(i),i=1..400); # Emeric Deutsch, Oct 14 2005
  • Mathematica
    With[{k = 120}, Select[Table[SelectFirst[Range[Prime@ n + 1, Prime@ n + k], SquareFreeQ], {n, 300}], PrimeQ]] (* Michael De Vlieger, Sep 11 2017 *)

Extensions

More terms from Emeric Deutsch, Oct 14 2005
Showing 1-5 of 5 results.