A005117 Squarefree numbers: numbers that are not divisible by a square greater than 1.
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113
Offset: 1
References
- Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 165, p. 53, Ellipses, Paris, 2008.
- David S. Dummit and Richard M. Foote, Abstract algebra. Vol. 1999. Englewood Cliffs, NJ: David S.Prentice Hall, 1991.
- Ivan M. Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 251.
- Michael Pohst and Hans J. Zassenhaus, Algorithmic Algebraic Number Theory, Cambridge Univ. Press, page 432.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Daniel Forgues, Table of n, a(n) for n = 1..60794 (first 10000 terms from T. D. Noe)
- Zenon B. Batang, Squarefree integers and the abc conjecture, arXiv:2109.10226 [math.GM], 2021.
- Andrew R. Booker, Ghaith A. Hiary and Jon P. Keating, Detecting squarefree numbers, Duke Mathematical Journal, Vol. 164, No. 2 (2015), pp. 235-275; arXiv preprint, arXiv:1304.6937 [math.NT], 2013-2015.
- Iurie Boreico, Linear independence of radicals, The Harvard College Mathematics Review 2(1), 87-92, Spring 2008.
- Ernesto Cesàro, La serie di Lambert in aritmetica assintotica, Rendiconto della Reale Accademia delle Scienze di Napoli, Serie 2, Vol. 7 (1893), pp. 197-204.
- Henri Cohen, Francois Dress, and Mohamed El Marraki, Explicit estimates for summatory functions linked to the Möbius μ-function, Functiones et Approximatio Commentarii Mathematici 37 (2007), part 1, pp. 51-63.
- H. Gent, Letter to N. J. A. Sloane, Nov 27 1975.
- Andrew Granville, ABC means we can count squarefrees, International Mathematical Research Notices 19 (1998), 991-1009.
- Pentti Haukkanen, Mika Mattila, Jorma K. Merikoski and Timo Tossavainen, Can the Arithmetic Derivative be Defined on a Non-Unique Factorization Domain?, Journal of Integer Sequences, Vol. 16 (2013), Article 13.1.2.
- Aaron Krowne, squarefree number, PlanetMath.org.
- Louis Marmet, First occurrences of squarefree gaps and an algorithm for their computation.
- Louis Marmet, First occurrences of square-free gaps and an algorithm for their computation, arXiv preprint arXiv:1210.3829 [math.NT], 2012.
- Srinivasa Ramanujan, Irregular numbers, J. Indian Math. Soc., Vol. 5 (1913), pp. 105-106.
- Kenneth Rogers, The Schnirelmann density of the squarefree integers, Proceedings of the American Mathematical Society, Vol. 15, No. 4 (1964), pp. 515-516.
- J. A. Scott, Square-freedom revisited, The Mathematical Gazette, Vol. 90, No. 517 (2006), pp. 112-113.
- Vladimir Shevelev, Set of all densities of exponentially S-numbers, arXiv preprint arXiv:1511.03860 [math.NT], 2015.
- O. Trifonov, On the Squarefree Problem II, Math. Balkanica, Vol. 3 (1989), Fasc. 3-4.
- Eric Weisstein's World of Mathematics, Squarefree.
- Eric Weisstein's World of Mathematics, Prime Zeta Function.
- Wikipedia, Squarefree integer.
- Index entries for "core" sequences.
Crossrefs
Cf. A001414, A008472, A076259 (first differences), A173143 (partial sums), A000688, A003277, A013928, A020753, A020754, A020755, A030059, A030229, A033197, A034444, A039956, A048672, A053797, A057918, A059956, A071403, A072284, A120992, A133466, A136742, A136743, A160764, A243289, A243347, A243348, A243351, A215366, A046660, A265668, A265675.
Programs
-
Haskell
a005117 n = a005117_list !! (n-1) a005117_list = filter ((== 1) . a008966) [1..] -- Reinhard Zumkeller, Aug 15 2011, May 10 2011
-
Magma
[ n : n in [1..1000] | IsSquarefree(n) ];
-
Maple
with(numtheory); a := [ ]; for n from 1 to 200 do if issqrfree(n) then a := [ op(a), n ]; fi; od: t:= n-> product(ithprime(k),k=1..n): for n from 1 to 113 do if(t(n) mod n = 0) then print(n) fi od; # Gary Detlefs, Dec 07 2011 A005117 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if numtheory[issqrfree](a) then return a; end if; end do: end if; end proc: # R. J. Mathar, Jan 09 2013
-
Mathematica
Select[ Range[ 113], SquareFreeQ] (* Robert G. Wilson v, Jan 31 2005 *) Select[Range[150], Max[Last /@ FactorInteger[ # ]] < 2 &] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *) NextSquareFree[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sf = n + sgn; While[c < Abs[k], While[ ! SquareFreeQ@ sf, If[sgn < 0, sf--, sf++]]; If[ sgn < 0, sf--, sf++]; c++]; sf + If[ sgn < 0, 1, -1]]; NestList[ NextSquareFree, 1, 70] (* Robert G. Wilson v, Apr 18 2014 *) Select[Range[250], MoebiusMu[#] != 0 &] (* Robert D. Rosales, May 20 2024 *)
-
PARI
bnd = 1000; L = vector(bnd); j = 1; for (i=1,bnd, if(issquarefree(i),L[j]=i; j=j+1)); L
-
PARI
{a(n)= local(m,c); if(n<=1,n==1, c=1; m=1; while( c
Michael Somos, Apr 29 2005 */ -
PARI
list(n)=my(v=vectorsmall(n,i,1),u,j); forprime(p=2,sqrtint(n), forstep(i=p^2, n, p^2, v[i]=0)); u=vector(sum(i=1,n,v[i])); for(i=1,n,if(v[i],u[j++]=i)); u \\ Charles R Greathouse IV, Jun 08 2012
-
PARI
for(n=1, 113, if(core(n)==n, print1(n, ", "))); \\ Arkadiusz Wesolowski, Aug 02 2016
-
PARI
S(n) = my(s); forsquarefree(k=1,sqrtint(n),s+=n\k[1]^2*moebius(k)); s; a(n) = my(min=1, max=231, k=0, sc=0); if(n >= 144, min=floor(zeta(2)*n - 5*sqrt(n)); max=ceil(zeta(2)*n + 5*sqrt(n))); while(min <= max, k=(min+max)\2; sc=S(k); if(abs(sc-n) <= sqrtint(n), break); if(sc > n, max=k-1, if(sc < n, min=k+1, break))); while(!issquarefree(k), k-=1); while(sc != n, my(j=1); if(sc > n, j = -1); k += j; sc += j; while(!issquarefree(k), k += j)); k; \\ Daniel Suteu, Jul 07 2022
-
PARI
first(n)=my(v=vector(n),i); forsquarefree(k=1,if(n<268293,(33*n+30)\20,(n*Pi^2/6+0.058377*sqrt(n))\1), if(i++>n, return(v)); v[i]=k[1]); v \\ Charles R Greathouse IV, Jan 10 2023
-
PARI
A5117=[1..3]; A005117(n)={if(n>#A5117, my(N=#A5117); A5117=Vec(A5117, max(n+999, N*5\4)); iferr(forsquarefree(k=A5117[N]+1, #A5117*Pi^2\6+sqrtint(#A5117)\17+11, A5117[N++]=k[1]),E,)); A5117[n]} \\ M. F. Hasler, Aug 08 2025
-
Python
from sympy.ntheory.factor_ import core def ok(n): return core(n, 2) == n print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, Jul 31 2021
-
Python
from itertools import count, islice from sympy import factorint def A005117_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda n:all(x == 1 for x in factorint(n).values()),count(max(startvalue,1))) A005117_list = list(islice(A005117_gen(),20)) # Chai Wah Wu, May 09 2022
-
Python
from math import isqrt from sympy import mobius def A005117(n): def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Jul 22 2024
Formula
Limit_{n->oo} a(n)/n = Pi^2/6 (see A013661). - Benoit Cloitre, May 23 2002
a(n) = A055229(A062838(n)) and a(n) > A055229(m) for m < A062838(n). - Reinhard Zumkeller, Apr 09 2010
A008477(a(n)) = 1. - Reinhard Zumkeller, Feb 17 2012
A008966(a(n)) = 1. - Reinhard Zumkeller, May 26 2012
Sum_{n>=1} 1/a(n)^s = zeta(s)/zeta(2*s). - Enrique Pérez Herrero, Jul 07 2012
A056170(a(n)) = 0. - Reinhard Zumkeller, Dec 29 2012
A013928(a(n)+1) = n. - Antti Karttunen, Jun 03 2014
A046660(a(n)) = 0. - Reinhard Zumkeller, Nov 29 2015
Equals {1} UNION A000040 UNION A006881 UNION A007304 UNION A046386 UNION A046387 UNION A067885 UNION A123321 UNION A123322 UNION A115343 ... - R. J. Mathar, Nov 05 2016
|a(n) - n*Pi^2/6| < 0.058377*sqrt(n) for n >= 268293; this result can be derived from Cohen, Dress, & El Marraki, see links. - Charles R Greathouse IV, Jan 18 2018
From Amiram Eldar, Jul 07 2021: (Start)
Sum_{n>=1} (-1)^(a(n)+1)/a(n)^2 = 9/Pi^2.
Sum_{k=1..n} 1/a(k) ~ (6/Pi^2) * log(n).
Sum_{k=1..n} (-1)^(a(k)+1)/a(k) ~ (2/Pi^2) * log(n).
(all from Scott, 2006) (End)
Comments