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 313 results. Next

A320782 Inverse Euler transform of the unsigned Moebius function A008966.

Original entry on oeis.org

1, 1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -2, 3, 0, -1, -3, 6, -3, 0, -6, 12, -6, 0, -9, 23, -17, 0, -15, 47, -40, 8, -24, 91, -101, 34, -46, 181, -230, 109, -92, 354, -534, 323, -208, 690, -1177, 883, -520, 1365, -2603, 2297, -1377, 2760, -5641, 5789, -3721, 5741
Offset: 0

Views

Author

Gus Wiseman, Oct 22 2018

Keywords

Comments

The Euler transform of a sequence q is the sequence of coefficients of x^n, n > 0, in the expansion of Product_{n > 0} 1/(1 - x^n)^q(n). The constant term 1 is sometimes taken to be the zeroth part of the Euler transform.

Crossrefs

Number theoretical functions: A000005, A000010, A000203, A001055, A001221, A001222, A008683, A010054.
Inverse Euler transforms: A059966, A320767, A320776, A320777, A320778, A320779, A320780, A320781.

Programs

  • Mathematica
    EulerInvTransform[{}]={};EulerInvTransform[seq_]:=Module[{final={}},For[i=1,i<=Length[seq],i++,AppendTo[final,i*seq[[i]]-Sum[final[[d]]*seq[[i-d]],{d,i-1}]]];
    Table[Sum[MoebiusMu[i/d]*final[[d]],{d,Divisors[i]}]/i,{i,Length[seq]}]];
    EulerInvTransform[Table[Abs[MoebiusMu[n]],{n,30}]]

A300830 a(n) = Product_{d|n} A019565(d)^(1-A008966(n/d)).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 6, 2, 1, 1, 12, 1, 1, 1, 30, 1, 6, 1, 20, 1, 1, 1, 540, 2, 1, 12, 60, 1, 1, 1, 210, 1, 1, 1, 2520, 1, 1, 1, 1260, 1, 1, 1, 84, 20, 1, 1, 94500, 2, 6, 1, 140, 1, 540, 1, 18900, 1, 1, 1, 25200, 1, 1, 60, 2310, 1, 1, 1, 44, 1, 1, 1, 8731800, 1, 1, 12, 132, 1, 1, 1, 346500, 168, 1, 1, 39600, 1, 1, 1, 41580, 1, 1260
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2018

Keywords

Crossrefs

Programs

  • PARI
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A300830(n) = { my(m=1); fordiv(n,d,if(!moebius(n/d),m *= A019565(d))); m; };

Formula

a(n) = Product_{d|n} A019565(d)^(1-abs(A008683(n/d))).
a(n) = A293214(n) / (A300831(n)*A300832(n)).

A293229 a(0) = 0; and for n > 0, a(n) = a(n-1) + (A008966(4n+3) - A008966(4n+1)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 12 2017

Keywords

Comments

The sequence indicates about a possible bias (or lack of it) in the distribution of squarefree numbers among the numbers of the form 4k+1 vs. the numbers of the form 4k+3. See A293429 for another version.
The first negative term is a(1702) = -1.

Crossrefs

Cf. A008966, A293428, A293429 (a variant).

Programs

  • PARI
    up_to = 10000; bias = 0; for(k=0,up_to,bias += (issquarefree((4*k)+3)-issquarefree((4*k)+1)); write("b293229.txt", k, " ", bias));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A293229 n) (if (zero? n) n (+ (- (A008966 (+ 3 (* 4 n))) (A008966 (+ 1 (* 4 n)))) (A293229 (- n 1)))))

Formula

a(0) = 0; and for n > 0, a(n) = a(n-1) + (A008966(4n+3) - A008966(4n+1)).

A293428 a(0) = 1; and for n > 0, a(n) = a(n-1) + (A008966(4n+1) - A107078(4n+3)).

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 4, 5, 6, 7, 8, 8, 8, 9, 10, 10, 11, 12, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 20, 20, 20, 20, 21, 21, 22, 23, 23, 24, 24, 25, 26, 27, 26, 26, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 36, 36, 37, 38, 39, 39, 39, 40, 41, 42, 42, 43, 44, 44, 44, 45, 46, 46, 47, 47, 48, 49, 50, 50, 51, 52, 52, 53, 53
Offset: 0

Views

Author

Antti Karttunen, Oct 16 2017

Keywords

Comments

After a(0)=1, each term a(n) is either (a) one more than its predecessor, in case 4n+1 and 4n+3 are both squarefree, (b) stays same if only the other one is squarefree, or (c) decreases by one if neither 4n+1 nor 4n+3 are squarefree.

Crossrefs

Formula

a(0) = 1; and for n > 0, a(n) = a(n-1) + -1+(A008966(4n+1)+A008966(4n+3)).
Or for n > 0, a(n) = a(n-1) + (A008966(4n+1) - A107078(4n+3)).

A293429 a(0) = 0; and for n > 0, a(n) = a(n-1) + (A008966(4n-1) - A008966(4n+1)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 16 2017

Keywords

Comments

The sequence indicates about a possible bias (or lack of it) in the distribution of squarefree numbers among the numbers of the form 4k-1 vs. the numbers of the form 4k+1. See A293229 for another version.
The first negative term is a(4014) = -1.

Crossrefs

Cf. A008966, A293229 (a variant).

Formula

a(0) = 0; and for n > 0, a(n) = a(n-1) + (A008966(4n-1) - A008966(4n+1)).

A063736 Patterns of possible squarefree triples of 3 consecutive numbers {4k+1, 4k+2, 4k+3} are coded as follows: compute A008966(x) getting one of {000, 001, 010, 011, 100, 101, 110, 111} and convert to decimal.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Aug 24 2001

Keywords

Comments

All code values arise corresponding to 8 classes of patterns. E.g., the first nonsquarefree triple (000 pattern, code=0) appears at 844, [845, 846, 847], 848 as a middle part of a nonsquarefree 5-tuple. Start values of code=7 triples are listed in A063238.

Examples

			a(0) = 4*A008966(1)+2*A008966(2)+A008966(3) = 4+2+1 = 7.
a(11) = 4*A008966(45)+2*A008966(46)+A008966(47) = 0+2+1 = 3.
a(12) = 4*A008966(49)+2*A008966(50)+A008966(51) = 0+0+1 = 1.
a(13) = 4*A008966(53)+2*A008966(54)+A008966(55) = 4+0+1 = 5.
a(14) = 4*A008966(57)+2*A008966(58)+A008966(59) = 4+2+1 = 7.
		

Crossrefs

Formula

a(n) = 4*A008966(4n+1)+2*A008966(4n+2)+A008966(4n+3).

A278554 Number of distinct blocks of length n (a.k.a. subword complexity) of the characteristic sequence of the squarefree numbers A008966.

Original entry on oeis.org

1, 2, 4, 8, 15, 29, 55, 101, 175, 323, 583
Offset: 0

Views

Author

Jeffrey Shallit, Jan 02 2017

Keywords

Comments

Conjecture 1: this is the number of binary sequences S of length n such that, for all primes p such that p^2 <= n, at least one of the p^2 linearly indexed subsequences of S with gap p^2 starting at the 1st, 2nd, ..., p^2-th position of S, is the all-zeros sequence. In other words, every block that is not explicitly ruled out by congruence conditions for the primes p with p^2 <= n should occur.
Conjecture 2: the last new block to actually occur is always 0^n (n copies of 0). Cf. A020754.

Examples

			For n = 5, the 3 blocks of length 5 that do not occur are 11111, 11110, and 01111.
		

Crossrefs

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)

A008683 Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.

Original entry on oeis.org

1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, -1
Offset: 1

Views

Author

Keywords

Comments

Moebius inversion: f(n) = Sum_{d|n} g(d) for all n <=> g(n) = Sum_{d|n} mu(d)*f(n/d) for all n.
a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3, 1).
A008683 = A140579^(-1) * A140664. - Gary W. Adamson, May 20 2008
Coons & Borwein prove that Sum_{n>=1} mu(n) z^n is transcendental. - Jonathan Vos Post, Jun 11 2008; edited by Charles R Greathouse IV, Sep 06 2017
Equals row sums of triangle A144735 (the square of triangle A054533). - Gary W. Adamson, Sep 20 2008
Conjecture: a(n) is the determinant of Redheffer matrix A143104 where T(n, n) = 0. Verified for the first 50 terms. - Mats Granvik, Jul 25 2008
From Mats Granvik, Dec 06 2008: (Start)
The Editorial Office of the Journal of Number Theory kindly provided (via B. Conrey) the following proof of the conjecture: Let A be A143104 and B be A143104 where T(n, n) = 0.
"Suppose you expand det(B_n) along the bottom row. There is only a 1 in the first position and so the answer is (-1)^n times det(C_{n-1}) say, where C_{n-1} is the (n-1) by (n-1) matrix obtained from B_n by deleting the first column and the last row. Now the determinant of the Redheffer matrix is det(A_n) = M(n) where M(n) is the sum of mu(m) for 1 <= m <= n. Expanding det(A_n) along the bottom row, we see that det(A_n) = (-1)^n * det(C_{n-1}) + M(n-1). So we have det(B_n) = (-1)^n * det(C_{n-1}) = det(A_n) - M(n-1) = M(n) - M(n-1) = mu(n)." (End)
Conjecture: Consider the table A051731 and treat 1 as a divisor. Move the value in the lower right corner vertically to a divisor position in the transpose of the table and you will find that the determinant is the Moebius function. The number of permutation matrices that contribute to the Moebius function appears to be A074206. - Mats Granvik, Dec 08 2008
Convolved with A152902 = A000027, the natural numbers. - Gary W. Adamson, Dec 14 2008
[Pickover, p. 226]: "The probability that a number falls in the -1 mailbox turns out to be 3/Pi^2 - the same probability as for falling in the +1 mailbox". - Gary W. Adamson, Aug 13 2009
Let A = A176890 and B = A * A * ... * A, then the leftmost column in matrix B converges to the Moebius function. - Mats Granvik, Gary W. Adamson, Apr 28 2010 and May 28 2020
Equals row sums of triangle A176918. - Gary W. Adamson, Apr 29 2010
Calculate matrix powers: A175992^0 - A175992^1 + A175992^2 - A175992^3 + A175992^4 - ... Then the Mobius function is found in the first column. Compare this to the binomial series for (1+x)^-1 = 1 - x + x^2 - x^3 + x^4 - ... . - Mats Granvik, Gary W. Adamson, Dec 06 2010
From Richard L. Ollerton, May 08 2021: (Start)
Formulas for the numerous OEIS entries involving the Möbius transform (Dirichlet convolution of a(n) and some sequence h(n)) can be derived using the following (n >= 1):
Sum_{d|n} mu(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)), where phi = A000010.
Use of gcd(n,k)*lcm(n,k) = n*k provides further variations. (End)
Formulas for products corresponding to the sums above are also available for sequences f(n) > 0: Product_{d|n} f(n/d)^mu(d) = Product_{k=1..n} f(gcd(n,k))^(mu(n/gcd(n,k))/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(mu(gcd(n,k))/phi(n/gcd(n,k))). - Richard L. Ollerton, Nov 08 2021

Examples

			G.f. = x - x^2 - x^3 - x^5 + x^6 - x^7 + x^10 - x^11 - x^13 + x^14 + x^15 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 24.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 161, #16.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 64-65.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 262 and 287.
  • Clifford A. Pickover, "The Math Book, from Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics", Sterling Publishing, 2009, p. 226. - Gary W. Adamson, Aug 13 2009
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis Volume II. Springer_Verlag 1976.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 98-99.

Crossrefs

Variants of a(n) are A178536, A181434, A181435.
Cf. A059956 (Dgf at s=2), A088453 (Dgf at s=3), A215267 (Dgf at s=4), A343308 (Dgf at s=5).

Programs

  • Axiom
    [moebiusMu(n) for n in 1..100]
    
  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a008683 = mu . snd . unzip . factorise where
    mu [] = 1; mu (1:es) = - mu es; mu (_:es) = 0
    -- Reinhard Zumkeller, Dec 13 2015, Oct 09 2013
    
  • Haskell
    a008683 1 = 1
    a008683 n = - sum [a008683 d | d <- [1..(n-1)], n `mod` d == 0]
    -- Harry Richman, Jun 13 2025
    
  • Magma
    [ MoebiusMu(n) : n in [1..100]];
    
  • Maple
    with(numtheory): A008683 := n->mobius(n);
    with(numtheory): [ seq(mobius(n), n=1..100) ];
    # Note that older versions of Maple define mobius(0) to be -1.
    # This is unwise! Moebius(0) is better left undefined.
    with(numtheory):
    mu:= proc(n::posint) option remember; `if`(n=1, 1,
           -add(mu(d), d=divisors(n) minus {n}))
         end:
    seq(mu(n), n=1..100);  # Alois P. Heinz, Aug 13 2008
  • Mathematica
    Array[ MoebiusMu, 100]
    (* Second program: *)
    m = 100; A[_] = 0;
    Do[A[x_] = x - Sum[A[x^k], {k, 2, m}] + O[x]^m // Normal, {m}];
    CoefficientList[A[x]/x, x] (* Jean-François Alcover, Oct 20 2019, after Ilya Gutkovskiy *)
  • Maxima
    A008683(n):=moebius(n)$ makelist(A008683(n),n,1,30); /* Martin Ettl, Oct 24 2012 */
    
  • PARI
    a=n->if(n<1,0,moebius(n));
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, 1 - X)[n])};
    
  • PARI
    list(n)=my(v=vector(n,i,1)); forprime(p=2, sqrtint(n), forstep(i=p, n, p, v[i]*=-1); forstep(i=p^2, n, p^2, v[i]=0)); forprime(p=sqrtint(n)+1, n, forstep(i=p, n, p, v[i]*=-1)); v \\ Charles R Greathouse IV, Apr 27 2012
    
  • Python
    from sympy import mobius
    print([mobius(i) for i in range(1, 101)])  # Indranil Ghosh, Mar 18 2017
  • Sage
    @cached_function
    def mu(n):
        if n < 2: return n
        return -sum(mu(d) for d in divisors(n)[:-1])
    # Changing the sign of the sum gives the number of ordered factorizations of n A074206.
    print([mu(n) for n in (1..96)])  # Peter Luschny, Dec 26 2016
    

Formula

Sum_{d|n} mu(d) = 1 if n = 1 else 0.
Dirichlet generating function: Sum_{n >= 1} mu(n)/n^s = 1/zeta(s). Also Sum_{n >= 1} mu(n)*x^n/(1-x^n) = x.
In particular, Sum_{n > 0} mu(n)/n = 0. - Franklin T. Adams-Watters, Jun 20 2014
phi(n) = Sum_{d|n} mu(d)*n/d.
a(n) = A091219(A091202(n)).
Multiplicative with a(p^e) = -1 if e = 1; 0 if e > 1. - David W. Wilson, Aug 01 2001
abs(a(n)) = Sum_{d|n} 2^A001221(d)*a(n/d). - Benoit Cloitre, Apr 05 2002
Sum_{d|n} (-1)^(n/d)*mobius(d) = 0 for n > 2. - Emeric Deutsch, Jan 28 2005
a(n) = (-1)^omega(n) * 0^(bigomega(n) - omega(n)) for n > 0, where bigomega(n) and omega(n) are the numbers of prime factors of n with and without repetition (A001222, A001221, A046660). - Reinhard Zumkeller, Apr 05 2003
Dirichlet generating function for the absolute value: zeta(s)/zeta(2s). - Franklin T. Adams-Watters, Sep 11 2005
mu(n) = A129360(n) * (1, -1, 0, 0, 0, ...). - Gary W. Adamson, Apr 17 2007
mu(n) = -Sum_{d < n, d|n} mu(d) if n > 1 and mu(1) = 1. - Alois P. Heinz, Aug 13 2008
a(n) = A174725(n) - A174726(n). - Mats Granvik, Mar 28 2010
a(n) = first column in the matrix inverse of a triangular table with the definition: T(1, 1) = 1, n > 1: T(n, 1) is any number or sequence, k = 2: T(n, 2) = T(n, k-1) - T(n-1, k), k > 2 and n >= k: T(n,k) = (Sum_{i = 1..k-1} T(n-i, k-1)) - (Sum_{i = 1..k-1} T(n-i, k)). - Mats Granvik, Jun 12 2010
Product_{n >= 1} (1-x^n)^(-a(n)/n) = exp(x) (product form of the exponential function). - Joerg Arndt, May 13 2011
a(n) = Sum_{k=1..n, gcd(k,n)=1} exp(2*Pi*i*k/n), the sum over the primitive n-th roots of unity. See the Apostol reference, p. 48, Exercise 14 (b). - Wolfdieter Lang, Jun 13 2011
mu(n) = Sum_{k=1..n} A191898(n,k)*exp(-i*2*Pi*k/n)/n. (conjecture). - Mats Granvik, Nov 20 2011
Sum_{k=1..n} a(k)*floor(n/k) = 1 for n >= 1. - Peter Luschny, Feb 10 2012
a(n) = floor(omega(n)/bigomega(n))*(-1)^omega(n) = floor(A001221(n)/A001222(n))*(-1)^A001221(n). - Enrique Pérez Herrero, Apr 27 2012
Multiplicative with a(p^e) = binomial(1, e) * (-1)^e. - Enrique Pérez Herrero, Jan 19 2013
G.f. A(x) satisfies: x^2/A(x) = Sum_{n>=1} A( x^(2*n)/A(x)^n ). - Paul D. Hanna, Apr 19 2016
a(n) = -A008966(n)*A008836(n)/(-1)^A005361(n) = -floor(rad(n)/n)Lambda(n)/(-1)^tau(n/rad(n)). - Anthony Browne, May 17 2016
a(n) = Kronecker delta of A001221(n) and A001222(n) (which is A008966) multiplied by A008836(n). - Eric Desbiaux, Mar 15 2017
a(n) = A132971(A156552(n)). - Antti Karttunen, May 30 2017
Conjecture: a(n) = Sum_{k>=0} (-1)^(k-1)*binomial(A001222(n)-1, k)*binomial(A001221(n)-1+k, k), for n > 1. Verified for the first 100000 terms. - Mats Granvik, Sep 08 2018
From Peter Bala, Mar 15 2019: (Start)
Sum_{n >= 1} mu(n)*x^n/(1 + x^n) = x - 2*x^2. See, for example, Pólya and Szegő, Part V111, Chap. 1, No. 71.
Sum_{n >= 1} (-1)^(n+1)*mu(n)*x^n/(1 - x^n) = x + 2*(x^2 + x^4 + x^8 + x^16 + ...).
Sum_{n >= 1} (-1)^(n+1)*mu(n)*x^n/(1 + x^n) = x - 2*(x^4 + x^8 + x^16 + x^32 + ...).
Sum_{n >= 1} |mu(n)|*x^n/(1 - x^n) = Sum_{n >= 1} (2^w(n))*x^n, where w(n) is the number of different prime factors of n (Hardy and Wright, Chapter XVI, Theorem 264).
Sum_{n odd} |mu(n)|*x^n/(1 + x^(2*n)) = Sum_{n in S_1} (2^w_1(n))*x^n, where S_1 = {1, 5, 13, 17, 25, 29, ...} is the multiplicative semigroup of positive integers generated by 1 and the primes p = 1 (mod 4), and w_1(n) is the number of different prime factors p = 1 (mod 4) of n.
Sum_{n odd} (-1)^((n-1)/2)*mu(n)*x^n/(1 - x^(2*n)) = Sum_{n in S_3} (2^w_3(n))*x^n, where S_3 = {1, 3, 7, 9, 11, 19, 21, ...} is the multiplicative semigroup of positive integers generated by 1 and the primes p = 3 (mod 4), and where w_3(n) is the number of different prime factors p = 3 (mod 4) of n. (End)
G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, May 11 2019
a(n) = sign(A023900(n)) * [A007947(n) = n] where [] is the Iverson bracket. - I. V. Serov, May 15 2019
a(n) = Sum_{k = 1..n} gcd(k, n)*a(gcd(k, n)) = Sum_{d divides n} a(d)*d*phi(n/d). - Peter Bala, Jan 16 2024

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
Showing 1-10 of 313 results. Next