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

A030059 Numbers that are the product of an odd number of distinct primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 42, 43, 47, 53, 59, 61, 66, 67, 70, 71, 73, 78, 79, 83, 89, 97, 101, 102, 103, 105, 107, 109, 110, 113, 114, 127, 130, 131, 137, 138, 139, 149, 151, 154, 157, 163, 165, 167, 170, 173, 174, 179, 181, 182, 186, 190, 191, 193
Offset: 1

Views

Author

Keywords

Comments

From Enrique Pérez Herrero, Jul 06 2012: (Start)
This sequence and A030229 partition the squarefree numbers: A005117.
Also solutions to the equation mu(n) = -1.
Sum_{n>=1} 1/a(n)^s = (zeta(s)^2 - zeta(2*s))/(2*zeta(s)*zeta(2*s)). (End) [See A088245 and the Hardy reference. - Wolfdieter Lang, Oct 18 2016]
The lexicographically least sequence of integers > 1 such that for each entry, the number of proper divisors occurring in the sequence is equal to 0 modulo 3. - Masahiko Shin, Feb 12 2018
The asymptotic density of this sequence is 3/Pi^2 (A104141). - Amiram Eldar, May 22 2020
Solutions to the equation Sum_{d|n} mu(d)*sigma(d) = -n, where sigma(n) is the sum of divisors function (A000203). - Robert D. Rosales, May 20 2024

References

  • B. C. Berndt & R. A. Rankin, Ramanujan: Letters and Commentary, see p. 23; AMS Providence RI 1995.
  • G. H. Hardy, Ramanujan, AMS Chelsea Publishing, 2002, pp. 64 - 65, (misprint on p. 65, line starting with Hence: it should be ... -1/Zeta(s) not ... -Zeta(s)).
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962, p. xxiv, 21.

Crossrefs

Programs

  • Maple
    a := n -> `if`(numtheory[mobius](n)=-1,n,NULL); seq(a(i),i=1..193); # Peter Luschny, May 04 2009
    # alternative
    A030059 := proc(n)
        option remember;
        local a;
        if n = 1 then
            2;
        else
            for a from procname(n-1)+1 do
                if numtheory[mobius](a) = -1 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Sep 22 2020
  • Mathematica
    Select[Range[300], MoebiusMu[#] == -1 &] (* Enrique Pérez Herrero, Jul 06 2012 *)
  • PARI
    is(n)=my(f=factor(n)[,2]); #f%2 && vecmax(f)==1 \\ Charles R Greathouse IV, Oct 16 2015
    
  • PARI
    is(n)=moebius(n)==-1 \\ Charles R Greathouse IV, Jan 31 2017
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A030059(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-primepi(x)-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(3,x.bit_length(),2)))
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024

Formula

omega(a(n)) = A001221(a(n)) gives A005408. {primes A000040} UNION {sphenic numbers A007304} UNION {numbers that are divisible by exactly 5 different primes A051270} UNION {products of 7 distinct primes (squarefree 7-almost primes) A123321} UNION {products of 9 distinct primes; also n has exactly 9 distinct prime factors and n is squarefree A115343} UNION.... - Jonathan Vos Post, Oct 19 2007
a(n) < n*Pi^2/3 infinitely often; a(n) > n*Pi^2/3 infinitely often. - Charles R Greathouse IV, Sep 07 2017

Extensions

More terms from David W. Wilson

A115343 Products of 9 distinct primes.

Original entry on oeis.org

223092870, 281291010, 300690390, 340510170, 358888530, 363993630, 380570190, 397687290, 406816410, 417086670, 434444010, 455885430, 458948490, 481410930, 485555070, 497668710, 504894390, 512942430, 514083570, 531990690, 538047510, 547777230, 551861310
Offset: 1

Views

Author

Jonathan Vos Post, Mar 06 2006

Keywords

Examples

			514083570 is in the sequence as it is equal to 2*3*5*7*11*13*17*19*53.
		

Crossrefs

Programs

  • Maple
    N:= 10^9: # to get all terms < N
    n0:= mul(ithprime(i),i=1..8):
    Primes:= select(isprime,[$1..floor(N/n0)]):
    nPrimes:= nops(Primes):
    for i from 1 to 9 do
      for j from 1 to nPrimes do
        M[i,j]:= convert(Primes[1..min(j,i)],`*`);
    od od:
    A:= {}:
    for i9 from 9 to nPrimes do
      m9:= Primes[i9];
    for i8 in select(t -> M[7,t-1]*Primes[t]*m9 <= N, [$8..i9-1]) do
      m8:= m9*Primes[i8];
    for i7 in select(t -> M[6,t-1]*Primes[t]*m8 <= N, [$7..i8-1]) do
      m7:= m8*Primes[i7];
    for i6 in select(t -> M[5,t-1]*Primes[t]*m7 <= N, [$6..i7-1]) do
      m6:= m7*Primes[i6];
    for i5 in select(t -> M[4,t-1]*Primes[t]*m6 <= N, [$5..i6-1]) do
      m5:= m6*Primes[i5];
    for i4 in select(t -> M[3,t-1]*Primes[t]*m5 <= N, [$4..i5-1]) do
      m4:= m5*Primes[i4];
    for i3 in select(t -> M[2,t-1]*Primes[t]*m4 <= N, [$3..i4-1]) do
      m3:= m4*Primes[i3];
    for i2 in select(t -> M[1,t-1]*Primes[t]*m3 <= N, [$2..i3-1]) do
      m2:= m3*Primes[i2];
    for i1 in select(t -> Primes[t]*m2 <= N, [$1..i2-1]) do
      A:= A union {m2*Primes[i1]};
    od od od od od od od od od:
    A; # Robert Israel, Sep 02 2014
  • Mathematica
    Module[{n=6*10^8,k},k=PrimePi[n/Times@@Prime[Range[8]]];Select[ Union[ Times@@@ Subsets[Prime[Range[k]],{9}]],#<=n&]](* Harvey P. Dale with suggestions from Jean-François Alcover, Sep 03 2014 *)
    n = 10^9; n0 = Times @@ Prime[Range[8]]; primes = Select[Range[Floor[n/n0]], PrimeQ]; nPrimes = Length[primes]; Do[M[i, j] = Times @@ primes[[1 ;; Min[j, i]]], {i, 1, 9}, {j, 1, nPrimes}]; A = {};
    Do[m9 = primes[[i9]];
    Do[m8 = m9*primes[[i8]];
    Do[m7 = m8*primes[[i7]];
    Do[m6 = m7*primes[[i6]];
    Do[m5 = m6*primes[[i5]];
    Do[m4 = m5*primes[[i4]];
    Do[m3 = m4*primes[[i3]];
    Do[m2 = m3*primes[[i2]];
    Do[A = A ~Union~ {m2*primes[[i1]]},
    {i1, Select[Range[1, i2-1], primes[[#]]*m2 <= n &]}],
    {i2, Select[Range[2, i3-1], M[1, #-1]*primes[[#]]*m3 <= n &]}],
    {i3, Select[Range[3, i4-1], M[2, #-1]*primes[[#]]*m4 <= n &]}],
    {i4, Select[Range[4, i5-1], M[3, #-1]*primes[[#]]*m5 <= n &]}],
    {i5, Select[Range[5, i6-1], M[4, #-1]*primes[[#]]*m6 <= n &]}],
    {i6, Select[Range[6, i7-1], M[5, #-1]*primes[[#]]*m7 <= n &]}],
    {i7, Select[Range[7, i8-1], M[6, #-1]*primes[[#]]*m8 <= n &]}],
    {i8, Select[Range[8, i9-1], M[7, #-1]*primes[[#]]*m9 <= n &]}],
    {i9, 9, nPrimes}];
    A (* Jean-François Alcover, Sep 03 2014, translated and adapted from Robert Israel's Maple program *)
  • PARI
    is(n)=omega(n)==9 && bigomega(n)==9 \\ Hugo Pfoertner, Dec 18 2018
  • Python
    from operator import mul
    from functools import reduce
    from sympy import nextprime, sieve
    from itertools import combinations
    n = 190
    m = 9699690*nextprime(n-1)
    A115343 = []
    for x in combinations(sieve.primerange(1,n),9):
        y = reduce(mul,(d for d in x))
        if y < m:
            A115343.append(y)
    A115343 = sorted(A115343) # Chai Wah Wu, Sep 02 2014
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A115343(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,9)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 31 2024
    

Extensions

Corrected and extended by Don Reble, Mar 09 2006
More terms and corrected b-file from Chai Wah Wu, Sep 02 2014

A176655 Numbers that are divisible by exactly 7 distinct primes.

Original entry on oeis.org

510510, 570570, 690690, 746130, 870870, 881790, 903210, 930930, 1009470, 1021020, 1067430, 1111110, 1138830, 1141140, 1193010, 1217370, 1231230, 1272810, 1291290, 1345890, 1360590, 1381380, 1385670, 1411410, 1438710
Offset: 1

Views

Author

Keywords

Examples

			1711710 = 2 * 3^2 * 5 * 7 * 11 * 13 * 19.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[9!,5*9! ],Length[FactorInteger[ # ]]==7&]
    Select[Range[144*10^4],PrimeNu[#]==7&] (* Harvey P. Dale, Jul 05 2022 *)
  • PARI
    isA176655(n)=omega(n)==7 \\ Charles R Greathouse IV, Mar 11 2011
    
  • PARI
    (PARI) A246655(lim)=my(v=List(primes([2,lim\=1]))); for(e=2,logint(lim,2), forprime(p=2,sqrtnint(lim,e), listput(v,p^e))); Set(v)
    list(lim,pr=7)=if(pr==1, return(A246655(lim))); my(v=List(),pr1=pr-1,mx=prod(i=1,pr1,prime(i))); forprime(p=prime(pr),lim\mx, my(u=list(lim\p,pr1)); for(i=1,#u,listput(v,p*u[i]))); Set(v) \\ Charles R Greathouse IV, Feb 03 2023

A123322 Products of 8 distinct primes (squarefree 8-almost primes).

Original entry on oeis.org

9699690, 11741730, 13123110, 14804790, 15825810, 16546530, 17160990, 17687670, 18888870, 20030010, 20281170, 20930910, 21111090, 21411390, 21637770, 21951930, 23130030, 23393370, 23993970, 24534510, 25555530, 25571910
Offset: 1

Views

Author

Rick L. Shepherd, Sep 25 2006

Keywords

Comments

Intersection of A005117 and A046310.

Examples

			a(1) = 9699690 = 2*3*5*7*11*13*17*19 = A002110(8).
		

Crossrefs

Cf. A001221, A001222, A005117, A046310, A048692, Squarefree k-almost primes: A000040 (k=1), A006881 (k=2), A007304 (k=3), A046386 (k=4), A046387 (k=5), A067885 (k=6), A123321 (k=7), A115343 (k=9).

Programs

  • Maple
    N:= 3*10^7: # to get all terms  <= N
    pmax:= floor(N/mul(ithprime(i),i=1..7)):
    Primes:= select(isprime,[2,seq(i,i=3..pmax,2)]):
    sort(select(`<`,map(convert,combinat:-choose(Primes,8),`*`),N)); # Robert Israel, Dec 18 2018
  • Mathematica
    f8Q[n_]:=Last/@FactorInteger[n]=={1, 1, 1, 1, 1, 1, 1, 1}; lst={};Do[If[f8Q[n], AppendTo[lst, n]], {n, 10!, 11!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 26 2008 *)
    Take[ Sort[ Times @@@ Subsets[ Prime@ Range@ 15, {8}]], 22] (* Robert G. Wilson v, Dec 18 2018 *)
  • PARI
    is(n)=issquarefree(n)&&omega(n)==8 \\ Charles R Greathouse IV, Feb 01 2017, corrected (following an observation from Zak Seidov) by M. F. Hasler, Dec 19 2018
    
  • PARI
    is(n) = my(f = factor(n)); omega(f) == 8 && bigomega(f) == 8 \\ David A. Corneth, Dec 18 2018
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A123322(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,8)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 31 2024

Extensions

Edited by Robert Israel, Dec 18 2018

A340316 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where row n is the increasing list of all squarefree numbers with n primes.

Original entry on oeis.org

2, 3, 6, 5, 10, 30, 7, 14, 42, 210, 11, 15, 66, 330, 2310, 13, 21, 70, 390, 2730, 30030, 17, 22, 78, 462, 3570, 39270, 510510, 19, 26, 102, 510, 3990, 43890, 570570, 9699690, 23, 33, 105, 546, 4290, 46410, 690690, 11741730, 223092870
Offset: 1

Views

Author

Peter Dolland, Jan 04 2021

Keywords

Comments

This is a permutation of all squarefree numbers > 1.

Examples

			First six rows and columns:
      2     3     5     7    11    13
      6    10    14    15    21    22
     30    42    66    70    78   102
    210   330   390   462   510   546
   2310  2730  3570  3990  4290  4830
  30030 39270 43890 46410 51870 53130
		

Crossrefs

Cf. A005117 (squarefree numbers), A072047 (number of prime factors), A340313 (indexing), A078840 (all natural numbers, not only squarefree).
Columns k=1..2: A002110, A306237.
Main diagonal gives A340467.
Cf. A358677.

Programs

  • Haskell
    a340316 n k = a340316_row n !! (k-1)
    a340316_row n = [a005117_list !! k | k <- [0..], a072047_list !! k == n]
    
  • Python
    from math import prod, isqrt
    from sympy import prime, primerange, integer_nthroot, primepi
    def A340316_T(n,k):
        if n == 1: return prime(k)
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(k+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 31 2024

Formula

A(A072047(n), A340313(n)) = A005117(n) for n > 1.

A046397 Palindromes which are the product of exactly 7 distinct primes.

Original entry on oeis.org

22444422, 24266242, 26588562, 35888853, 36399363, 43777734, 47199174, 51066015, 53588535, 53888835, 55233255, 59911995, 60066006, 62588526, 62700726, 62888826, 81699618, 87788778, 89433498, 122434221, 202040202
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

The original name "Palindromes with exactly 7 distinct prime factors" did not exclude that one or more of the factors occurred to a higher power: this is sequence A373467. As the listed data show, terms of this sequence must be squarefree. - M. F. Hasler, Jun 06 2024

Examples

			The first two palindromes with 7 distinct prime factors are 20522502 = 2 * 3^2 * 7 * 11 * 13 * 17 * 67 and 21033012 = 2^2 * 3 * 7 * 11 * 13 * 17 * 103, but these are excluded since one of the prime factors occurs to a higher power.
a(1) = 22444422 = 2 * 3 * 7 * 11 * 13 * 37 * 101, which is squarefree, is therefore the first term of this sequence.
		

Crossrefs

Cf. A046333 (similar but prime factors counted with multiplicity), A373467 (similar but counting just the distinct prime divisors).
Cf. A002113 (palindromes), A123321 (products of 7 distinct primes), A176655 (numbers with omega = 7 distinct prime divisors).

Programs

  • Maple
    digrev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(n) local F;
      F:= ifactors(n)[2];
      nops(F) = 7 and map(t -> t[2],F)=[1$7]
    end proc:
    Res:= NULL:
    count:= 0:
    for d from 2  while count < 100 do
      if d::even then
        m:= d/2;
        for n from 10^(m-1) to 10^m-1 while count < 100 do
          v:= n*10^m+digrev(n);
          if filter(v) then count:= count+1; Res:= Res, v; fi;
        od;
      else
        m:= (d-1)/2;
        for n from 10^(m-1) to 10^m-1 while count < 100 do
          for y from 0 to 9 while count < 100 do
             v:= n*10^(m+1)+y*10^m+digrev(n);
             if filter(v) then count:= count+1; Res:= Res, v; fi;
        od od
      fi
    od:
    Res; # Robert Israel, Jan 20 2020
  • PARI
    A046397_upto(N, start=vecprod(primes(7)), num_fact=7)={ my(L=List()); is_A002113(start)&& start--; while(N >= start = nxt_A002113(start), omega(start)==num_fact && issquarefree(start) && listput(L, start)); L} \\ M. F. Hasler, Jun 06 2024

A078329 Primes p such that mu(p+1)=-1, where mu denotes the moebius function.

Original entry on oeis.org

2, 29, 41, 101, 109, 113, 137, 173, 181, 229, 257, 281, 317, 353, 373, 401, 409, 433, 601, 617, 641, 653, 677, 709, 761, 821, 829, 853, 937, 941, 977, 1009, 1021, 1033, 1069, 1117, 1129, 1181, 1193, 1297, 1361, 1373, 1433, 1489, 1597, 1613, 1669, 1697
Offset: 1

Views

Author

Shyam Sunder Gupta, Nov 21 2002

Keywords

Comments

Contains primes followed by primes (i.e., the 2), primes followed by sphenic numbers (A007304), or followed by elements of A046387, A123321, A115343 etc. - R. J. Mathar, Aug 14 2019
Primes followed by numbers that are the product of an odd number of distinct primes (A030059). - Joerg Arndt, Aug 14 2019

Examples

			29 is in the sequence because 29 is prime and mu(30)=-1.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[300]],MoebiusMu[#+1]==-1&] (* Harvey P. Dale, Feb 28 2013 *)

A340467 a(n) is the n-th squarefree number having n prime factors.

Original entry on oeis.org

2, 10, 66, 462, 4290, 53130, 903210, 17687670, 406816410, 11125544430, 338431883790, 11833068917670, 457077357006270, 20384767656323070, 955041577211912190, 49230430891074322890, 2740956243836856315270, 168909608387276001835590, 11054926927790884163355330
Offset: 1

Views

Author

Alois P. Heinz, Jan 08 2021

Keywords

Comments

a(n) is the n-th product of n distinct primes.
All terms are even.
This sequence differs from A073329 which has also nonsquarefree terms.

Examples

			a(1) = A000040(1) = 2.
a(2) = A006881(2) = 10.
a(3) = A007304(3) = 66.
a(4) = A046386(4) = 462.
a(5) = A046387(5) = 4290.
a(6) = A067885(6) = 53130.
a(7) = A123321(7) = 903210.
a(8) = A123322(8) = 17687670.
a(9) = A115343(9) = 406816410.
a(10) = A281222(10) = 11125544430.
		

Crossrefs

Programs

  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A340467(n):
        if n == 1: return 2
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 31 2024

Formula

a(n) = A340316(n,n).
a(n) = A005117(m) <=> A072047(m) = n = A340313(m).
A001221(a(n)) = A001222(a(n)) = n.
a(n) < A070826(n+1), the least odd number with exactly n distinct prime divisors.

A373467 Palindromes with exactly 7 (distinct) prime divisors.

Original entry on oeis.org

20522502, 21033012, 22444422, 23555532, 24266242, 25777752, 26588562, 35888853, 36399363, 41555514, 41855814, 42066024, 43477434, 43777734, 44888844, 45999954, 47199174, 51066015, 51666615, 52777725, 53588535, 53888835, 55233255, 59911995, 60066006, 60366306, 61777716, 62588526, 62700726
Offset: 1

Views

Author

M. F. Hasler, Jun 06 2024

Keywords

Examples

			Obviously all terms must be palindromic; let us consider the prime factorization:
a(1) = 20522502 = 2 * 3^2 * 7 * 11 * 13 * 17 * 67 has exactly 7 distinct prime divisors, although the factor 3 appears twice in the factorization. (Without the second factor 3 the number would not be palindromic.)
a(2) = 21033012 = 2^2 * 3 * 7 * 11 * 13 * 17 * 103 has exactly 7 distinct prime divisors, although the factor 2 appears twice in the factorization. (Without the second factor 2 the number would not be palindromic.)
a(3) = 22444422 = 2 * 3 * 7 * 11 * 13 * 37 * 101 is the product of 7 distinct primes (cf. A123321), hence the first squarefree term of this sequence.
		

Crossrefs

Cf. A046333 (same with bigomega = 7: counting prime factors with multiplicity), A046397 (same but only squarefree terms), A373465 (same with omega = 5), A046396 (same with omega = 6).
Cf. A002113 (palindromes), A176655 (omega(.) = 7), A123321 (products of 7 distinct primes).

Programs

  • PARI
    A373467_upto(N, start=vecprod(primes(7)), num_fact=7)={ my(L=List()); while(N >= start = nxt_A002113(start), omega(start)==num_fact && listput(L, start)); L}

Formula

Intersection of A002113 and A176655.
Showing 1-10 of 13 results. Next