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

A073004 Decimal expansion of exp(gamma).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Aug 03 2002

Keywords

Comments

See references and additional links in A094644.
The Riemann hypothesis holds if and only if the inequality sigma(n)/(n*log(log(n))) < exp(gamma) is valid for all n >= 5041, (G. Robin, 1984). - Peter Luschny, Oct 18 2020
From Peter Bala, Aug 24 2025: (Start)
By definition, gamma = lim_{n -> oo} s(n), where s(n) = Sum_{k = 1..n} 1/k - log(n). The convergence is slow. For example, s(50) = 0.5(87...) is only correct to 1 decimal digit. Let S(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(n, k)*binomial(n+k, k)*s(n+k). Elsner shows that S(n) converges to gamma much more rapidly. For example, S(50) = 0.57721566490153286060651209008(02...) gives gamma correct to 29 decimal digits.
Define E(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(n, k)*binomial(n+k, k)*exp(s(n+k)). Then it appears that E(n) converges rapidly to exp(gamma). For example, E(50) = 1.78107241799019798523650410310(43...) gives exp(gamma) correct to 29 decimal digits. Cf. A002389. (End)

Examples

			Exp(gamma) = 1.7810724179901979852365041031071795491696452143034302053...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Sections 1.5.1 and 2.27.2, pp. 31, 187.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 166, 191, 208.

Crossrefs

Cf. A001620 (Euler-Mascheroni constant, gamma).
Cf. A001113, A002389, A067698, A080130, A091901, A094644 (continued fraction for exp(gamma)), A155969, A246499.

Programs

  • Magma
    R:=RealField(100); Exp(EulerGamma(R)); // G. C. Greubel, Aug 27 2018
  • Mathematica
    RealDigits[ E^(EulerGamma), 10, 110] [[1]]
  • PARI
    exp(Euler)
    

Formula

By Mertens theorem, equals lim_{m->infinity}(1/log(prime(m))*Product_{k=1..m} 1/(1-1/prime(k))). - Stanislav Sykora, Nov 14 2014
Equals limsup_{n->oo} sigma(n)/(n*log(log(n))) (Gronwall, 1913). - Amiram Eldar, Nov 07 2020
Equals limsup_{n->oo} (Sum_{d|n} log(d)/d)/(log(log(n)))^2 (Erdős and Zaremba, 1973). - Amiram Eldar, Mar 03 2021
Equals Product_{k>=1} (1-1/(k+1))*exp(1/k). - Amiram Eldar, Mar 20 2022
Equals lim_{n->oo} n * Product_{prime p<=n} p^(1/(1-p)). - Thomas Ordowski, Jan 30 2023
Equals Product_{k>=1} (k/sqrt(2))^((-1)^k/(k*log(2))). - Antonio Graciá Llorente, Oct 11 2024
Equals lim_{n->oo} (1/log(n))*Product_{prime p<=n} p/(p - 1) [Mertens] (see Finch at p. 31). - Stefano Spezia, Oct 27 2024

A007838 Number of permutations of n elements with distinct cycle lengths.

Original entry on oeis.org

1, 1, 1, 5, 14, 74, 474, 3114, 24240, 219456, 2231280, 23753520, 288099360, 3692907360, 51677246880, 775999798560, 12364465397760, 208583679951360, 3770392002048000, 71251563061002240, 1421847102467635200, 29861872557056870400, 655829140087057305600
Offset: 0

Views

Author

Keywords

References

  • D. H. Greene and D. E. Knuth, Mathematics for the Analysis of Algorithms, 2nd ed., Birkhäuser, Boston, 1982.

Crossrefs

Programs

  • Maple
    p := product((1+x^m/m), m=1..100): s := series(p,x,100): for i from 1 to 100 do printf(`%.0f,`,i!*coeff(s,x,i)) od:
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1) +b(n-i, min(i-1, n-i))/i))
        end:
    a:= n-> n!*b(n$2):
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 23 2022
  • Mathematica
    max = 20; p = Product[(1 + x^m/m), {m, 1, max}]; s = Series[p, {x, 0, max}]; CoefficientList[s, x]*Range[0, max]! (* Jean-François Alcover, Oct 05 2011, after Maple *)
  • PARI
    {a(n)=if(n<0, 0, n!*polcoeff( prod(k=1, n, 1+x^k/k, 1+x*O(x^n)), n))} /* Michael Somos, Sep 19 2006 */

Formula

E.g.f.: Product_{m >= 1} (1+x^m/m).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} (-d)^(1-k/d) and a(0) = 1. - Vladeta Jovovic, Oct 13 2002
Asymptotics: a(n) ~ n!(e^{-g} + e^{-g}/n + O((log n)/n^2)), where g is the Euler gamma.
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} (-1)^(k+1)*x^(j*k)/(k*j^k)). - Ilya Gutkovskiy, May 27 2018

Extensions

More terms from James Sellers, Dec 24 1999

A004061 Numbers k such that (5^k - 1)/4 is prime.

Original entry on oeis.org

3, 7, 11, 13, 47, 127, 149, 181, 619, 929, 3407, 10949, 13241, 13873, 16519, 201359, 396413, 1888279, 3300593
Offset: 1

Views

Author

Keywords

Comments

With the addition of the 19th prime in the sequence, the new best linear fit to the sequence has G=0.4723, which is slightly closer to the conjectured limit of G=0.56145948, A080130 (see link for Generalized Repunit Conjecture). - Paul Bourdelais, Apr 30 2018

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 236.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A080130.

Programs

Extensions

a(13)-a(15) from Kamil Duszenko (kdusz(AT)wp.pl), Mar 25 2003
a(16) corresponds to a probable prime based on trial factoring to 4*10^13 and Fermat primality testing base 2. - Paul Bourdelais, Dec 11 2008
a(17) corresponds to a probable prime discovered by Paul Bourdelais, Jun 01 2010
a(18) corresponds to a probable prime discovered by Paul Bourdelais, Apr 30 2018
a(19) corresponds to a probable prime discovered by Ryan Propper, Jan 02 2022

A048855 Number of integers up to n! relatively prime to n!.

Original entry on oeis.org

1, 1, 1, 2, 8, 32, 192, 1152, 9216, 82944, 829440, 8294400, 99532800, 1194393600, 16721510400, 250822656000, 4013162496000, 64210599936000, 1155790798848000, 20804234379264000, 416084687585280000, 8737778439290880000, 192231125664399360000
Offset: 0

Views

Author

Keywords

Comments

Rephrasing the Quet formula: Begin with 1. Then, if n + 1 is prime subtract 1 and multiply. If n+1 is not prime, multiply. Continue writing each product. Thus the sequence would begin 1, 2, 8, . . . . The first product is 1*(2 - 1), second is 1*(3 - 1), and third is 2*4. - Enoch Haga, May 06 2009

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, A Foundation for Computer Science, Addison-Wesley Publ. Co., Reading, MA, 1989, page 134.

Crossrefs

Programs

  • Maple
    with(numtheory):a:=n->phi(n!): seq(a(n), n=0..20); # Zerinvary Lajos, Oct 07 2007
  • Mathematica
    Table[ EulerPhi[ n! ], {n, 0, 21}] (* Robert G. Wilson v, Nov 21 2003 *)
  • PARI
    a(n)=eulerphi(n!) \\ Charles R Greathouse IV, May 12 2011
    
  • Python
    from math import factorial, prod
    from sympy import primerange
    from fractions import Fraction
    def A048855(n): return (factorial(n)*prod(Fraction(p-1,p) for p in primerange(n+1))).numerator # Chai Wah Wu, Jul 06 2022
  • Sage
    [euler_phi(factorial(n)) for n in range(0,21)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = phi(n!) = A000010(n!).
If n is composite, then a(n) = a(n-1)*n. If n is prime, then a(n) = a(n-1)*(n-1). - Leroy Quet, May 24 2007
Under the Riemann Hypothesis, a(n) = n! / (e^gamma * log n) * (1 + O(log n/sqrt(n))). - Charles R Greathouse IV, May 12 2011
Sum_{k=1..n} a(k) = exp(-gamma) * (n!/log(n)) * (1 + O(1/log(n)^3)), where gamma is Euler's constant (A001620) (De Koninck and Verreault, 2024, p. 56, eq. (4.12)). - Amiram Eldar, Dec 10 2024

Extensions

Name changed by Daniel Forgues, Aug 01 2011

A272030 Decimal expansion of C = log(2*Pi) + B_3 (where B_3 is A083343), one of Euler totient constants.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Apr 25 2016

Keywords

Examples

			3.17045934214256636532648824888226302856125443631798948742143398...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 2.7 Euler totient constants, p. 117.

Crossrefs

Programs

  • Mathematica
    digits = 98; B3 = EulerGamma - NSum[PrimeZetaP'[n], {n, 2, Infinity}, WorkingPrecision -> 2 digits, NSumTerms -> 200]; RealDigits[Log[2 Pi] + B3, 10, digits][[1]]

Formula

C = log(2*Pi) + EulerGamma - Sum_{n >= 2} P'(n), where P'(n) is the prime zeta P function derivative.

A322364 Numerator of the sum of inverse products of parts in all partitions of n.

Original entry on oeis.org

1, 1, 3, 11, 7, 27, 581, 4583, 2327, 69761, 775643, 147941, 30601201, 30679433, 10928023, 6516099439, 445868889691, 298288331489, 7327135996801, 1029216937671847, 14361631943741, 837902013393451, 2766939485246012129, 274082602410356881, 835547516381094139939
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2018

Keywords

Examples

			1/1, 1/1, 3/2, 11/6, 7/3, 27/10, 581/180, 4583/1260, 2327/560, 69761/15120, 775643/151200, 147941/26400, 30601201/4989600, 30679433/4633200 ... = A322364/A322365
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
          b(n, i-1) +b(n-i, min(i, n-i))/i)
        end:
    a:= n-> numer(b(n$2)):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0||i==1, 1, b[n, i-1] + b[n-i, Min[i, n-i]]/i];
    a[n_] := Numerator[b[n, n]];
    a /@ Range[0, 30] (* Jean-François Alcover, Apr 29 2020, after Alois P. Heinz *)
  • PARI
    a(n) = {my(s=0); forpart(p=n, s += 1/vecprod(Vec(p))); numerator(s);} \\ Michel Marcus, Apr 29 2020

Formula

Limit_{n-> infinity} a(n)/(n*A322365(n)) = exp(-gamma) = A080130.

A322380 Numerator of the sum of inverse products of parts in all strict partitions of n.

Original entry on oeis.org

1, 1, 1, 5, 7, 37, 79, 173, 101, 127, 1033, 1571, 200069, 2564519, 5126711, 25661369, 532393, 431100529, 1855391, 1533985991, 48977868113, 342880481117, 342289639579, 435979161889, 1308720597671, 373092965489, 7824703695283, 24141028973, 31250466692609
Offset: 0

Views

Author

Alois P. Heinz, Dec 05 2018

Keywords

Comments

a(n)/A322381(n) = A007838(n)/A000142(n) is the probability that a random permutation of [n] has distinct cycle sizes. - Geoffrey Critzer, Feb 23 2022

Examples

			1/1, 1/1, 1/2, 5/6, 7/12, 37/60, 79/120, 173/280, 101/168, 127/210, 1033/1680, 1571/2640, 200069/332640, 2564519/4324320, 5126711/8648640, ... = A322380/A322381
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1) +b(n-i, min(i-1, n-i))/i))
        end:
    a:= n-> numer(b(n$2)):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + b[n - i, Min[i - 1, n - i]]/i]];
    a[n_] := Numerator[b[n, n]];
    a /@ Range[0, 30] (* Jean-François Alcover, Feb 25 2020, after Alois P. Heinz *)

Formula

Limit_{n->infinity} a(n)/A322381(n) = exp(-gamma) = A080130.
Sum_{n>=0} a(n)/A322381(n)*x^n = Product_{i>=1} (1 + x^i/i). - Geoffrey Critzer, Feb 23 2022

A079650 Continued fraction for e^(-gamma).

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 3, 5, 4, 1, 1, 2, 2, 1, 7, 9, 1, 16, 1, 1, 1, 2, 6, 1, 2, 1, 6, 2, 59, 1, 1, 1, 3, 3, 3, 2, 1, 3, 5, 100, 1, 58, 1, 2, 1, 94, 1, 1, 2, 2, 10, 1, 2, 7, 1, 3, 4, 5, 3, 10, 1, 21, 1, 11, 1, 4, 1, 2, 2, 1, 2, 2, 1, 8, 3, 2, 1, 1, 6, 1, 2, 2, 1, 38, 2, 1, 4, 1, 3, 1, 1, 5, 3, 1, 52, 1, 2, 2
Offset: 0

Views

Author

Neil Fernandez, Jan 22 2003

Keywords

Comments

Same as A094644 except this number begins with a 0. - T. D. Noe, Jun 18 2012

Examples

			e^(-gamma) = 0.561... = 0 + 1/(1+ 1/ (1 +1/(3+...))), so sequence begins 0, 1, 1, 3,...
		

Crossrefs

Cf. A080130 (exp(-gamma)), A094644.

Programs

  • Mathematica
    ContinuedFraction[Exp[-EulerGamma], 100] (* Paolo Xausa, Aug 07 2024 *)
  • PARI
    contfrac(exp(-Euler)) \\ Michel Marcus, Oct 13 2019

Extensions

Offset changed by Andrew Howroyd, Aug 07 2024

A096987 Numerator of Sum_{k=1..n} 1/H(k), where H(k) = Sum_{j=1..k} 1/j is the k-th harmonic number.

Original entry on oeis.org

0, 1, 5, 73, 2221, 353777, 19595573, 239046803, 198972350083, 1535302297058707, 100536661265514127, 8974880059175708288297, 818810519369821323965929237, 990666575600755815615137883006341, 1220749860499992165560973207703210595953
Offset: 0

Views

Author

Leroy Quet, Aug 19 2004

Keywords

Examples

			1/1 + 1/(1 + 1/2) + 1/(1 + 1/2 + 1/3) = 73/33, so a(3) = 73.
		

Crossrefs

Cf. A124432 (denominators), A000720, A001008, A002805, A001620, A080130.

Programs

  • Mathematica
    f[n_] := Numerator[ Sum[ 1/HarmonicNumber[j], {j, 1, n}]]; Table[ f[n], {n, 0, 14}] (* Robert G. Wilson v, Aug 21 2004 *)
  • PARI
    m=13;for(n=0,m,print1(numerator(sum(k=1,n,1/sum(j=1,k,1/j))),",")) \\ Klaus Brockhaus, Aug 21 2004

Formula

From Thomas Ordowski, Mar 21 2023: (Start)
Sum_{k=1..n} 1/H(k) ~ Sum_{k=2..n} 1/log(k) ~ Integral_{2..n} dx/log(x) = Li(n).
Sum_{k=1..n} 1/H(k) = Sum_{k=1..n} 1/(log(k + 1/2) + gamma) - C + o(1), where gamma = A001620 = 0.577... is Euler's constant and the constant C = 0.0229825...
Sum_{k=1..n} 1/H(k) = exp(-gamma)*(Ei(log(n) + gamma) - 1) + o(1), where Ei(x) is the exponential integral function of real x, and we have Ei(log(x)) = li(x).
Note that a(n)/A124432(n) ~ pi(n) = A000720(n), see my first formula.
Sum_{k=1..n} 1/H(k) = n/(H(n) - 1 + ...) = n/(log(n) + gamma - 1 + O(1/log(n))).
Theorem: lim_{n->oo} (H(n) - n / Sum_{k=1..n} 1/H(k)) = 1, see my third formula.
Proof: since Integral dx / (log(x) + gamma) = exp(-gamma)*Ei(log(x) + gamma) + c, so we get lim_{n->oo} (log(n) + gamma - n*exp(gamma) / Ei(log(n) + gamma)) = 1, qed. (End)

Extensions

More terms from Klaus Brockhaus and Robert G. Wilson v, Aug 21 2004

A227242 Decimal expansion of (e^gamma - 1)/e^gamma.

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, Oct 19 2013

Keywords

Comments

The value is equal to lim_{n->oo} (Sum_{d|n#, d>n} 1/phi(d))/(Sum_{d|n#} 1/phi(d)).

Examples

			(exp(gamma) - 1)/exp(gamma) = 0.438540516433114830175856785....
		

Crossrefs

Programs

  • Magma
    E:=EulerGamma(RealField(105)); Reverse(Intseq(Floor(10^105*(Exp(E)-1)/Exp(E))));
    
  • Maple
    evalf(1-exp(-gamma), 120);  # Alois P. Heinz, Feb 24 2022
  • Mathematica
    RealDigits[(E^EulerGamma - 1)/E^EulerGamma, 10, 50][[1]] (* G. C. Greubel, Oct 02 2017 *)
  • PARI
    default(realprecision, 105); x=10*(exp(Euler)-1)/exp(Euler); for(n=1, 105, d=floor(x); x=(x-d)*10; print1(d, ", "));

Formula

From Alois P. Heinz, Feb 24 2022: (Start)
Equals 1 - exp(-gamma) = 1 - A080130.
Equals lim_{n->oo} A351901(n)/A000142(n). (End)
Showing 1-10 of 32 results. Next