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-7 of 7 results.

A340818 Numerators of a sequence of fractions converging to A340820, the asymptotic density of numbers whose excess of prime divisors (A046660) is even (A162644).

Original entry on oeis.org

5, 7, 41, 3, 197, 229, 5827, 277, 1157, 8382, 268049, 94175911, 964941119, 1929224113, 31529606831, 835346466959, 3398377571053, 52665885581009, 119955940157647877, 34063199364211668943, 315047077264055066629, 199089493729235251718903, 47411489829747180146759
Offset: 1

Views

Author

Amiram Eldar, Jan 22 2021

Keywords

Comments

Let Omega_n(k) be the number of prime divisors of k not exceeding prime(n) counted with multiplicity, and omega_n(k) the number of distinct prime divisors of k not exceeding prime(n). Then, f(n) = a(n)/A340819(n) is the asymptotic density of numbers k such that Omega_n(k) == omega_n(k) (mod 2).
Equivalently, f(n) is the asymptotic density of numbers k such that A046660(d_n(k)) is even, where d_n(k) is the largest prime(n)-smooth divisor of k.

Examples

			The sequence of fractions begins with 5/6, 7/9, 41/54, 3/4, 197/264, 229/308, 5827/7854, 277/374, 1157/1564, 8382/11339, ...
For n=1, Omega_2(k)-omega_2(k) is even for either odd k (A005408), or even k whose binary representation ends in an odd number of zeros (A036554). The disjoint union of these 2 sequences has an asymptotic density 1/2 + 1/3 = 5/6.
		

Crossrefs

Cf. A005408, A036554, A046660, A162644, A340819 (denominators), A340820.

Programs

  • Mathematica
    d[p_] := 1/(p*(p + 1)); delta[n_] := delta[n] = d[Prime[n]]; f[0] = 1; f[n_] := f[n] = f[n - 1] * (1 - delta[n]) + (1 - f[n - 1]) * delta[n]; Numerator @ Array[f, 30]

Formula

Let delta(n) = 1/(prime(n)*(prime(n)+1)) be the asymptotic density of numbers whose prime(n)-adic valuation is positive and even. Let f(0) = 1. Then, f(n) = f(n-1)*(1 - delta(n)) + (1 - f(n))*delta(n).
Limit_{n->oo} f(n) = 0.73584... (A340820).

A340819 Denominators of a sequence of fractions converging to A340820, the asymptotic density of numbers whose excess of prime divisors (A046660) is even (A162644).

Original entry on oeis.org

6, 9, 54, 4, 264, 308, 7854, 374, 1564, 11339, 362848, 127541072, 1307295988, 2614591976, 42742894912, 1132686715168, 4608863185856, 71437379380768, 162734350229389504, 46216555465146619136, 427503138052606227008, 270181983249247135469056, 64347502466822129824768
Offset: 1

Views

Author

Amiram Eldar, Jan 22 2021

Keywords

Comments

See A340818 for details.

Crossrefs

Cf. A046660, A162644, A340818 (numerators), A340820.

Programs

  • Mathematica
    d[p_] := 1/(p*(p + 1)); delta[n_] := delta[n] = d[Prime[n]]; f[0] = 1; f[n_] := f[n] = f[n - 1] * (1 - delta[n]) + (1 - f[n - 1]) * delta[n]; Denominator @ Array[f, 30]

A036537 Numbers whose number of divisors is a power of 2.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 93, 94, 95, 97, 101, 102
Offset: 1

Views

Author

Keywords

Comments

Primes and A030513(d(x)=4) are subsets; d(16k+4) and d(16k+12) have the form 3Q, so x=16k+4 or 16k-4 numbers are missing.
A number m is a term if and only if all its divisors are infinitary, or A000005(m) = A037445(m). - Vladimir Shevelev, Feb 23 2017
All exponents in the prime number factorization of a(n) have the form 2^k-1, k >= 1. So it is an S-exponential sequence (see Shevelev link) with S={2^k-1}. Using Theorem 1, we obtain that a(n) ~ C*n, where C = Product((1-1/p)*(1 + Sum_{i>=1} 1/p^(2^i-1))). - Vladimir Shevelev Feb 27 2017
This constant is C = 0.687827... . - Peter J. C. Moses, Feb 27 2017
From Peter Munn, Jun 18 2022: (Start)
1 and numbers j*m^2, j squarefree, m >= 1, such that all prime divisors of m divide j, and m is in the sequence.
Equivalently, the nonempty set of numbers whose squarefree part (A007913) and squarefree kernel (A007947) are equal, and whose square part's square root (A000188) is in the set.
(End)

Examples

			383, 384, 385, 386 have 2, 16, 8, 4 divisors, respectively, so they are consecutive terms of this sequence.
		

Crossrefs

A005117, A030513, A058891, A175496, A336591 are subsequences.
Complement of A162643; subsequence of A002035. - Reinhard Zumkeller, Jul 08 2009
Subsequence of A162644, A337533.
The closure of the squarefree numbers under application of A355038(.) and lcm.

Programs

  • Haskell
    a036537 n = a036537_list !! (n-1)
    a036537_list = filter ((== 1) . a209229 . a000005) [1..]
    -- Reinhard Zumkeller, Nov 15 2012
    
  • Mathematica
    bi[ x_ ] := 1-Sign[ N[ Log[ 2, x ], 5 ]-Floor[ N[ Log[ 2, x ], 5 ] ] ]; ld[ x_ ] := Length[ Divisors[ x ] ]; Flatten[ Position[ Table[ bi[ ld[ x ] ], {x, 1, m} ], 1 ] ]
    Select[Range[110],IntegerQ[Log[2,DivisorSigma[0,#]]]&] (* Harvey P. Dale, Nov 20 2016 *)
  • PARI
    is(n)=n=numdiv(n);n>>valuation(n,2)==1 \\ Charles R Greathouse IV, Mar 27 2013
    
  • PARI
    isok(m) = issquarefree(m) || (omega(m) == omega(core(m)) && isok(core(m,1)[2])); \\ Peter Munn, Jun 18 2022
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A036537_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:all(map(lambda m:not((k:=m+1)&-k)^k,factorint(n).values())),count(max(startvalue,1)))
    A036537_list = list(islice(A036537_gen(),30)) # Chai Wah Wu, Jan 04 2023

Formula

A209229(A000005(a(n))) = 1. - Reinhard Zumkeller, Nov 15 2012
a(n) << n. - Charles R Greathouse IV, Feb 25 2017
m is in the sequence iff for k >= 0, A352780(m, k+1) | A352780(m, k)^2. - Peter Munn, Jun 18 2022

A002035 Numbers that contain primes to odd powers only.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 93, 94, 95, 96, 97, 101
Offset: 1

Views

Author

Keywords

Comments

Complement of the union of {1} and A072587. - Reinhard Zumkeller, Nov 15 2012, corrected version from Jun 23 2002
A036537 is a subsequence and this sequence is a subsequence of A162644. - Reinhard Zumkeller, Jul 08 2009
The asymptotic density of this sequence is A065463. - Amiram Eldar, Sep 18 2022

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002035 n = a002035_list !! (n-1)
    a002035_list = filter (all odd . a124010_row) [1..]
    -- Reinhard Zumkeller, Nov 14 2012
    
  • Maple
    isA002035 := proc(n)
        local pe;
        for pe in ifactors(n)[2] do
            if type(pe[2],'even') then
                return false;
            end if;
        end do:
        true ;
    end proc:
    A002035 := proc(n)
        option remember;
        if n =1 then
            2;
        else
            for a from procname(n-1)+1 do
                if isA002035(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A002035(n),n=1..100) ; # R. J. Mathar, Nov 27 2017
  • Mathematica
    ok[n_] := And @@ OddQ /@ FactorInteger[n][[All, 2]];
    Select[Range[2, 101], ok]
    (* Jean-François Alcover, Apr 22 2011 *)
    Select[Range[2,110],AllTrue[FactorInteger[#][[All,2]],OddQ]&] (* Harvey P. Dale, Nov 02 2022 *)
  • PARI
    is(n)=Set(factor(n)[,2]%2)==[1] \\ Charles R Greathouse IV, Feb 07 2017

Extensions

More terms from Reinhard Zumkeller, Jun 23 2002

A162511 Multiplicative function with a(p^e) = (-1)^(e-1).

Original entry on oeis.org

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

Views

Author

Gerard P. Michon, Jul 05 2009

Keywords

Crossrefs

Programs

  • Maple
    A162511 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := a*(-1)^(op(2,f)-1) ;
        end do:
        return a;
    end proc: # R. J. Mathar, May 20 2017
  • Mathematica
    a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]); Array[a, 100] (* Jean-François Alcover, Apr 24 2017, after Reinhard Zumkeller *)
  • PARI
    a(n)=my(f=factor(n)[,2]); prod(i=1,#f,-(-1)^f[i]) \\ Charles R Greathouse IV, Mar 09 2015
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [(-1)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A162511(n): return -1 if reduce(lambda a,b:~(a^b), factorint(n).values(),0)&1 else 1 # Chai Wah Wu, Jan 01 2023

Formula

Multiplicative function with a(p^e)=(-1)^(e-1) for any prime p and any positive exponent e.
a(n) = 1 when n is a squarefree number (A005117).
From Reinhard Zumkeller, Jul 08 2009 (Start)
a(n) = (-1)^(A001222(n)-A001221(n)).
a(A162644(n)) = +1; a(A162645(n)) = -1. (End)
a(n) = A076479(n) * A008836(n). - R. J. Mathar, Mar 30 2011
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A307868. - Amiram Eldar, Sep 18 2022
Dirichlet g.f.: Product_{p prime} ((p^s + 2)/(p^s + 1)). - Amiram Eldar, Oct 26 2023

A162645 Numbers m such that A162511(m) = -1.

Original entry on oeis.org

4, 9, 12, 16, 18, 20, 25, 28, 44, 45, 48, 49, 50, 52, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 90, 92, 98, 99, 108, 112, 116, 117, 121, 124, 126, 132, 140, 147, 148, 150, 153, 156, 162, 164, 169, 171, 172, 175, 176, 188, 192, 198, 200, 204, 207, 208, 212, 220, 228
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2009

Keywords

Comments

Numbers n where A001222(n)-A001221(n) is odd. - Enrique Pérez Herrero, Jul 07 2012
This sequence has an asymptotic density (1 - A065472/zeta(2))/2 = 0.264159... (Mossinghoff and Trudgian, 2019). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A162644.
Subsequence of A072587.

Programs

A340820 Decimal expansion of (1 + Product_{p prime} (1 - 2/(p*(p+1))))/2.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jan 22 2021

Keywords

Comments

The asymptotic density of numbers k such that A046660(k) is even (A162644).
Detrey et al. (2016) calculated 1000 decimal digits of this constant.

Examples

			0.735840306806498934037617816540241043712963191003493...
		

Crossrefs

Programs

  • PARI
    (prodeulerrat(1 - 2/(p*(p+1))) + 1)/2

Formula

Equals (1 + A065472/zeta(2))/2.
Equals lim_{n->oo} A340818(n)/A340819(n).
Showing 1-7 of 7 results.