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

A013929 Numbers that are not squarefree. Numbers that are divisible by a square greater than 1. The complement of A005117.

Original entry on oeis.org

4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, 54, 56, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 104, 108, 112, 116, 117, 120, 121, 124, 125, 126, 128, 132, 135, 136, 140, 144, 147, 148, 150, 152, 153, 156, 160
Offset: 1

Views

Author

Keywords

Comments

Sometimes misnamed squareful numbers, but officially those are given by A001694.
This is different from the sequence of numbers k such that A007913(k) < phi(k). The two sequences differ at the values: 420, 660, 780, 840, 1320, 1560, 4620, 5460, 7140, ..., which is essentially A070237. - Ant King, Dec 16 2005
Numbers k such that Sum_{d|k} (d/phi(d))*mu(k/d) = 0. - Benoit Cloitre, Apr 28 2002
Also, k with at least one x < k such that A007913(x) = A007913(k). - Benoit Cloitre, Apr 28 2002
Numbers k for which there exists a partition into two parts p and q such that p + q = k and p*q is a multiple of k. - Amarnath Murthy, May 30 2003
Numbers k such that there is a solution 0 < x < k to x^2 == 0 (mod k). - Franz Vrabec, Aug 13 2005
Numbers k such that moebius(k) = 0.
a(n) = k such that phi(k)/k = phi(m)/m for some m < k. - Artur Jasinski, Nov 05 2008
Appears to be numbers such that when a column with index equal to a(n) in A051731 is deleted, there is no impact on the result in the first column of A054525. - Mats Granvik, Feb 06 2009
Numbers k such that the number of prime divisors of (k+1) is less than the number of nonprime divisors of (k+1). - Juri-Stepan Gerasimov, Nov 10 2009
Orders for which at least one non-cyclic finite abelian group exists: A000688(a(n)) > 1. This follows from the fact that not all exponents in the prime factorization of a(n) are 1 (moebius(a(n)) = 0). The number of such groups of order a(n) is A192005(n) = A000688(a(n)) - 1. - Wolfdieter Lang, Jul 29 2011
Subsequence of A193166; A192280(a(n)) = 0. - Reinhard Zumkeller, Aug 26 2011
It appears that terms are the numbers m such that Product_{k=1..m} (prime(k) mod m) <> 0. See Maple code. - Gary Detlefs, Dec 07 2011
A008477(a(n)) > 1. - Reinhard Zumkeller, Feb 17 2012
A057918(a(n)) > 0. - Reinhard Zumkeller, Mar 27 2012
A056170(a(n)) > 0. - Reinhard Zumkeller, Dec 29 2012
Numbers k such that A001221(k) != A001222(k). - Felix Fröhlich, Aug 13 2014
Numbers k such that A001222(k) > A001221(k), since in this case at least one prime factor of k occurs more than once, which implies that k is divisible by at least one perfect square > 1. - Carlos Eduardo Olivieri, Aug 02 2015
Lexicographically least sequence such that each term has a positive even number of proper divisors not occurring in the sequence, cf. the sieve characterization of A005117. - Glen Whitney, Aug 30 2015
There are arbitrarily long runs of consecutive terms. Record runs start at 4, 8, 48, 242, ... (A045882). - Ivan Neretin, Nov 07 2015
A number k is a term if 0 < min(A000010(k) + A023900(k), A000010(k) - A023900(k)). - Torlach Rush, Feb 22 2018
Every squareful number > 1 is nonsquarefree, but the converse is false and the nonsquarefree numbers that are not squareful (see first comment) are in A332785. - Bernard Schott, Apr 11 2021
Integers m where at least one k < m exists such that m divides k^m. - Richard R. Forberg, Jul 31 2021
Consider the Diophantine equation S(x,y) = (x+y) + (x-y) + (x*y) + (x/y) = z, when x and y are both positive integers with y | x. Then, there is a solution (x,y) iff z is a term of this sequence; in this case, if x = K*y, then z = S(K*y,y) = K*(y+1)^2 (see A351381, link and references Perelman); example: S(12,4) = 75 = a(28). The number of solutions for S(x,y) = a(n) is A353282(n). - Bernard Schott, Mar 29 2022
For each positive integer m, the number of unitary divisors of m = the number of squarefree divisors of m (see A034444); but only for the terms of this sequence does the set of unitary divisors differ from the set of squarefree divisors. Example: the set of unitary divisors of 20 is {1, 4, 5, 20}, while the set of squarefree divisors of 20 is {1, 2, 5, 10}. - Bernard Schott, Oct 15 2022

Examples

			For the terms up to 20, we compute the squares of primes up to floor(sqrt(20)) = 4. Those squares are 4 and 9. For every such square s, put the terms s*k^2 for k = 1 to floor(20 / s). This gives after sorting and removing duplicates the list 4, 8, 9, 12, 16, 18, 20. - _David A. Corneth_, Oct 25 2017
		

References

  • I. Perelman, L'Algèbre récréative, Deux nombres et quatre opérations, Editions en langues étrangères, Moscou, 1959, pp. 101-102.
  • Ya. I. Perelman, Algebra can be fun, Two numbers and four operations, Mir Publishers Moscow, 1979, pp. 131-132.

Crossrefs

Complement of A005117. Subsequences: A130897, A190641, A332785.
Partitions into: A114374, A256012.

Programs

  • Haskell
    a013929 n = a013929_list !! (n-1)
    a013929_list = filter ((== 0) . a008966) [1..]
    -- Reinhard Zumkeller, Apr 22 2012
    
  • Magma
    [ n : n in [1..1000] | not IsSquarefree(n) ];
    
  • Maple
    a := n -> `if`(numtheory[mobius](n)=0,n,NULL); seq(a(i),i=1..160); # Peter Luschny, May 04 2009
    t:= n-> product(ithprime(k),k=1..n): for n from 1 to 160 do (if t(n) mod n <>0) then print(n) fi od; # Gary Detlefs, Dec 07 2011
    with(NumberTheory): isQuadrateful := n -> irem(Radical(n), n) <> 0:
    select(isQuadrateful, [`$`(1..160)]);  # Peter Luschny, Jul 12 2022
  • Mathematica
    Union[ Flatten[ Table[ n i^2, {i, 2, 20}, {n, 1, 400/i^2} ] ] ]
    Select[ Range[2, 160], (Union[Last /@ FactorInteger[ # ]][[ -1]] > 1) == True &] (* Robert G. Wilson v, Oct 11 2005 *)
    Cases[Range[160], n_ /; !SquareFreeQ[n]] (* Jean-François Alcover, Mar 21 2011 *)
    Select[Range@160, ! SquareFreeQ[#] &] (* Robert G. Wilson v, Jul 21 2012 *)
    Select[Range@160, PrimeOmega[#] > PrimeNu[#] &] (* Carlos Eduardo Olivieri, Aug 02 2015 *)
    Select[Range[200], MoebiusMu[#] == 0 &] (* Alonso del Arte, Nov 07 2015 *)
  • PARI
    {a(n)= local(m,c); if(n<=1,4*(n==1), c=1; m=4; while( cMichael Somos, Apr 29 2005 */
    
  • PARI
    for(n=1, 1e3, if(omega(n)!=bigomega(n), print1(n, ", "))) \\ Felix Fröhlich, Aug 13 2014
    
  • PARI
    upto(n)=my(res = List()); forprime(p = 2, sqrtint(n), for(k = 1, n \ p^2, listput(res, k * p^2))); listsort(res, 1); res \\ David A. Corneth, Oct 25 2017
    
  • Python
    from sympy.ntheory.factor_ import core
    def ok(n): return core(n, 2) != n
    print(list(filter(ok, range(1, 161)))) # Michael S. Branicky, Apr 08 2021
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A013929(n):
        def f(x): return n+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 20 2024

Formula

A008966(a(n)) = 0. - Reinhard Zumkeller, Apr 22 2012
Sum_{n>=1} 1/a(n)^s = (zeta(s)*(zeta(2*s)-1))/zeta(2*s). - Enrique Pérez Herrero, Jul 07 2012
a(n) ~ n/k, where k = 1 - 1/zeta(2) = 1 - 6/Pi^2 = A229099. - Charles R Greathouse IV, Sep 13 2013
A001222(a(n)) > A001221(a(n)). - Carlos Eduardo Olivieri, Aug 02 2015
phi(a(n)) > A003958(a(n)). - Juri-Stepan Gerasimov, Apr 09 2019

Extensions

More terms from Erich Friedman
More terms from Franz Vrabec, Aug 13 2005

A132188 Number of 3-term geometric progressions with no term exceeding n.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 9, 12, 17, 18, 19, 22, 23, 24, 25, 32, 33, 38, 39, 42, 43, 44, 45, 48, 57, 58, 63, 66, 67, 68, 69, 76, 77, 78, 79, 90, 91, 92, 93, 96, 97, 98, 99, 102, 107, 108, 109, 116, 129, 138, 139, 142, 143, 148, 149, 152, 153, 154, 155, 158
Offset: 1

Views

Author

Gerry Myerson, Nov 21 2007

Keywords

Comments

a(n) = number of pairs (i,j) in [1..n] X [1..n] with integral geometric mean sqrt(i*j). Cf. A000982, A362931. - N. J. A. Sloane, Aug 28 2023
Also the number of 2 X 2 symmetric singular matrices with entries from {1, ..., n} - cf. A064368.
Rephrased: Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2=x*y. See A211422. - Clark Kimberling, Apr 14 2012

Examples

			a(4) counts these six (w,x,y) - triples: (1,1,1), (2,1,4), (2,4,1), (2,2,2), (3,3,3), (4,4,4). - _Clark Kimberling_, Apr 14 2012
		

Crossrefs

Programs

  • Haskell
    a132188 0 = 0
    a132188 n = a132345 n + (a120486 $ fromInteger n)
    -- Reinhard Zumkeller, Apr 21 2012
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          1+2*add(`if`(issqr(i*n), 1, 0), i=1..n-1))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 28 2023
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 - x*y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 80}]  (* Clark Kimberling, Apr 14 2012 *)
  • Python
    from sympy.ntheory.primetest import is_square
    def A132188(n): return n+(sum(1 for x in range(1,n+1) for y in range(1,x) if is_square(x*y))<<1) # Chai Wah Wu, Aug 28 2023

Formula

a(n) = Sum [sqrt(n/k)]^2, where the sum is over all squarefree k not exceeding n.
If we call A120486, this sequence and A132189 F(n), P(n) and S(n), respectively, then P(n) = 2 F(n) - n = S(n) + n. The Finch-Sebah paper cited at A000188 proves that F(n) is asymptotic to (3 / pi^2) n log n. In the reference, we prove that F(n) = (3 / pi^2) n log n + O(n), from which it follows that P(n) = (6 / pi^2) n log n + O(n) and similarly for S(n).
a(n) = Sum_{1 <=x,y <=n} A010052(x*y). - Clark Kimberling, Apr 14 2012
a(n) = n+2*Sum_{1<=xA010052(x*y). - Chai Wah Wu, Aug 28 2023

A132345 Number of increasing three-term geometric sequences from the integers {1,2,...,n}.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 4, 4, 4, 5, 5, 5, 5, 8, 8, 10, 10, 11, 11, 11, 11, 12, 16, 16, 18, 19, 19, 19, 19, 22, 22, 22, 22, 27, 27, 27, 27, 28, 28, 28, 28, 29, 31, 31, 31, 34, 40, 44, 44, 45, 45, 47, 47, 48, 48, 48, 48, 49, 49, 49, 51, 58, 58, 58, 58, 59, 59, 59, 59, 64, 64, 64, 68
Offset: 1

Views

Author

David Angell (angell(AT)maths.unsw.edu.au), Nov 07 2007

Keywords

Comments

A078147 gives run lengths in this sequence, apart from initial run of zeros. - Reinhard Zumkeller, Apr 22 2012

Examples

			a(24)=12 as the sequences counted are 1,2,4; 2,4,8; 3,6,12; 4,8,16; 5,10,20; 6,12,24; 1,3,9; 2,6,18; 4,6,9; 8,12,18; 1,4,16; 9,12,16
		

Crossrefs

Cf. A000010, A000196, A057918 (first differences).

Programs

  • Haskell
    a132345 n = sum $ zipWith (*)
       (tail a000010_list) (map ((div n) . (^ 2)) [2..a000196 n])
    -- Reinhard Zumkeller, Apr 22 2012
  • Maple
    sum(numtheory[phi](p)*trunc(n/p^2),p=2..trunc(sqrt(n)));

Formula

a(n)=sum_{1
a(n) = A132188(n) - A120486(n). - Reinhard Zumkeller, Apr 22 2012
a(n) = (A132188(n) - n)/2 = A120486(n) - n. - David Radcliffe, Jun 08 2025
a(n) = A132189(n)/2. - Hugo Pfoertner, Jun 08 2025

A133466 Positive integers k for which there is exactly one integer i in {1,2,3,...,k-1} such that i*k is a square.

Original entry on oeis.org

4, 8, 12, 20, 24, 28, 40, 44, 52, 56, 60, 68, 76, 84, 88, 92, 104, 116, 120, 124, 132, 136, 140, 148, 152, 156, 164, 168, 172, 184, 188, 204, 212, 220, 228, 232, 236, 244, 248, 260, 264, 268, 276, 280, 284, 292, 296, 308, 312, 316, 328, 332, 340, 344, 348, 356
Offset: 1

Author

John W. Layman, Nov 28 2007

Keywords

Comments

It appears that all terms of this sequence are exactly four times those of the squarefree integers (A005117).
The observed behavior is true for all n. All positive integers n are written uniquely as k*m^2 where k is squarefree, k >=1, m >= 1. The square multiples of n are j^2*k*n, j >= 1. We seek n with exactly 1 multiple that is square and less than n^2. If m = 1, there are no such multiples as we have k = n, so the least square multiple is n^2. If m >= 2, k*n is square and less than n^2. However, 4*k*n also qualifies as square and less than n^2 if m > 2. So the qualifying values of n are those with m=2. - Peter Munn, Nov 28 2019
The asymptotic density of this sequence is 3/(2*Pi^2). - Amiram Eldar, Mar 08 2021

Examples

			4 is in the sequence because among the products 1*4,2*4,3*4 = 4,8,12 there is exactly one square.
		

Crossrefs

Programs

Formula

A057918(a(n)) = 1. - Reinhard Zumkeller, Mar 27 2012
From Peter Munn, Nov 28 2019: (Start)
a(n) = 4 * A005117(n).
{a(n)} = {A225546(A007283(n)) : n >= 0}, where {a(n)} denotes the set of integers in the sequence.
(End)
Sum_{n>=1} 1/a(n)^s = zeta(s)/(4^s*zeta(2*s)), s>1. - Amiram Eldar, Sep 26 2023

A195085 Positive integers n for which there exist exactly two integers k in {1,2,3,...,n-1} such that k*n is square.

Original entry on oeis.org

9, 18, 27, 45, 54, 63, 90, 99, 117, 126, 135, 153, 171, 189, 198, 207, 234, 261, 270, 279, 297, 306, 315, 333, 342, 351, 369, 378, 387, 414, 423, 459, 477, 495, 513, 522, 531, 549, 558, 585, 594, 603, 621, 630, 639, 657, 666, 693, 702, 711, 738, 747, 765, 774, 783
Offset: 1

Author

John W. Layman, Sep 08 2011

Keywords

Comments

It appears that the terms of this sequence are exactly 9 times those of A005117 and (9/4) times those of A133466.
Also, this sequence gives the positions of those terms where A057918(n)=2.

Examples

			Given n=9, {1*9, 2*9, ..., 8*9} = {9,18,27,36,45,54,63,72}, of which 9 and 36 are square. Thus 9 is a term of the sequence.
		

Crossrefs

Programs

  • Haskell
    a195085 n = a195085_list !! (n-1)
    a195085_list = map (+ 1) $ elemIndices 2 a057918_list
    -- Reinhard Zumkeller, Mar 27 2012
    
  • Magma
    [k:k in [1..800]|#[m:m in [1..k-1]| IsSquare(m*k)] eq 2]; // Marius A. Burtea, Dec 03 2019

A206588 Number of solutions k of prime(k)=prime(n) (mod n), where 1<=k

Original entry on oeis.org

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

Author

Clark Kimberling, Feb 09 2012

Keywords

Comments

In the following guide to related sequences, c(n) is the number of solutions (n,k) of s(k)=s(n) (mod n), where 1<=k
s(n).............c(n)
prime(n).........A206588
prime(n+1).......A206589
n^2..............A057918
n^3..............A206590
Fibonacci(n+1)...A206713
2^(n-1)..........A206714
n!...............A072480
n(n+1)/2.........A206824
n^4..............A206825
n(n+1)(n+2)/6....A206826
n(n+1)(2n+1)/6...A206827
C(2n,n)..........A206828
For some choices of s, the limiting frequency of 0's in c appears to be a positive constant.

Examples

			For k=1 to 7, the numbers p(8)-p(k) are 17,16,14,12,8,6,4, so that a(8)=2.
		

Crossrefs

Cf. A206589.

Programs

  • Mathematica
    f[n_, k_] := If[Mod[Prime[n] - Prime[k], n] == 0, 1, 0];
    t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
    a[n_] := Count[Flatten[t[n]], 1]
    Table[a[n], {n, 2, 120}]  (* A206588 *)

A337110 Number of length three 1..n vectors that contain their geometric mean.

Original entry on oeis.org

1, 2, 3, 10, 11, 12, 13, 20, 33, 34, 35, 42, 43, 44, 45, 64, 65, 78, 79, 86, 87, 88, 89, 96, 121, 122, 135, 142, 143, 144, 145, 164, 165, 166, 167, 198, 199, 200, 201, 208, 209, 210, 211, 218, 231, 232, 233, 252, 289, 314, 315, 322, 323, 336, 337, 344, 345, 346
Offset: 1

Author

Hywel Normington, Aug 16 2020

Keywords

Comments

From David A. Corneth, Aug 26 2020: (Start)
If x^2 == 0 (mod n) has only 1 solution then a(n) = a(n-1) + 1. Proof:
Let (a, b, n) be such a tuple. Let without loss of generality b be the geometric mean of the tuple. Then a*b*n = b^3 and as b is not 0 we have b^2 = a*n. So then b^2 == 0 (mod n). If b^2 == 0 (mod n) has only 1 solution then b = n. This gives the tuple (n, n, n) which has 1 permutation. So giving a(n) = a(n-1) + 1. (End)

Examples

			For n = 2, the a(2) = 2 solutions are: (1,1,1) and (2,2,2).
For n = 4, the a(4) = 10 solutions are: (1,1,1),(2,2,2),(3,3,3),(4,4,4) and the 6 permutations of (1,2,4).
		

Programs

  • PARI
    first(n) = {my(s = 0, res = vector(n)); for(i = 1, n, s+=b(i); res[i] = s ); res }
    b(n) = { my(s = factorback(factor(n)[, 1]), res = 1); for(i = 1, n \ s - 1, c = (s*i)^2/n; if(denominator(c) == 1 && c <= n, res+=6; ) ); res } \\ David A. Corneth, Aug 26 2020

Formula

a(n) = a(n-1) + 1 + 6*A057918(n).

A338894 Number of ordered pairs (x,y): 1 <= x, y <= n*n, such that x*y is a square.

Original entry on oeis.org

1, 6, 17, 32, 57, 90, 129, 180, 241, 310, 377, 460, 565, 670, 781, 928, 1053, 1194, 1365, 1548, 1705, 1882, 2125, 2312, 2561, 2802, 3081, 3308, 3565, 3910, 4141, 4488, 4849, 5170, 5525, 5840, 6237, 6578, 7013, 7460
Offset: 1

Author

Edward Krogius, Nov 14 2020

Keywords

References

  • The Finnish National Upper secondary Matriculation Examination Long Maths Problem #12 (Mar 18th, 2020) included finding all gridpoints in a [1..100]x[1..100] grid with an integer geometric mean sparked some national interest in gcd integer sequences and their generating algorithms.

Crossrefs

Programs

  • PARI
    A338894(n) = sum(i=1,n*n,sum(j=1,n*n,issquare(i*j))); \\ (Naive implementation) - Antti Karttunen, Nov 23 2020

Formula

a(n) = 2*A339026(n) + n^2.
a(n) = A132188(n^2). - Antti Karttunen, Nov 23 2020

A373043 a(n) is the number of products P = j*k*n, 1 < j < k < n, such that P is a square.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 0, 4, 0, 2, 3, 3, 0, 10, 0, 8, 3, 3, 0, 11, 9, 3, 17, 10, 0, 10, 0, 25, 5, 4, 6, 18, 0, 4, 5, 19, 0, 12, 0, 12, 25, 4, 0, 34, 29, 48, 6, 15, 0, 43, 9, 25, 7, 5, 0, 31, 0, 5, 32, 45, 10, 16, 0, 16, 7, 20, 0, 74, 0, 6, 68, 18, 11, 18, 0, 55, 65, 6, 0
Offset: 4

Author

Hugo Pfoertner, May 27 2024

Keywords

Examples

			a(6) = 1: 2*3*6 = 6^2;
a(8) = 2: 2*4*8 = 8^2, 3*6*8 = 12^2;
a(9) = 1: 2*8*9 = 12^2;
a(10) = 2: 2*5*10 = 10^2, 5*8*10 = 20^2.
		

Crossrefs

Cf. A057918 (see 1st comment there).

Programs

  • PARI
    a(n) = my(s=0); for(j=2, n-2, for(k=j+1, n-1, if(issquare(j*k*n), s++))); s
    
  • PARI
    a(n) = {
    	my(f = factor(n), c = core(f), res = (issquare(n) && n > 1), u, s);
    	u = sqrtint((n-1)\c);
    	for(i = 1, u, 	
    		res+=(numdiv(c*i^2)\2);
    	);
    	res-=u;
    	for(i = u+1, sqrtint((n^2 - 1)\c),
    		d = divisors(c*i^2);
    		s = select(x->x>=n, d);
    		res+=((#d - 2*#s)>>1)
    	);
    	res
    } \\ David A. Corneth, May 27 2024
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A373043(n): return sum(1 for k in range(3,n) for j in range(2,k) if is_square(j*k*n)) # Chai Wah Wu, May 31 2024

Formula

a(n) = 0 for prime n. a(n) > 0 for composite n > 4. Proof: If n is square, then m = i*j*n = 2*8*n = 16*n is square and a(n) > 0. If n is a nonsquare composite, then we can write it as n = j*k where 1 < j < k < n and so j*k*n = j*k*j*k = (j*k)^2 is a square and a(n) > 0 as well. - David A. Corneth, May 27 2024
Showing 1-10 of 12 results. Next