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.

Previous Showing 11-20 of 473 results. Next

A046951 a(n) is the number of squares dividing n.

Original entry on oeis.org

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

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Rediscovered by the HR automatic theory formation program.
a(n) depends only on prime signature of n (cf. A025487, A046523). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
First differences of A013936. Average value tends towards Pi^2/6 = 1.644934... (A013661, A013679). - Henry Bottomley, Aug 16 2001
We have a(n) = A159631(n) for all n < 125, but a(125) = 2 < 3 = A159631(125). - Steven Finch, Apr 22 2009
Number of 2-generated Abelian groups of order n, if n > 1. - Álvar Ibeas, Dec 22 2014 [In other words, number of order-n abelian groups with rank <= 2. Proof: let b(n) be such number. A finite abelian group is the inner direct product of all Sylow-p subgroups, so {b(n)} is multiplicative. Obviously b(p^e) = floor(e/2)+1 (corresponding to the groups C_(p^r) X C_(p^(e-r)) for 0 <= r <= floor(e/2)), hence b(n) = a(n) for all n. - Jianing Song, Nov 05 2022]
Number of ways of writing n = r*s such that r|s. - Eric M. Schmidt, Jan 08 2015
The number of divisors of the square root of the largest square dividing n. - Amiram Eldar, Jul 07 2020
The number of unordered factorizations of n into cubefree powers of primes (1, primes and squares of primes, A166684). - Amiram Eldar, Jun 12 2025

Examples

			a(16) = 3 because the squares 1, 4, and 16 divide 16.
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + x^10 + ...
		

Crossrefs

One more than A071325.
Differs from A096309 for the first time at n=32, where a(32) = 3, while A096309(32) = 2 (and also A185102(32) = 2).
Sum of the k-th powers of the square divisors of n for k=0..10: this sequence (k=0), A035316 (k=1), A351307 (k=2), A351308 (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Sequences of the form n^k * Sum_{d^2|n} 1/d^k for k = 0..10: this sequence (k=0), A340774 (k=1), A351600 (k=2), A351601 (k=3), A351602 (k=4), A351603 (k=5), A351604 (k=6), A351605 (k=7), A351606 (k=8), A351607 (k=9), A351608 (k=10).
Cf. A082293 (a(n)==2), A082294 (a(n)==3).

Programs

  • Haskell
    a046951 = sum . map a010052 . a027750_row
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Magma
    [#[d: d in Divisors(n)|IsSquare(d)]:n in [1..120]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A046951 := proc(n)
        local a,s;
        a := 1 ;
        for p in ifactors(n)[2] do
            a := a*(1+floor(op(2,p)/2)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 17 2012
    # Alternatively:
    isbidivisible := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = d:
    a := n -> nops(select(k -> isbidivisible(n, k), [seq(1..n)])): # Peter Luschny, Jun 13 2025
  • Mathematica
    a[n_] := Length[ Select[ Divisors[n], IntegerQ[Sqrt[#]]& ] ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 26 2012 *)
    Table[Length[Intersection[Divisors[n], Range[10]^2]], {n, 100}] (* Alonso del Arte, Dec 10 2012 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ DivisorSigma[ 0, d], 2], {d, Divisors @ n}]]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 2, Boole[ n == 1], Times @@ (Quotient[ #[[2]], 2] + 1 & /@ FactorInteger @ n)]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^k^2 / (1 - x^k^2), {k, Sqrt @ n}], {x, 0, n}]]; (* Michael Somos, Jun 13 2014 *)
    f[p_, e_] := 1 + Floor[e/2]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    a(n)=my(f=factor(n));for(i=1,#f[,1],f[i,2]\=2);numdiv(factorback(f)) \\ Charles R Greathouse IV, Dec 11 2012
    
  • PARI
    a(n) = direuler(p=2, n, 1/((1-X^2)*(1-X)))[n]; \\ Michel Marcus, Mar 08 2015
    
  • PARI
    a(n)=factorback(apply(e->e\2+1, factor(n)[,2])) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A046951(n): return prod((e>>1)+1 for e in factorint(n).values()) # Chai Wah Wu, Aug 04 2024
    
  • Python
    def is_bidivisible(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == d
    def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_bidivisible(n, k)]
    print([len(aList(n)) for n in range(1, 126)])  # Peter Luschny, Jun 13 2025
  • Scheme
    (definec (A046951 n) (if (= 1 n) 1 (* (A008619 (A007814 n)) (A046951 (A064989 n)))))
    (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
    ;; Antti Karttunen, Nov 14 2016
    

Formula

a(p^k) = A008619(k) = [k/2] + 1. a(A002110(n)) = 1 for all n. (This is true for any squarefree number, A005117). - Original notes clarified by Antti Karttunen, Nov 14 2016
a(n) = |{(i, j) : i*j = n AND i|j}| = |{(i, j) : i*j^2 = n}|. Also tau(A000188(n)), where tau = A000005.
Multiplicative with p^e --> floor(e/2) + 1, p prime. - Reinhard Zumkeller, May 20 2007
a(A130279(n)) = n and a(m) <> n for m < A130279(n); A008966(n)=0^(a(n) - 1). - Reinhard Zumkeller, May 20 2007
Inverse Moebius transform of characteristic function of squares (A010052). Dirichlet g.f.: zeta(s)*zeta(2s).
G.f.: Sum_{k > 0} x^(k^2)/(1 - x^(k^2)). - Vladeta Jovovic, Dec 13 2002
a(n) = Sum_{k=1..A000005(n)} A010052(A027750(n,k)). - Reinhard Zumkeller, Dec 16 2013
a(n) = Sum_{k = 1..n} ( floor(n/k^2) - floor((n-1)/k^2) ). - Peter Bala, Feb 17 2014
From Antti Karttunen, Nov 14 2016: (Start)
a(1) = 1; for n > 1, a(n) = A008619(A007814(n)) * a(A064989(n)).
a(n) = A278161(A156552(n)). (End)
G.f.: Sum_{k>0}(theta(q^k)-1)/2, where theta(q)=1+2q+2q^4+2q^9+2q^16+... - Mamuka Jibladze, Dec 04 2016
From Antti Karttunen, Nov 12 2017: (Start)
a(n) = A000005(n) - A056595(n).
a(n) = 1 + A071325(n).
a(n) = 1 + A001222(A293515(n)). (End)
L.g.f.: -log(Product_{k>=1} (1 - x^(k^2))^(1/k^2)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
a(n) = Sum_{d|n} A000005(d) * A008836(n/d). - Torlach Rush, Jan 21 2020
a(n) = A000005(sqrt(A008833(n))). - Amiram Eldar, Jul 07 2020
a(n) = Sum_{d divides n} mu(core(d)^2), where core(n) = A007913(n). - Peter Bala, Jan 24 2024

Extensions

Data section filled up to 125 terms and wrong claim deleted from Crossrefs section by Antti Karttunen, Nov 14 2016

A072774 Powers of squarefree numbers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 10 2002

Keywords

Comments

Essentially the same as A062770. - R. J. Mathar, Sep 25 2008
Numbers m such that in canonical prime factorization all prime exponents are identical: A124010(m,k) = A124010(m,1) for k = 2..A000005(m). - Reinhard Zumkeller, Apr 06 2014
Heinz numbers of uniform partitions. An integer partition is uniform if all parts appear with the same multiplicity. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 16 2018

Crossrefs

Complement of A059404.
Cf. A072775, A072776, A072777 (subsequence), A005117, A072778, A124010, A329332 (tabular arrangement), A384667 (characteristic function).
A subsequence of A242414.

Programs

  • Haskell
    import Data.Map (empty, findMin, deleteMin, insert)
    import qualified Data.Map.Lazy as Map (null)
    a072774 n = a072774_list !! (n-1)
    (a072774_list, a072775_list, a072776_list) = unzip3 $
       (1, 1, 1) : f (tail a005117_list) empty where
       f vs'@(v:vs) m
        | Map.null m || xx > v = (v, v, 1) :
                                 f vs (insert (v^2) (v, 2) m)
        | otherwise = (xx, bx, ex) :
                      f vs' (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        where (xx, (bx, ex)) = findMin m
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    isA := n -> n=1 or is(1 = nops({seq(p[2], p in ifactors(n)[2])})):
    select(isA, [seq(1..97)]);  # Peter Luschny, Jun 10 2025
  • Mathematica
    Select[Range[100], Length[Union[FactorInteger[#][[All, 2]]]] == 1 &] (* Geoffrey Critzer, Mar 30 2015 *)
  • PARI
    is(n)=ispower(n,,&n); issquarefree(n) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A072774(n):
        def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
        def f(x): return n-2+x-sum(g(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

a(n) = A072775(n)^A072776(n).
Sum_{n>=1} 1/a(n)^s = 1 + Sum_{k>=1} (zeta(k*s)/zeta(2*k*s)-1) for s > 1. - Amiram Eldar, Mar 20 2025
a(n)/n ~ Pi^2/6 (A013661). - Friedjof Tellkamp, Jun 09 2025

A085548 Decimal expansion of the prime zeta function at 2: Sum_{p prime} 1/p^2.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Jul 03 2003

Keywords

Comments

Mathar's Table 1 (cited below) lists expansions of the prime zeta function at integers s in 10..39. - Jason Kimberley, Jan 05 2017

Examples

			0.4522474200410654985065... = 1/2^2 + 1/3^2 + 1/5^2 +1/7^2 + 1/11^2 + 1/13^2 + ...
		

References

  • Henri Cohen, Number Theory, Volume II: Analytic and Modern Tools, GTM Vol. 240, Springer, 2007; see pp. 208-209.
  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, pp. 94-98.

Crossrefs

Decimal expansion of the prime zeta function: this sequence (at 2), A085541 (at 3), A085964 (at 4) to A085969 (at 9).
Cf. A136271 (derivative), A117543 (semiprimes), A222056, A209329, A124012.

Programs

  • Magma
    R := RealField(106);
    PrimeZeta := func;
    Reverse(IntegerToSequence(Floor(PrimeZeta(2,173)*10^105)));
    // Jason Kimberley, Dec 30 2016
  • Mathematica
    RealDigits[PrimeZetaP[2], 10, 105][[1]]  (* Jean-François Alcover, Jun 24 2011, updated May 06 2021 *)
  • PARI
    recip2(n) = { v=0; p=1; forprime(y=2,n, v=v+1./y^2; ); print(v) }
    
  • PARI
    eps()=my(p=default(realprecision)); precision(2.>>(32*ceil(p*38539962/371253907)),9)
    lm=lambertw(log(4)/eps())\log(4);
    sum(k=1,lm, moebius(k)/k*log(abs(zeta(2*k)))) \\ Charles R Greathouse IV, Jul 19 2013
    
  • PARI
    sumeulerrat(1/p,2) \\ Hugo Pfoertner, Feb 03 2020
    

Formula

P(2) = Sum_{p prime} 1/p^2 = Sum_{n>=1} mobius(n)*log(zeta(2*n))/n. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Jul 06 2003
Equals A085991 + A086032 + 1/4. - R. J. Mathar, Jul 22 2010
Equals Sum_{k>=1} 1/A001248(k). - Amiram Eldar, Jul 27 2020
Equals Sum_{k>=2} pi(k)*(2*k+1)/(k^2*(k+1)^2), where pi(k) = A000720(k) (Shamos, 2011, p. 9). - Amiram Eldar, Mar 12 2024

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Jul 06 2003
Offset corrected by R. J. Mathar, Feb 05 2009

A013664 Decimal expansion of zeta(6).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			1.01734306198444913...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 811.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 262.

Crossrefs

Programs

Formula

Equals Pi^6/945 = A092732/945. - Mohammad K. Azarian, Mar 03 2008
zeta(6) = 8/3*2^6/(2^6 - 1)*( Sum_{n even} n^2*p(n)/(n^2 - 1)^7 ), where p(n) = n^6 + 7*n^4 + 7*n^2 + 1 is a row polynomial of A091043. See A013662, A013666, A013668 and A013670. - Peter Bala, Dec 05 2013
Definition: zeta(6) = Sum_{n >= 1} 1/n^6. - Bruno Berselli, Dec 05 2013
zeta(6) = Sum_{n >= 1} (A010052(n)/n^3). - Mikael Aaltonen, Feb 20 2015
zeta(6) = Sum_{n >= 1} (A010057(n)/n^2). - A.H.M. Smeets, Sep 19 2018
zeta(6) = Product_{k>=1} 1/(1 - 1/prime(k)^6). - Vaclav Kotesovec, May 02 2020
From Wolfdieter Lang, Sep 16 2020: (Start)
zeta(6) = (1/5!)*Integral_{x=0..infinity} x^5/(exp(x) - 1) dx. See Abramowitz-Stegun, 23.2.7., for s=6, p. 807. See also A337710 for the value of the integral.
zeta(6) = (4/465)*Integral_{x=0..infinity} x^5/(exp(x) + 1) dx. See Abramowitz-Stegun, 23.2.8., for s=6, p. 807. The value of the integral is (31/252)*Pi^6 = 118.2661309... . (End)
From Peter Bala, Apr 27 2025: (Start)
zeta(6) = 1/6! * Integral_{x >= 0} x^6 * exp(x)/(exp(x) - 1)^2 dx = 2^5/(2^5 - 1) * 1/6! * Integral_{x >= 0} x^6 * exp(x)/(exp(x) + 1)^2 dx.
zeta(6) = 1/7! * Integral_{x >= 0} x^7 * exp(x)*(exp(x) + 1) /(exp(x) - 1)^3 dx = 2/(3*7*15*31) * Integral_{x >= 0} x^7 * exp(x)*(exp(x) - 1)/(exp(x) + 1)^3 dx. (End)

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

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 03 2002

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

Formula

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

A072691 Decimal expansion of Pi^2/12.

Original entry on oeis.org

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

Views

Author

Rick L. Shepherd, Jul 02 2002

Keywords

Examples

			0.822467033424113218236207583323..
		

References

  • C. C. Clawson, The Beauty and Magic of Numbers. New York: Plenum Press (1996): 98
  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 2.11 p. 126 and section 8.5 p. 501.
  • Jolley, Summation of Series, Dover (1961) eq. (234) page 44.

Crossrefs

Cf. A072692 (Pi^2/12 is in asymptotic formula related to sigma(n), A000203).
Cf. A113319 (sum_{i>=0} 1/(i^2+1)); A232883 (sum_{i>=0} 1/(2*i^2+1)).

Programs

Formula

Equals 1/(1*2) + 1/(2*4) + 1/(3*6) + 1/(4*8) + ... [Jolley]
Equals -dilogarithm(-1). - Rick L. Shepherd, Jul 21 2004
Equals Sum_{n>=1} ((-1)^(n+1))/n^2 [Clawson]. - Alonso del Arte, Aug 15 2012
Equals Integral_{x=0..1} log((1+x^3)/(1-x^3))/x dx. - Bruno Berselli, May 13 2013
From Jean-François Alcover, May 17 2013: (Start)
Equals zeta(2)/2 = A013661/2.
Equals Integral_{x=1..2} log(x)/(x-1) dx. (End)
Equals lim_{n->infinity} A244583(n)/prime(n)^2. See A244583 for details. - Richard R. Forberg, Jan 04 2015
Equals Sum_{k>=1} H(k)/(k*2^k), where H(k) = A001008(k)/A002805(k) is the k-th harmonic number. - Amiram Eldar, Aug 20 2020
Equals Integral_{0..infinity} x/(exp(x) + 1) dx. See Abramowitz-Stegun, 23.2.8, for s=2, p. 801. - Wolfdieter Lang, Sep 16 2020
Equals lim_{n->infinity} A024916(n)/(n^2). - Omar E. Pol, Dec 15 2021
Integral_{x=0..1} -log(x)/(x+1) dx. - Bernard Schott, Apr 25 2022
Equals 1/2 + Sum_{k>=1} H(k)/(k*(k+1)*(k+2)), where H(k) = A001008(k)/A002805(k) is the k-th harmonic number (Bracken, 2023). - Amiram Eldar, Oct 06 2023
Equals Integral_{x >= 0} x^2/cosh(x)^2 dx. - Peter Bala, Jun 20 2024
Equals 1 + (1/8)*Sum_{k >= 0} (-1)^(k-1) * (10*k + 13)/((k + 1)*(2*k + 1)^2*(2*k + 3)^2*binomial(2*k, k)). See Catalan, Section 35, equation 54. - Peter Bala, Aug 17 2024
Equals Integral_{x=0..oo} ((arctan(x) - Pi/4)*log(x^2 + 1))/(x^2) dx. - Kritsada Moomuang, Jun 04 2025

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 19 2001

Keywords

Comments

The density of A268335. - Vladimir Shevelev, Feb 01 2016
The probability that two numbers are coprime given that one of them is coprime to a randomly chosen third number. - Luke Palmer, Apr 27 2019

Examples

			0.7044422009991655927366033503...
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1200; digits = 98; terms = 1200; P[n_] := PrimeZetaP[n]; LR = Join[{0, 0}, LinearRecurrence[{-2, 0, 1}, {-2, 3, -6}, terms + 10]]; r[n_Integer] := LR[[n]]; Exp[NSum[r[n]*P[n - 1]/(n - 1), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits + 10]] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Apr 18 2016 *)
  • PARI
    prodeulerrat(1 - 1/(p*(p+1))) \\ Amiram Eldar, Mar 14 2021

Formula

From Amiram Eldar, Mar 05 2019: (Start)
Equals lim_{m->oo} (2/m^2)*Sum_{k=1..m} rad(k), where rad(k) = A007947(k) is the squarefree kernel of k (Cohen).
Equals lim_{m->oo} (2/m^2)*Sum_{k=1..m} uphi(k), where uphi(k) = A047994(k) is the unitary totient function (Sitaramachandrarao and Suryanarayana).
Equals lim_{m->oo} (1/log(m))*Sum_{k=1..m} 1/psi(k), where psi(k) = A001615(k) is the Dedekind psi function (Sita Ramaiah and Suryanarayana).
(End)
Equals A065473*A013661/A065480. - Luke Palmer, Apr 27 2019
Equals Sum_{k>=1} mu(k)/(k*sigma(k)), where mu is the Möbius function (A008683) and sigma(k) is the sum of divisors of k (A000203). - Amiram Eldar, Jan 14 2022
Equals 1/A065489. - R. J. Mathar, May 27 2025

A005596 Decimal expansion of Artin's constant Product_{p=prime} (1-1/(p^2-p)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

On Simon Plouffe's web page (and in the book freely available at Gutenberg project) the value is given with an error of +1e-31, as "...651641..." instead of "...641641...". In the reference [Wrench, 1961] cited there, these digits are correct. They are also correct on the Plouffe's Inverter page, as computed by Oliveira e Silva, who comments it took 1 hour at 200 MHz with Mathematica. Using Amiram Eldar's PARI program, the same 500 digits are computed instantly (less than 0.1 sec). - M. F. Hasler, Apr 20 2021
Named after the Austrian mathematician Emil Artin (1898-1962). - Amiram Eldar, Jun 20 2021

Examples

			0.37395581361920228805472805434641641511162924860615...
		

References

  • Henri Cohen, Number Theory, Volume II: Analytic and Modern Tools, GTM Vol. 240, Springer, 2007; see pp. 208-209.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 169.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a = Exp[-NSum[ (LucasL[n] - 1)/n PrimeZetaP[n], {n, 2, Infinity}, PrecisionGoal -> 500, WorkingPrecision -> 500, NSumTerms -> 100000]]; RealDigits[a, 10, 111][[1]] (* Robert G. Wilson v, Sep 03 2014 taken from Mathematica's Help file on PrimeZetaP *)
  • PARI
    prodinf(n=2,1/zeta(n)^(sumdiv(n, d, moebius(n/d)*(fibonacci(d-1)+fibonacci(d+1)))/n)) \\ Charles R Greathouse IV, Aug 27 2014
    
  • PARI
    prodeulerrat(1-1/(p^2-p)) \\ Amiram Eldar, Mar 12 2021

Formula

Equals Product_{j>=2} 1/Zeta(j)^A006206(j), where Zeta = A013661, A002117 etc. is Riemann's zeta function. - R. J. Mathar, Feb 14 2009
Equals Sum_{k>=1} mu(k)/(k*phi(k)), where mu is the Moebius function (A008683) and phi is the Euler totient function (A000010). - Amiram Eldar, Mar 11 2020
Equals 1/A065488. - Vaclav Kotesovec, Jul 17 2021

Extensions

More terms from Tomás Oliveira e Silva (http://www.ieeta.pt/~tos)

A018805 Number of elements in the set {(x,y): 1 <= x,y <= n, gcd(x,y)=1}.

Original entry on oeis.org

1, 3, 7, 11, 19, 23, 35, 43, 55, 63, 83, 91, 115, 127, 143, 159, 191, 203, 239, 255, 279, 299, 343, 359, 399, 423, 459, 483, 539, 555, 615, 647, 687, 719, 767, 791, 863, 899, 947, 979, 1059, 1083, 1167, 1207, 1255, 1299, 1391, 1423, 1507, 1547, 1611, 1659, 1763
Offset: 1

Views

Author

Keywords

Comments

Number of positive rational numbers of height at most n, where the height of p/q is max(p, q) when p and q are relatively prime positive integers. - Charles R Greathouse IV, Jul 05 2012
The number of ordered pairs (i,j) with 1<=i<=n, 1<=j<=n, gcd(i,j)=d is a(floor(n/d)). - N. J. A. Sloane, Jul 29 2012
Equals partial sums of A140434 (1, 2, 4, 4, 8, 4, 12, 8, ...) and row sums of triangle A143469. - Gary W. Adamson, Aug 17 2008
Number of distinct solutions to k*x+h=0, where 1 <= k,h <= n. - Giovanni Resta, Jan 08 2013
a(n) is the number of rational numbers which can be constructed from the set of integers between 1 and n, without combination of multiplication and division. a(3) = 7 because {1, 2, 3} can only create {1/3, 1/2, 2/3, 1, 3/2, 2, 3}. - Bernard Schott, Jul 07 2019

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 110-112.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954. See Theorem 332.

Crossrefs

Cf. A177853 (partial sums).
The main diagonal of A331781, also of A333295.

Programs

  • Haskell
    a018805 n = length [()| x <- [1..n], y <- [1..n], gcd x y == 1]
    -- Reinhard Zumkeller, Jan 21 2013
    
  • Magma
    /* based on the first formula */ A018805:=func< n | 2*&+[ EulerPhi(k): k in [1..n] ]-1 >; [ A018805(n): n in [1..60] ]; // Klaus Brockhaus, Jan 27 2011
    
  • Magma
    /* based on the second formula */ A018805:=func< n | n eq 1 select 1 else n^2-&+[ $$(n div j): j in [2..n] ] >; [ A018805(n): n in [1..60] ]; // Klaus Brockhaus, Feb 07 2011
    
  • Maple
    N:= 1000; # to get the first N entries
    P:= Array(1..N,numtheory:-phi);
    A:= map(t -> 2*round(t)-1, Statistics:-CumulativeSum(P));
    convert(A,list); # Robert Israel, Jul 16 2014
  • Mathematica
    FoldList[ Plus, 1, 2 Array[ EulerPhi, 60, 2 ] ] (* Olivier Gérard, Aug 15 1997 *)
    Accumulate[2*EulerPhi[Range[60]]]-1 (* Harvey P. Dale, Oct 21 2013 *)
  • PARI
    a(n)=sum(k=1,n,moebius(k)*(n\k)^2)
    
  • PARI
    A018805(n)=2 *sum(j=1, n, eulerphi(j)) - 1;
    for(n=1, 99, print1(A018805(n), ", ")); /* show terms */
    
  • PARI
    a(n)=my(s); forsquarefree(k=1,n, s+=moebius(k)*(n\k[1])^2); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import sieve
    def A018805(n): return 2*sum(t for t in sieve.totientrange(1,n+1)) - 1 # Chai Wah Wu, Mar 23 2021
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A018805(n): # based on second formula
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A018805(k1)
            j, k1 = j2, n//j2
        return n*(n-1)-c+j # Chai Wah Wu, Mar 24 2021

Formula

a(n) = 2*(Sum_{j=1..n} phi(j)) - 1.
a(n) = n^2 - Sum_{j=2..n} a(floor(n/j)).
a(n) = 2*A015614(n) + 1. - Reinhard Zumkeller, Apr 08 2006
a(n) = 2*A002088(n) - 1. - Hugo van der Sanden, Nov 22 2008
a(n) ~ (1/zeta(2)) * n^2 = (6/Pi^2) * n^2 as n goes to infinity (zeta is the Riemann zeta function, A013661, and the constant 6/Pi^2 is 0.607927..., A059956). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 18 2001
a(n) ~ 6*n^2/Pi^2 + O(n*log n). - N. J. A. Sloane, May 31 2020
a(n) = Sum_{k=1..n} mu(k)*floor(n/k)^2. - Benoit Cloitre, May 11 2003
a(n) = A000290(n) - A100613(n) = A015614(n) + A002088(n). - Reinhard Zumkeller, Jan 21 2013
a(n) = A242114(floor(n/k),1), 1<=k<=n; particularly a(n) = A242114(n,1). - Reinhard Zumkeller, May 04 2014
a(n) = 2 * A005728(n) - 3. - David H Post, Dec 20 2016
a(n) ~ 6*n^2/Pi^2, cf. A059956. [Hardy and Wright] - M. F. Hasler, Jan 20 2017
G.f.: (1/(1 - x)) * (-x + 2 * Sum_{k>=1} mu(k) * x^k / (1 - x^k)^2). - Ilya Gutkovskiy, Feb 14 2020

Extensions

More terms from Reinhard Zumkeller, Apr 08 2006
Link to Moree's paper corrected by Peter Luschny, Aug 08 2009

A007406 Wolstenholme numbers: numerator of Sum_{k=1..n} 1/k^2.

Original entry on oeis.org

1, 5, 49, 205, 5269, 5369, 266681, 1077749, 9778141, 1968329, 239437889, 240505109, 40799043101, 40931552621, 205234915681, 822968714749, 238357395880861, 238820721143261, 86364397717734821, 17299975731542641, 353562301485889, 354019312583809, 187497409728228241
Offset: 1

Views

Author

Keywords

Comments

By Wolstenholme's theorem, p divides a(p-1) for prime p > 3. - T. D. Noe, Sep 05 2002
Also p divides a( (p-1)/2 ) for prime p > 3. - Alexander Adamchuk, Jun 07 2006
The rationals a(n)/A007407(n) converge to Zeta(2) = (Pi^2)/6 = 1.6449340668... (see the decimal expansion A013661).
For the rationals a(n)/A007407(n), n >= 1, see the W. Lang link under A103345 (case k=2).
See the Wolfdieter Lang link under A103345 on Zeta(k, n) with the rationals for k=1..10, g.f.s and polygamma formulas. - Wolfdieter Lang, Dec 03 2013
Denominator of the harmonic mean of the first n squares. - Colin Barker, Nov 13 2014
Conjecture: for n > 3, gcd(n, a(n-1)) = A089026(n). Checked up to n = 10^5. - Amiram Eldar and Thomas Ordowski, Jul 28 2019
True if n is prime, by Wolstenholme's theorem. It remains to show that gcd(n, a(n-1)) = 1 if n > 3 is composite. - Jonathan Sondow, Jul 29 2019
From Peter Bala, Feb 16 2022: (Start)
Sum_{k = 1..n} 1/k^2 = 1 + (1 - 1/2^2)*(n-1)/(n+1) - (1/2^2 - 1/3^2)*(n-1)*(n-2)/((n+1)*(n+2)) + (1/3^2 - 1/4^2)*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) - (1/4^2 - 1/5^2)*(n-1)*(n-2)*(n-3)*(n-4)/((n+1)*(n+2)*(n+3)*(n+4)) + .... Cf. A082687 and A120778.
This identity allows us to extend the definition of Sum_{k = 1..n} 1/k^2 to non-integral values of n. (End)
Numerators of the Eulerian numbers T(-2,k) for k = 0,1..., if T(n,k) is extended to negative n by the recurrence T(n,k) = (k+1)*T(n-1,k) + (n-k)*T(n-1,k-1) (indexed as in A173018). - Michael J. Collins, Oct 10 2024

References

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

Crossrefs

Cf. A001008, A007407 (denominators), A000290, A082687, A120778.
Numbers n such that a(n) is prime are listed in A111354. Primes in {a(n)} are listed in A123751. - Alexander Adamchuk, Oct 11 2006

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a007406 n = a007406_list !! (n-1)
    a007406_list = map numerator $ scanl1 (+) $ map (1 %) $ tail a000290_list
    -- Reinhard Zumkeller, Jul 06 2012
    
  • Magma
    [Numerator(&+[1/k^2:k in [1..n]]):n in [1..23]]; // Marius A. Burtea, Aug 02 2019
  • Maple
    a:= n-> numer(add(1/i^2, i=1..n)): seq(a(n), n=1..24);  # Zerinvary Lajos, Mar 28 2007
  • Mathematica
    a[n_] := If[ n<1, 0, Numerator[HarmonicNumber[n, 2]]]; Table[a[n], {n, 100}]
    Numerator[HarmonicNumber[Range[20],2]] (* Harvey P. Dale, Jul 06 2014 *)
  • PARI
    {a(n) = if( n<1, 0, numerator( sum( k=1, n, 1 / k^2 ) ) )} /* Michael Somos, Jan 16 2011 */
    

Formula

Sum_{k=1..n} 1/k^2 = sqrt(Sum_{j=1..n} Sum_{i=1..n} 1/(i*j)^2). - Alexander Adamchuk, Oct 26 2004
G.f. for rationals a(n)/A007407(n), n >= 1: polylog(2,x)/(1-x).
a(n) = Numerator of (Pi^2)/6 - Zeta(2,n). - Artur Jasinski, Mar 03 2010
Previous Showing 11-20 of 473 results. Next