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-10 of 27 results. Next

A005117 Squarefree numbers: numbers that are not divisible by a square greater than 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

1 together with the numbers that are products of distinct primes.
Also smallest sequence with the property that a(m)*a(k) is never a square for k != m. - Ulrich Schimke (ulrschimke(AT)aol.com), Dec 12 2001
Numbers k such that there is only one Abelian group with k elements, the cyclic group of order k (the numbers such that A000688(k) = 1). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 25 2001
Numbers k such that A007913(k) > phi(k). - Benoit Cloitre, Apr 10 2002
a(n) is the smallest m with exactly n squarefree numbers <= m. - Amarnath Murthy, May 21 2002
k is squarefree <=> k divides prime(k)# where prime(k)# = product of first k prime numbers. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 30 2004
Numbers k such that omega(k) = Omega(k) = A072047(k). - Lekraj Beedassy, Jul 11 2006
The LCM of any finite subset is in this sequence. - Lekraj Beedassy, Jul 11 2006
This sequence and the Beatty Pi^2/6 sequence (A059535) are "incestuous": the first 20000 terms are bounded within (-9, 14). - Ed Pegg Jr, Jul 22 2008
Let us introduce a function D(n) = sigma_0(n)/2^(alpha(1) + ... + alpha(r)), sigma_0(n) number of divisors of n (A000005), prime factorization of n = p(1)^alpha(1) * ... * p(r)^alpha(r), alpha(1) + ... + alpha(r) is sequence (A001222). Function D(n) splits the set of positive integers into subsets, according to the value of D(n). Squarefree numbers (A005117) has D(n)=1, other numbers are "deviated" from the squarefree ideal and have 0 < D(n) < 1. For D(n)=1/2 we have A048109, for D(n)=3/4 we have A060687. - Ctibor O. Zizka, Sep 21 2008
Numbers k such that gcd(k,k')=1 where k' is the arithmetic derivative (A003415) of k. - Giorgio Balzarotti, Apr 23 2011
Numbers k such that A007913(k) = core(k) = k. - Franz Vrabec, Aug 27 2011
Numbers k such that sqrt(k) cannot be simplified. - Sean Loughran, Sep 04 2011
Indices m where A057918(m)=0, i.e., positive integers m for which there are no integers k in {1,2,...,m-1} such that k*m is a square. - John W. Layman, Sep 08 2011
It appears that these are numbers j such that Product_{k=1..j} (prime(k) mod j) = 0 (see Maple code). - Gary Detlefs, Dec 07 2011. - This is the same claim as Mohammed Bouayoun's Mar 30 2004 comment above. To see why it holds: Primorial numbers, A002110, a subsequence of this sequence, are never divisible by any nonsquarefree number, A013929, and on the other hand, the index of the greatest prime dividing any n is less than n. Cf. A243291. - Antti Karttunen, Jun 03 2014
Conjecture: For each n=2,3,... there are infinitely many integers b > a(n) such that Sum_{k=1..n} a(k)*b^(k-1) is prime, and the smallest such an integer b does not exceed (n+3)*(n+4). - Zhi-Wei Sun, Mar 26 2013
The probability that a random natural number belongs to the sequence is 6/Pi^2, A059956 (see Cesàro reference). - Giorgio Balzarotti, Nov 21 2013
Booker, Hiary, & Keating give a subexponential algorithm for testing membership in this sequence without factoring. - Charles R Greathouse IV, Jan 29 2014
Because in the factorizations into prime numbers these a(n) (n >= 2) have exponents which are either 0 or 1 one could call the a(n) 'numbers with a fermionic prime number decomposition'. The levels are the prime numbers prime(j), j >= 1, and the occupation numbers (exponents) e(j) are 0 or 1 (like in Pauli's exclusion principle). A 'fermionic state' is then denoted by a sequence with entries 0 or 1, where, except for the zero sequence, trailing zeros are omitted. The zero sequence stands for a(1) = 1. For example a(5) = 6 = 2^1*3^1 is denoted by the 'fermionic state' [1, 1], a(7) = 10 by [1, 0, 1]. Compare with 'fermionic partitions' counted in A000009. - Wolfdieter Lang, May 14 2014
From Vladimir Shevelev, Nov 20 2014: (Start)
The following is an Eratosthenes-type sieve for squarefree numbers. For integers > 1:
1) Remove even numbers, except for 2; the minimal non-removed number is 3.
2) Replace multiples of 3 removed in step 1, and remove multiples of 3 except for 3 itself; the minimal non-removed number is 5.
3) Replace multiples of 5 removed as a result of steps 1 and 2, and remove multiples of 5 except for 5 itself; the minimal non-removed number is 6.
4) Replace multiples of 6 removed as a result of steps 1, 2 and 3 and remove multiples of 6 except for 6 itself; the minimal non-removed number is 7.
5) Repeat using the last minimal non-removed number to sieve from the recovered multiples of previous steps.
Proof. We use induction. Suppose that as a result of the algorithm, we have found all squarefree numbers less than n and no other numbers. If n is squarefree, then the number of its proper divisors d > 1 is even (it is 2^k - 2, where k is the number of its prime divisors), and, by the algorithm, it remains in the sequence. Otherwise, n is removed, since the number of its squarefree divisors > 1 is odd (it is 2^k-1).
(End)
The lexicographically least sequence of integers > 1 such that each entry has an even number of proper divisors occurring in the sequence (that's the sieve restated). - Glen Whitney, Aug 30 2015
0 is nonsquarefree because it is divisible by any square. - Jon Perry, Nov 22 2014, edited by M. F. Hasler, Aug 13 2015
The Heinz numbers of partitions with distinct parts. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} prime(j) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] the Heinz number is 2*2*3*7*29 = 2436. The number 30 (= 2*3*5) is in the sequence because it is the Heinz number of the partition [1,2,3]. - Emeric Deutsch, May 21 2015
It is possible for 2 consecutive terms to be even; for example a(258)=422 and a(259)=426. - Thomas Ordowski, Jul 21 2015. [These form a subsequence of A077395 since their product is divisible by 4. - M. F. Hasler, Aug 13 2015]
There are never more than 3 consecutive terms. Runs of 3 terms start at 1, 5, 13, 21, 29, 33, ... (A007675). - Ivan Neretin, Nov 07 2015
a(n) = product of row n in A265668. - Reinhard Zumkeller, Dec 13 2015
Numbers without excess, i.e., numbers k such that A001221(k) = A001222(k). - Juri-Stepan Gerasimov, Sep 05 2016
Numbers k such that b^(phi(k)+1) == b (mod k) for every integer b. - Thomas Ordowski, Oct 09 2016
Boreico shows that the set of square roots of the terms of this sequence is linearly independent over the rationals. - Jason Kimberley, Nov 25 2016 (reference found by Michael Coons).
Numbers k such that A008836(k) = A008683(k). - Enrique Pérez Herrero, Apr 04 2018
The prime zeta function P(s) "has singular points along the real axis for s=1/k where k runs through all positive integers without a square factor". See Wolfram link. - Maleval Francis, Jun 23 2018
Numbers k such that A007947(k) = k. - Kyle Wyonch, Jan 15 2021
The Schnirelmann density of the squarefree numbers is 53/88 (Rogers, 1964). - Amiram Eldar, Mar 12 2021
Comment from Isaac Saffold, Dec 21 2021: (Start)
Numbers k such that all groups of order k have a trivial Frattini subgroup [Dummit and Foote].
Let the group G have order n. If n is squarefree and n > 1, then G is solvable, and thus by Hall's Theorem contains a subgroup H_p of index p for all p | n. Each H_p is maximal in G by order considerations, and the intersection of all the H_p's is trivial. Thus G's Frattini subgroup Phi(G), being the intersection of G's maximal subgroups, must be trivial. If n is not squarefree, the cyclic group of order n has a nontrivial Frattini subgroup. (End)
Numbers for which the squarefree divisors (A206778) and the unitary divisors (A077610) are the same; moreover they are also the set of divisors (A027750). - Bernard Schott, Nov 04 2022
0 = A008683(a(n)) - A008836(a(n)) = A001615(a(n)) - A000203(a(n)). - Torlach Rush, Feb 08 2023
From Robert D. Rosales, May 20 2024: (Start)
Numbers n such that mu(n) != 0, where mu(n) is the Möbius function (A008683).
Solutions to the equation Sum_{d|n} mu(d)*sigma(d) = mu(n)*n, where sigma(n) is the sum of divisors function (A000203). (End)
a(n) is the smallest root of x = 1 + Sum_{k=1..n-1} floor(sqrt(x/a(k))) greater than a(n-1). - Yifan Xie, Jul 10 2024
Number k such that A001414(k) = A008472(k). - Torlach Rush, Apr 14 2025
To elaborate on the formula from Greathouse (2018), the maximum of a(n) - floor(n*Pi^2/6 + sqrt(n)/17) is 10 at indices n = 48715, 48716, 48721, and 48760. The maximum is 11, at the same indices, if floor is taken individually for the two addends and the square root. If the value is rounded instead, the maximum is 9 at 10 indices between 48714 and 48765. - M. F. Hasler, Aug 08 2025

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).

Crossrefs

Complement of A013929. Subsequence of A072774 and A209061.
Characteristic function: A008966 (mu(n)^2, where mu = A008683).
Subsequences: A000040, A002110, A235488.
Subsequences: numbers j such that j*a(k) is squarefree where k > 1: A056911 (k = 2), A261034 (k = 3), A274546 (k = 5), A276378 (k = 6).

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( cMichael 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
Equals A039956 UNION A056911. - R. J. Mathar, May 16 2008
A122840(a(n)) <= 1; A010888(a(n)) < 9. - Reinhard Zumkeller, Mar 30 2010
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
A055653(a(n)) = a(n); A055654(a(n)) = 0. - Reinhard Zumkeller, Mar 11 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)

A076259 Gaps between squarefree numbers: a(n) = A005117(n+1) - A005117(n).

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 4, 2, 2, 2, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 2, 1, 3, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 3, 1, 4, 2, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 2, 1, 3, 2, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 03 2002

Keywords

Comments

This sequence is unbounded, as a simple consequence of the Chinese remainder theorem. - Thomas Ordowski, Jul 22 2015
Conjecture: lim sup_{n->oo} a(n)/log(A005117(n)) = 1/2. - Thomas Ordowski, Jul 23 2015 [Note: this conjecture is equivalent to lim sup a(n)/log n = 1/2. - Charles R Greathouse IV, Dec 05 2024]
a(n) = 1 infinitely often since the density of the squarefree numbers, 6/Pi^2, is greater than 1/2. In particular, at least 2 - Pi^2/6 = 35.5...% of the terms are 1. - Charles R Greathouse IV, Jul 23 2015
From Amiram Eldar, Mar 09 2021: (Start)
The asymptotic density of the occurrences of 1 in this sequence is density(A007674)/density(A005117) = A065474/A059956 = 0.530711... (A065469).
The asymptotic density of the occurrences of 2 in this sequence is (density(A069977)-density(A007675))/density(A005117) = (A065474-A206256)/A059956 = 0.324294... (End)

Examples

			As 24 = 3*2^3 and 25 = 5^2, the next squarefree number greater A005117(16) = 23 is A005117(17) = 26, therefore a(16) = 26-23 = 3.
		

Crossrefs

Programs

  • Haskell
    a076259 n = a076259_list !! (n-1)
    a076259_list = zipWith (-) (tail a005117_list) a005117_list
    -- Reinhard Zumkeller, Aug 03 2012
    
  • Maple
    A076259 := proc(n) A005117(n+1)-A005117(n) ; end proc: # R. J. Mathar, Jan 09 2013
  • Mathematica
    Select[Range[200], SquareFreeQ] // Differences (* Jean-François Alcover, Mar 10 2019 *)
  • PARI
    t=1; for(n=2,1e3, if(issquarefree(n), print1(n-t", "); t=n)) \\ Charles R Greathouse IV, Jul 23 2015
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A076259(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)
        r, k = n+1, f(n+1)+1
        while r != k:
            r, k = k, f(k)+1
        return int(r-m) # Chai Wah Wu, Aug 15 2024

Formula

Asymptotic mean: lim_{n->oo} (1/n) Sum_{k=1..n} a(k) = Pi^2/6 (A013661). - Amiram Eldar, Oct 21 2020
a(n) < n^(1/5) for large enough n by a result of Pandey. (The constant Pi^2/6 can be absorbed by any eta > 0.) - Charles R Greathouse IV, Dec 04 2024

A120327 Smallest nonsquarefree number >= n.

Original entry on oeis.org

4, 4, 4, 4, 8, 8, 8, 8, 9, 12, 12, 12, 16, 16, 16, 16, 18, 18, 20, 20, 24, 24, 24, 24, 25, 27, 27, 28, 32, 32, 32, 32, 36, 36, 36, 36, 40, 40, 40, 40, 44, 44, 44, 44, 45, 48, 48, 48, 49, 50, 52, 52, 54, 54, 56, 56, 60, 60, 60, 60, 63, 63, 63, 64, 68, 68, 68, 68, 72, 72, 72, 72
Offset: 1

Views

Author

Zak Seidov, Aug 16 2006

Keywords

Crossrefs

For squarefree instead of nonsquarefree we have A067535, differences A378087.
The opposite for squarefree is A070321, differences A378085.
The run-lengths are A078147 if we prepend 4, differences A376593.
The restriction to primes is A377783 (union A378040), differences A377784.
The opposite is A378033 (differences A378036), for prime powers A031218.
First differences are A378039 if we assume that a(1) = 1.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Mathematica
    Table[NestWhile[ #+1&,n,SquareFreeQ],{n,100}] (* simplified by Harvey P. Dale, Apr 08 2014 *)

A073247 Squarefree numbers k such that k-1 and k+1 are not squarefree.

Original entry on oeis.org

17, 19, 26, 51, 53, 55, 89, 91, 97, 127, 149, 151, 161, 163, 170, 197, 199, 233, 235, 241, 249, 251, 269, 271, 293, 295, 305, 307, 337, 339, 341, 349, 362, 377, 379, 413, 415, 449, 451, 485, 487, 489, 491, 521, 523, 530, 551, 557, 559, 577, 579, 593, 595
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Comments

Probably 11*n < a(n) < 12*n for n > 189. - Charles R Greathouse IV, Nov 05 2017
The asymptotic density of this sequence is 1/zeta(2) - 2 * Product_{p prime} (1 - 2/p^2) + Product_{p prime} (1 - 3/p^2) = A059956 - 2*A065474 + A206256 = 0.088145884881346585838... . - Amiram Eldar, Aug 30 2024

Crossrefs

Cf. A268331, A268332, A268333, A268334 (squarefree numbers isolated by more than 2, 3, etc.).

Programs

  • Maple
    sf:= select(numtheory:-issqrfree,[$1..1000]):
    map(t -> `if`(sf[t-1]=sf[t]-1 or sf[t+1]=sf[t]+1,NULL,sf[t]), [$2..nops(sf)-1]); # Robert Israel, Feb 01 2016
  • Mathematica
    Reap[For[n = 0, n <= 1000, n++, If[SquareFreeQ[n] && !SquareFreeQ[n-1] && !SquareFreeQ[n+1], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    is(n)=!issquarefree(n-1) && issquarefree(n) && !issquarefree(n+1) \\ Charles R Greathouse IV, Nov 05 2017
    
  • PARI
    list(lim)=my(v=List(),l1,l2); forfactored(k=9,lim\1+1, if(!issquarefree(k) && !issquarefree(l2) && issquarefree(l1), listput(v,l1[1])); l2=l1; l1=k); Vec(v) \\ Charles R Greathouse IV, Nov 27 2024

A378039 a(1)=3; a(n>1) = n-th first difference of A120327(k) = least nonsquarefree number greater than k.

Original entry on oeis.org

3, 0, 0, 4, 0, 0, 0, 1, 3, 0, 0, 4, 0, 0, 0, 2, 0, 2, 0, 4, 0, 0, 0, 1, 2, 0, 1, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 1, 3, 0, 0, 1, 1, 2, 0, 2, 0, 2, 0, 4, 0, 0, 0, 3, 0, 0, 1, 4, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 1, 4, 0, 0, 0, 1, 3, 0, 0, 4, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Comments

The union is {0,1,2,3,4}.

Crossrefs

Positions of 0's are A005117.
Positions of 4's are A007675 - 1, except first term.
Positions of 1's are A068781.
Positions of 2's are A073247 - 1.
Positions of 3's are A073248 - 1, except first term.
First-differences of A120327.
For prime-powers we have A377780, first-differences of A000015.
Restriction is A377784 (first-differences of A377783, union A378040).
The opposite is A378036 (differences A378033), for prime-powers A377782.
The opposite for squarefree is A378085, differences of A070321
For squarefree we have A378087, restriction A378037, differences of A112926.
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

  • Mathematica
    Differences[Table[NestWhile[#+1&,n,#>1&&SquareFreeQ[#]&],{n,100}]]

A039833 Smallest of three consecutive squarefree numbers k, k+1, k+2 of the form p*q where p and q are distinct primes.

Original entry on oeis.org

33, 85, 93, 141, 201, 213, 217, 301, 393, 445, 633, 697, 921, 1041, 1137, 1261, 1345, 1401, 1641, 1761, 1837, 1893, 1941, 1981, 2101, 2181, 2217, 2305, 2361, 2433, 2461, 2517, 2641, 2721, 2733, 3097, 3385, 3601, 3693, 3865, 3901, 3957, 4285, 4413, 4533, 4593, 4881, 5601
Offset: 1

Views

Author

Keywords

Comments

Equivalently: k, k+1 and k+2 all have 4 divisors.
There cannot be four consecutive squarefree numbers as one of them is divisible by 2^2 = 4.
These 3 consecutive squarefree numbers of the form p*q have altogether 6 prime factors always including 2 and 3. E.g., if k = 99985, the six prime factors are {2,3,5,19997,33329,49993}. The middle term is even and not divisible by 3.
Nonsquare terms of A056809. First terms of A056809 absent here are A056809(4)=121=11^2, A056809(14)=841=29^2, A056809(55)=6241=79^2.
Cf. A179502 (Numbers k with the property that k^2, k^2+1 and k^2+2 are all semiprimes). - Zak Seidov, Oct 27 2015
The numbers k, k+1, k+2 have the form 2p-1, 2p, 2p+1 where p is an odd prime. A195685 gives the sequence of odd primes that generates these maximal runs of three consecutive integers with four positive divisors. - Timothy L. Tiffin, Jul 05 2016
a(n) is always 1 or 9 mod 12. - Charles R Greathouse IV, Mar 19 2022

Examples

			33, 34 and 35 all have 4 divisors.
85 is a term as 85 = 17*5, 86 = 43*2, 87 = 29*3.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B18.
  • David Wells, Curious and interesting numbers, Penguin Books, 1986, p. 114.

Crossrefs

Programs

  • Haskell
    a039833 n = a039833_list !! (n-1)
    a039833_list = f a006881_list where
       f (u : vs@(v : w : xs))
         | v == u+1 && w == v+1 = u : f vs
         | otherwise            = f vs
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Mathematica
    lst = {}; Do[z = n^3 + 3*n^2 + 2*n; If[PrimeOmega[z/n] == PrimeOmega[z/(n + 2)] == 4 && PrimeNu[z] == 6, AppendTo[lst, n]], {n, 1, 5601, 2}]; lst (* Arkadiusz Wesolowski, Dec 11 2011 *)
    okQ[n_]:=Module[{cl={n,n+1,n+2}},And@@SquareFreeQ/@cl && Union[ DivisorSigma[ 0,cl]]=={4}]; Select[Range[1,6001,2],okQ] (* Harvey P. Dale, Dec 17 2011 *)
    SequencePosition[DivisorSigma[0,Range[6000]],{4,4,4}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 17 2017 *)
  • PARI
    is(n)=n%4==1 && factor(n)[,2]==[1,1]~ && factor(n+1)[,2]==[1,1]~ && factor(n+2)[,2]==[1,1]~ \\ Charles R Greathouse IV, Aug 29 2016
    
  • PARI
    is(n)=my(t=n%12); if(t==1, isprime((n+2)/3) && isprime((n+1)/2) && factor(n)[,2]==[1,1]~, t==9 && isprime(n/3) && isprime((n+1)/2) && factor(n+2)[,2]==[1,1]~) \\ Charles R Greathouse IV, Mar 19 2022

Formula

A008966(a(n)) * A064911(a(n)) * A008966(a(n)+1) * A064911(a(n)+1) * A008966(a(n)+2) * A064911(a(n)+2) = 1. - Reinhard Zumkeller, Feb 26 2011

Extensions

Additional comments from Amarnath Murthy, Vladeta Jovovic, Labos Elemer and Benoit Cloitre, May 08 2002

A206256 Decimal expansion of Product_{p prime} (1 - 3/p^2).

Original entry on oeis.org

1, 2, 5, 4, 8, 6, 9, 8, 0, 9, 0, 5, 8, 0, 9, 2, 9, 8, 3, 3, 4, 4, 2, 7, 9, 9, 9, 0, 8, 9, 7, 5, 3, 5, 4, 0, 5, 7, 1, 9, 8, 4, 6, 8, 7, 2, 7, 8, 9, 2, 2, 8, 4, 6, 9, 4, 2, 2, 0, 4, 9, 6, 1, 0, 7, 4, 4, 0, 1, 0, 1, 9, 6, 1, 7, 1, 5, 4, 5, 8, 3, 7, 5, 4, 9, 1, 1, 1, 2, 2, 7, 1, 5, 7, 2, 8, 8, 3, 9, 9, 1, 7, 4, 7, 4, 6
Offset: 0

Views

Author

N. J. A. Sloane, Feb 05 2012, based on a posting by Warren Smith to the Math Fun Mailing List, Feb 04 2012

Keywords

Comments

For a randomly selected number k, this is the probability that k, k+1, k+2 all are squarefree.

Examples

			0.1254869809058...
		

Crossrefs

Programs

  • Maple
    # See A175640 using efact := 1-3/p^2. - R. J. Mathar, Mar 22 2012
  • Mathematica
    $MaxExtraPrecision = 500; m = 500; c = LinearRecurrence[{0, 3}, {0, -6}, m]; RealDigits[(1/4) * Exp[NSum[Indexed[c, n]*(PrimeZetaP[n] - 1/2^n)/n, {n, 2, m}, NSumTerms -> m, WorkingPrecision -> m]], 10, 100][[1]] (* Amiram Eldar, Oct 01 2019 *)
  • PARI
    prodeulerrat(1 - 3/p^2) \\ Amiram Eldar, Mar 16 2021

Extensions

More terms from Amiram Eldar, Oct 01 2019
More terms from Vaclav Kotesovec, Dec 17 2019

A066509 a(n) is the first of a triple of consecutive integers, each of which is both the product of three distinct primes and also the product of three primes counted with multiplicity.

Original entry on oeis.org

1309, 1885, 2013, 2665, 3729, 5133, 6061, 6213, 6305, 6477, 6853, 6985, 7257, 7953, 8393, 8533, 8785, 9213, 9453, 9821, 9877, 10281, 10945, 11605, 12453, 12565, 12801, 12857, 12993, 13053, 14133, 14313, 14329, 14465, 14817, 15085, 15265, 15805, 16113, 16133
Offset: 1

Views

Author

Jason Earls, Jan 04 2002

Keywords

Comments

A subsequence of A052214 and thus of A005238. - M. F. Hasler, Jan 05 2013
Also, the start of pairs of adjacent sphenic twins, i.e., a(n) = A215217(k) such that A215217(k+1) = A215217(k)+1. Therefore these triples might be called "sphenic triples". They form a subsequence of A242606. - M. F. Hasler, May 18 2014
Minimal difference is 4 which occurs at indices n = {316, 547, 566, 604, 666, 695, 821, 874, 979, ...}. - Zak Seidov, Jul 04 2020

Examples

			a(5) = 3729 because it along with 3730 and 3731 are all the product of three distinct primes.
		

Crossrefs

Subsequence of A052214 and hence of A005238.
Subsequence of A215217, A007675, A242606 and A168626.

Programs

  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1,1};lst={};Do[If[f[n]&&f[n+1]&&f[n+2],AppendTo[lst,n]],{n,9!}];lst (* Vladimir Joseph Stephan Orlovsky, Mar 04 2010 *)
    SequencePosition[Table[If[PrimeNu[n]==PrimeOmega[n]==3,1,0],{n,17000}],{1,1,1}][[;;,1]] (* Harvey P. Dale, Feb 28 2025 *)
  • PARI
    Trip(n) = { local(f); f=factor(n); if (matsize(f)[1] != 3, return(0)); for(i=1, 3, if (f[i, 2] != 1, return(0))); return(1); } { n=0; for (m=1, 10^10, if (!Trip(m) || !Trip(m+1) || !Trip(m+2), next); write("b066509.txt", n++, " ", m); if (n==1000, return) ) } \\ Harry J. Smith, Feb 19 2010
    
  • PARI
    A066509(n,show_all=0,a=2*3*5,s=[1,1,1]~)={until( !n-- || !a++, until(, factor(a+2)[,2]!=s && (a+=3) && next; factor(a+1)[,2]!=s && (a+=2) && next; factor(a)[,2]==s && break; factor(a+3)[,2]==s && a++ && break; a+=4);show_all && print1(a",")); a} \\ M. F. Hasler, Jan 05 2013
    
  • PARI
    is3dp(n)=my(f=factor(n));matsize(f)==[3,2]&&vecmax(f[,2])==1
    list(lim)=my(v=List(),t);forprime(p=17,lim\15, forprime(q=5,min(p-1,lim\3), forprime(r=3,min(q-1,lim\(p*q)), t=p*q*r; if(t%4==1 && is3dp(t+1) && is3dp(t+2), listput(v,t))))); Set(v) \\ Charles R Greathouse IV, Jan 05 2013; updated Jan 22 2025
    
  • PARI
    list(lim)=my(v=List(),ct); forfactored(n=1309,lim\1+2, if(n[2][,2]==[1,1,1]~, if(ct++==3, listput(v,n[1]-2)), ct=0)); Vec(v) \\ Charles R Greathouse IV, Aug 30 2022

Formula

a(n) == 1 (mod 4). - Zak Seidov, Mar 31 2020

Extensions

Definition clarified by Harvey P. Dale, Feb 28 2025

A063838 Numbers k such that mu(k) + mu(k+1) + mu(k+2) = 3.

Original entry on oeis.org

33, 85, 93, 141, 201, 213, 217, 301, 393, 445, 633, 697, 869, 921, 1041, 1137, 1189, 1253, 1261, 1345, 1401, 1589, 1641, 1761, 1793, 1837, 1893, 1937, 1941, 1981, 2045, 2101, 2181, 2189, 2217, 2305, 2361, 2433, 2461, 2469, 2489, 2517, 2561, 2641, 2721
Offset: 1

Views

Author

Jason Earls, Aug 21 2001

Keywords

References

  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 4th ed., Wiley, NY, 1980, p. 113.

Crossrefs

Cf. A008683. A proper subset of A007675.

Programs

  • Mathematica
    Transpose[ Select[ Partition[ Range[ 3000 ], 3, 1 ], MoebiusMu[ #[ [ 1 ] ] ]+MoebiusMu[ #[ [ 2 ] ] ]+MoebiusMu[ #[ [ 3 ] ] ]==3& ] ][ [ 1 ] ]
    Position[Partition[MoebiusMu[Range[3000]],3,1],?(Total[#]==3&)]//Flatten (* _Harvey P. Dale, May 08 2024 *)
  • PARI
    M(n) = moebius(n)+moebius(n+1)+moebius(n+2); j=[]; for(n=1,5000, if(M(n)==3,j=concat(j,n))); j
    
  • PARI
    M(n) = moebius(n) + moebius(n + 1) + moebius(n + 2)
    n=0; for (m=1, 10^9, if(M(m)==3, write("b063838.txt", n++, " ", m); if (n==1000, break))) \\ Harry J. Smith, Sep 01 2009
    
  • PARI
    list(lim)=my(v=List(),run,last); forsquarefree(k=33,lim\1+2, if(moebius(k)==1, if(k[1]-last==1, if(run++>2, listput(v, k[1]-2)), run=1); last=k[1], last=run=0)); Vec(v) \\ Charles R Greathouse IV, Jan 08 2018

A378087 First-differences of A067535 (least positive integer >= n that is squarefree).

Original entry on oeis.org

1, 1, 2, 0, 1, 1, 3, 0, 0, 1, 2, 0, 1, 1, 2, 0, 2, 0, 2, 0, 1, 1, 3, 0, 0, 3, 0, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 3, 0, 0, 1, 4, 0, 0, 0, 2, 0, 2, 0, 2, 0, 1, 1, 2, 0, 1, 3, 0, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 3, 0, 0, 1, 1, 3, 0, 0, 1, 2, 0, 1, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2024

Keywords

Comments

Does this contain all nonnegative integers? The positions of first appearances begin: 4, 1, 3, 7, 47, 241, 843, 22019, 217069, ...

Crossrefs

Ones are A007674.
Zeros are A013929, complement A005117.
Positions of first appearances are A020754 (except first term) = A045882 - 1.
First-differences of A067535.
Twos are A280892.
For prime-powers we have A377780, differences of A000015.
The nonsquarefree opposite is A378036, differences of A378033.
The restriction to primes + 1 is A378037 (opposite A378038), differences of A112926.
For nonsquarefree numbers we have A378039, see A377783, A377784, A378040.
The opposite is A378085, differences of A070321.
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

  • Mathematica
    Differences[Table[NestWhile[#+1&,n,#>1&&!SquareFreeQ[#]&],{n,100}]]
Showing 1-10 of 27 results. Next