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

A136122 Integer log of (numerator of convergent to E / denominator of convergent to E) = A001414(A007676/A007677) = A001414(A007676)-A001414(A007677).

Original entry on oeis.org

2, 3, 3, 7, 12, 22, 39, 122, 48, 5, 879, 837, 12864, 31082, 16125, 12468, 1048203, -18599, 31975, -10373904, 8012, -21693, -1788161, -508374, -1326713, -281258, 78675955, 563498273327, 551589853, 2233965, 34039922629, -2425388265169, 325756512, -5767155, -781377548147642
Offset: 0

Views

Author

Carlos Alves, Dec 16 2007

Keywords

Comments

The integer log of a fraction p/q is A001414(p) - A001414(q).

Programs

  • Mathematica
    (* Substitute Pi for E in A136121. *)

A003417 Continued fraction for e.

Original entry on oeis.org

2, 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, 1, 1, 12, 1, 1, 14, 1, 1, 16, 1, 1, 18, 1, 1, 20, 1, 1, 22, 1, 1, 24, 1, 1, 26, 1, 1, 28, 1, 1, 30, 1, 1, 32, 1, 1, 34, 1, 1, 36, 1, 1, 38, 1, 1, 40, 1, 1, 42, 1, 1, 44, 1, 1, 46, 1, 1, 48, 1, 1, 50, 1, 1, 52, 1, 1, 54, 1, 1, 56, 1, 1, 58, 1, 1, 60, 1, 1, 62, 1, 1, 64, 1, 1, 66
Offset: 0

Views

Author

Keywords

Comments

This is also the Engel expansion for 3*exp(1/2)/2 - 1/2. - Gerald McGarvey, Aug 07 2004
Sorted with duplicate terms dropped, this is A004277, 1 together with the positive even numbers. - Alonso del Arte, Jan 27 2012
From Peter Bala, Nov 26 2019: (Start)
Related continued fractions expansions:
2*e = [5; 2, 3, 2, 3, 1, 2, 1, 3, 4, 3, 1, 4, 1, 3, 6, 3, 1, 6, ..., 1, 3, 2*n, 3, 1, 2*n, ...].
(1/2)*e = [1; 2, 1, 3, 1, 1, 1, 3, 3, 3, 1, 3, 1, 3, 5, 3, 1, 5, 1, 3, 7, 3, 1, 7, ..., 1, 3, 2*n + 1, 3, 1, 2*n + 1, ...].
4*e = [10, 1, 6, 1, 7, 2, 7, 2, 7, 1, 1, 1, 7, 3, 7, 1, 2, 1, 7, 4, 7, 1, 3, 1, 7, 5, 7, 1, 4, ..., 1, 7, n+1, 7, 1, n, ...].
(1/4)*e = [0, 1, 2, 8, 3, 1, 1, 1, 1, 7, 1, 1, 2, 1, 1, 1, 2, 7, 1, 2, 2, 1, 1, 1, 3, 7, 1, 3, 2, 1, 1, 1, 4, 7, 1, 4, 2, ..., 1, 1, 1, n, 7, 1, n, 2, ...]. (End)

Examples

			2.718281828459... = 2 + 1/(1 + 1/(2 + 1/(1 + 1/(1 + ...))))
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 88.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.3.2.
  • Jay R. Goldman, The Queen of Mathematics, 1998, p. 70.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    numtheory[cfrac](exp(1),100,'quotients'); # Jani Melik, May 25 2006
    A003417:=(2+z+2*z**2-3*z**3-z**4+z**6)/(z-1)**2/(z**2+z+1)**2; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    ContinuedFraction[E, 100] (* Stefan Steinerberger, Apr 07 2006 *)
    a[n_] := KroneckerDelta[1, n] + 2 n/3 - (2 n - 3)/3 DirichletCharacter[3, 1, n]; Table[a[n], {n, 1, 20}] (* Enrique Pérez Herrero, Feb 23 2013 *)
    Table[Piecewise[{{2, n == 0}, {2 (n + 1)/3, Mod[n, 3] == 2}}, 1], {n, 0, 120}] (* Eric W. Weisstein, Jan 05 2019 *)
    Join[{2}, LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 2, 1, 1, 4, 1}, 120]] (* Eric W. Weisstein, Jan 05 2019 *)
    Join[{2}, Table[(2 (n + 4) + (1 - 2 n) Cos[2 n Pi/3] + Sqrt[3] (1 - 2 n) Sin[2 n Pi/3])/9, {n, 120}]] (* Eric W. Weisstein, Jan 05 2019 *)
    Join[{2}, Flatten[Table[{1, 2n, 1}, {n, 40}]]] (* Harvey P. Dale, Jan 21 2020 *)
  • PARI
    contfrac(exp(1)) \\ Alexander R. Povolotsky, Feb 23 2008
    
  • PARI
    { allocatemem(932245000); default(realprecision, 25000); x=contfrac(exp(1)); for (n=1, 10000, write("b003417.txt", n-1, " ", x[n])); } \\ Harry J. Smith, Apr 14 2009
    
  • PARI
    A003417(n)=if(n%3<>2,1+(n==0),(n+1)/3*2) \\ M. F. Hasler, May 01 2013
    
  • Python
    def A003417(n): return 2 if n == 0 else 1 if n % 3 != 2 else (n+1)//3<<1 # Chai Wah Wu, Jul 27 2022
  • Scala
    def eContFracTrio(n: Int): List[Int] = List(1, 2 * n, 1)
    2 +: ((1 to 40).map(eContFracTrio).flatten) // Alonso del Arte, Nov 22 2020, with thanks to Harvey P. Dale
    

Formula

From Paul Barry, Jun 27 2006: (Start)
G.f.: (2 + x + 2*x^2 - 3*x^3 - x^4 + x^6)/(1 - 2*x^3 + x^6).
a(n) = 0^n + Sum{k = 0..n} 2*sin(2*Pi*(k - 1)/3)*floor((2*k - 1)/3)/sqrt(3). [Corrected and simplified by Jianing Song, Jan 05 2019] (End)
a(n) = 2*a(n-3) - a(n-6), n >= 7. - Philippe Deléham, Feb 10 2009
G.f.: 1 + U(0) where U(k)= 1 + x/(1 - x*(2*k + 1)/(1 + x*(2*k + 1) - 1/((2*k + 1) + 1 - (2*k + 1)*x/(x + 1/U(k+1))))); (continued fraction, 5-step). - Sergei N. Gladkovskii, Oct 07 2012
a(3*n-1) = 2*n, a(0) = 2, a(n) = 1 otherwise (i.e., for n+1 > 1, not a multiple of 3). - M. F. Hasler, May 01 2013
E.g.f.: First derivative of (2/9)*exp(x)*(x + 3) + (2/9)*exp(-x/2)*(2*x*cos((sqrt(3)/2)*x+2*Pi/3) - 3*cos((sqrt(3)/2)*x)) + x. - Jianing Song, Jan 05 2019
a(n) = floor(1/(n+1))-(floor(n/3)-floor((n+1)/3))*(2*n-1)/3+1. - Aaron J Grech, Sep 06 2024
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - log(2)/2. - Amiram Eldar, May 03 2025

Extensions

Offset changed by Andrew Howroyd, Aug 07 2024

A007677 Denominators of convergents to e.

Original entry on oeis.org

1, 1, 3, 4, 7, 32, 39, 71, 465, 536, 1001, 8544, 9545, 18089, 190435, 208524, 398959, 4996032, 5394991, 10391023, 150869313, 161260336, 312129649, 5155334720, 5467464369, 10622799089, 196677847971, 207300647060, 403978495031, 8286870547680, 8690849042711
Offset: 0

Views

Author

Keywords

Comments

Same as A113874 without its first two terms. - Jonathan Sondow, Aug 16 2006

Examples

			2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, 2721/1001, 23225/8544, 25946/9545, 49171/18089, 517656/190435, 566827/208524, 1084483/398959, 13580623/4996032, 14665106/5394991, 28245729/10391023, 410105312/150869313, 438351041/161260336, 848456353/312129649, ...
		

References

  • CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 88.
  • W. J. LeVeque, Fundamentals of Number Theory. Addison-Wesley, Reading, MA, 1977, p. 240.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007676 (numerators of convergents to e).
Cf. A003417 (continued fraction of e).

Programs

  • Maple
    Digits := 60: E := exp(1); convert(evalf(E),confrac,50,'cvgts'): cvgts;
  • Mathematica
    Denominator[Convergents[E, 40]] (* T. D. Noe, Oct 12 2011 *)
    Denominator[Table[Piecewise[{
       {Hypergeometric1F1[-1 - n/3, -1 - (2 n)/3, 1]/Hypergeometric1F1[-(n/3), -1 - (2 n)/3, -1], Mod[n, 3] == 0},
       {Hypergeometric1F1[1/3 (-2 - n), -(2/3) (2 + n), 1]/Hypergeometric1F1[1/3 (-2 - n), -(2/3) (2 + n), -1], Mod[n, 3] == 1},
       {Hypergeometric1F1[1/3 (-1 - n), 1 - (2 (4 + n))/3, 1]/Hypergeometric1F1[1/3 (-4 - n), 1 - (2 (4 + n))/3, -1], Mod[n, 3] == 2}
    }], {n, 0, 30}]] (* Eric W. Weisstein, Sep 09 2013 *)
    Table[Piecewise[{
        {(1 + (2 n)/3)!/(n/3)! Hypergeometric1F1[-(n/3), -1 - (2 n)/3, -1], Mod[n, 3] == 0},
        {((2 (2 + n))/3)!/((2 + n)/3)! Hypergeometric1F1[1/3 (-2 - n), -(2/3) (2 + n), -1], Mod[n, 3] == 1},
        {((4 + n) (5/3 + (2 n)/3)! )/(3 ((4 + n)/3)!) Hypergeometric1F1[1/3 (-4 - n), 1 - (2 (4 + n))/3, -1], Mod[n, 3] == 2}
    }], {n, 0, 30}]  (* Eric W. Weisstein, Sep 10 2013 *)

A143382 Numerator of Sum_{k=0..n} 1/k!!.

Original entry on oeis.org

1, 2, 5, 17, 71, 121, 731, 1711, 41099, 370019, 740101, 2713789, 1206137, 423355111, 846710651, 1814380259, 203210595443, 12654139763, 531473870981, 43758015399281, 525096184837561, 441080795274037, 22054039763790029
Offset: 0

Views

Author

Jonathan Vos Post, Aug 11 2008

Keywords

Comments

Denominators are A143383. A143382(n)/A143383(n) is to A007676(n)/A007676(n) as double factorials are to factorials. A143382/A143383 fractions begin:
n numerator/denominator
0 1/0!! = 1/1
1 1/0!! + 1/1!! = 2/1
2 1/0!! + 1/1!! + 1/2!! = 5/2
3 1/0!! + 1/1!! + 1/2!! + 1/3!! = 17/6
4 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! = 71/24
5 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! + 1/5!! = 121/40
6 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! + 1/5!! + 1/6!! = 731/240
The series converges to sqrt(e) + sqrt((e*Pi)/2)*erf(1/sqrt(2)) = 3.0594074053425761445... whose decimal expansion is given by A143280. The analogs of A094007 and A094008 are determined by 2 being the only prime denominator in the convergents to the sum of reciprocals of double factorials and prime numerators beginning: a(1) = 2, a(2) = 5, a(3) = 17, a(4) = 71, a(15) = 1814380259, a(19) = 43758015399281, a(21) = 441080795274037, a(23) = 867081905243923.

Examples

			a(3) = 17 because 1/0!! + 1/1!! + 1/2!! + 1/3!! = 17/6.
a(15) = 1814380259 because 1814380259/593049600 = 1/1 + 1/1 + 1/2 + 1/3 + 1/8 + 1/15 + 1/48 + 1/105 + 1/384 + 1/945 + 1/3840 + 1/10395 + 1/46080 + 1/135135 + 1/645120 + 1/2027025.
		

Crossrefs

Cf. A006882 (n!!), A094007, A143280 (m(2)), A143383 (denominators).

Programs

  • Magma
    [n le 0 select 1 else Numerator( 1 + (&+[ 1/(0 + (&*[k-2*j: j in [0..Floor((k-1)/2)]])) : k in [1..n]]) ): n in [0..25]]; // G. C. Greubel, Mar 28 2019
    
  • Mathematica
    Table[Numerator[Sum[1/k!!, {k, 0, n}]], {n, 0, 30}] (* G. C. Greubel, Mar 28 2019 *)
    Accumulate[1/Range[0,30]!!]//Numerator (* Harvey P. Dale, May 19 2023 *)
  • PARI
    vector(25, n, n--; numerator(sum(k=0,n, 1/prod(j=0,floor((k-1)/2), (k - 2*j)) ))) \\ G. C. Greubel, Mar 28 2019
    
  • Sage
    [numerator(sum( 1/product((k - 2*j) for j in (0..floor((k-1)/2)))   for k in (0..n))) for n in (0..25)] # G. C. Greubel, Mar 28 2019

Formula

Numerators of Sum_{k=0..n} 1/k!! = Sum_{k=0..n} 1/A006882(k).

A143383 Denominator of Sum_{k=0..n} 1/k!!.

Original entry on oeis.org

1, 1, 2, 6, 24, 40, 240, 560, 13440, 120960, 241920, 887040, 394240, 138378240, 276756480, 593049600, 66421555200, 4136140800, 173717913600, 14302774886400, 171633298636800, 144171970854912, 7208598542745600, 283414985441280
Offset: 0

Views

Author

Jonathan Vos Post, Aug 11 2008

Keywords

Comments

Numerators are A143382. A143382(n)/A143383(n) is to A007676(n)/A007676(n) as double factorials are to factorials. A143382/A143383 fractions begin:
n numerator/denominator
0 1/0!! = 1/1
1 1/0!! + 1/1!! = 2/1
2 1/0!! + 1/1!! + 1/2!! = 5/2
3 1/0!! + 1/1!! + 1/2!! + 1/3!! = 17/6
4 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! = 71/24
5 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! + 1/5!! = 121/40
6 1/0!! + 1/1!! + 1/2!! + 1/3!! + 1/4!! + 1/5!! + 1/6!! = 731/240
The series converges to sqrt(e) + sqrt((e*Pi)/2)*erf(1/sqrt(2)) = 3.0594074053425761445... whose decimal expansion is given by A143280. The analogs of A094007 and A094008 are determined by 2 being the only prime denominator in the convergents to the sum of reciprocals of double factorials and prime numerators beginning: a(1) = 2, a(2) = 5, a(3) = 17, a(4) = 71, a(15) = 1814380259, a(19) = 43758015399281, a(21) = 441080795274037, a(23) = 867081905243923.

Examples

			a(3) = 6 because 1/0!! + 1/1!! + 1/2!! + 1/3!! = 17/6.
a(15) = 593049600 because 1814380259/593049600 = 1/1 + 1/1 + 1/2 + 1/3 + 1/8 + 1/15 + 1/48 + 1/105 + 1/384 + 1/945 + 1/3840 + 1/10395 + 1/46080 + 1/135135 + 1/645120 + 1/2027025.
		

Crossrefs

Cf. A006882 (n!!), A094007, A143280 (m(2)), A143382 (numerator).

Programs

  • Magma
    [n le 0 select 1 else Denominator( 1 + (&+[ 1/(0 + (&*[k-2*j: j in [0..Floor((k-1)/2)]])) : k in [1..n]]) ): n in [0..25]]; // G. C. Greubel, Mar 28 2019
    
  • Mathematica
    Table[Denominator[Sum[1/k!!, {k,0,n}]], {n,0,25}] (* G. C. Greubel, Mar 28 2019 *)
  • PARI
    vector(25, n, n--; denominator(sum(k=0,n, 1/prod(j=0,floor((k-1)/2), (k - 2*j)) ))) \\ G. C. Greubel, Mar 28 2019
    
  • Sage
    [denominator(sum(1/product((k-2*j) for j in (0..floor((k-1)/2))) for k in (0..n))) for n in (0..25)] # G. C. Greubel, Mar 28 2019

Formula

Denominators of Sum_{k=0..n} 1/k!! = Sum_{k=0..n} 1/A006882(k).

A138366 Count of post-period decimal digits up to which the rounded n-th convergent to exp(1) agrees with the exact value.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 12, 12, 13, 14, 16, 15, 16, 19, 18, 20, 22, 22, 24, 25, 25, 26, 27, 28, 30, 32, 32, 32, 35, 36, 36, 39, 39, 41, 43, 43, 44, 46, 46, 48, 50, 50, 52, 52, 54, 56, 57, 58, 59, 61, 61, 63, 65, 64, 67, 69, 69, 71, 72, 73, 74, 77, 77, 79, 80, 81, 83
Offset: 1

Views

Author

Artur Jasinski, Mar 17 2008

Keywords

Comments

This is a measure of the quality of the n-th convergent to E = A001113 if the convergent and the exact value are compared rounded to an increasing number of digits.
The sequence of rounded values of exp(1) is 3, 2.7, 2.72, 2.718, 2.7183, 2.71828, 2.718282, 2.7182818 etc, and the n-th convergent (provided by A007676 and A007677) is to be represented by its equivalent sequence.
a(n) represents the maximum number of post-period digits of the two sequences if compared at the same level of rounding. Counting only post-period digits (which is one less than the full number of decimal digits) is just a convention taken from A084407.

Examples

			For n=6, the 6th convergent is 106/39 = 2.7179487.., with a sequence of rounded representations 3, 2.7, 2.72, 2.718, 2.7179, 2.71795, 2.717949, etc.
Rounded to 1, 2, or 3 post-period decimal digits, this is the same as the rounded version of the exact E, but disagrees if both are rounded to 4 decimal digits, where 2.7183 <> 2.7179.
So a(6) = 3 (digits), the maximum rounding level of agreement.
		

Crossrefs

Extensions

Definition and values replaced as defined via continued fractions by R. J. Mathar, Oct 01 2009

A368617 Decimal expansion of 878/323.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

Using the criterion of the minimum absolute difference, it is the closest rational approximation of e (cf. A001113) using integers below 1000 (see Maor).
The numerator and the denominator of 878/323 are palindromes in base 10 (cf. A002113).
It has period 144.

Examples

			2.7182662538699690402476780...
		

References

  • Eli Maor, e: The Story of a Number. Princeton, New Jersey: Princeton University Press (1994), p. 37.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 46.

Crossrefs

Programs

  • Mathematica
    Flatten[First[RealDigits[878/323,10]]]

Formula

Equals A368618(3)/A368619(3) = A368620(3)/A368621(3).

A368618 a(n) is the n-digit numerator of the fraction h/k with h and k coprime palindrome positive integers at which abs(h/k-e) is minimal.

Original entry on oeis.org

3, 11, 878, 2552, 38983, 167761, 4407044, 24988942, 882646288, 1385885831, 83034443038, 161356653161, 9051164611509, 24911822811942
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

a(3) = 878 corresponds to the numerator of A368617.

Examples

			  n              fraction    approximated value
  -   -------------------    ------------------
  1                   3/1    3
  2                  11/4    2.75
  3               878/323    2.7182662538699...
  4              2552/939    2.7177848775292...
  5           38983/14341    2.7182902168607...
  6          167761/61716    2.7182740294251...
  7       4407044/1621261    2.7182816338640...
  8      24988942/9192919    2.7182815382143...
  9   882646288/324707423    2.7182818299783...
  ...
		

Crossrefs

Cf. A001113, A002113, A070252, A368617, A368619 (denominator), A368658.
Cf. A364844 (similar for Pi), A368620, A368621.

Programs

  • Mathematica
    a[1]=3; a[n_]:=Module[{minim = Infinity}, h = Select[Range[10^(n - 1), 10^n - 1], PalindromeQ]; lh = Length[h]; For[i = 1, i <= lh, i++, k = Select[Range[Floor[Part[h, i]/E], Ceiling[Part[h, i]/E]], PalindromeQ]; lk = Length[k]; For[j = 1, j <= lk, j++, If[(dist = Abs[Part[h, i]/Part[k, j] - E]) < minim && GCD[Part[h, i], Part[k, j]] == 1, minim = dist; hmin = Part[h, i]]]]; hmin]; Array[a,9]
  • PARI
    \\ See PARI program in Links

Extensions

a(10)-a(14) from David A. Corneth, Jan 03 2024

A079940 Greedy fractional multiples of 1/e: a(1)=1, Sum_{n>0} frac(a(n)/e) = 1.

Original entry on oeis.org

1, 3, 4, 11, 87, 193, 386, 579, 1457, 23225, 49171, 98342, 147513, 196684, 566827, 13580623, 28245729, 56491458, 84737187, 112982916, 438351041, 466596770, 494842499
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy fractional multiple of x is the smallest integer m that does not cause Sum_{k=1..n} frac(m*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of 1/e.
After a(20), there is only 109305220 - 297122396/e = ~1.06317354345346734...*10^-8 to work with.

Examples

			a(4) = 11 since frac(1x) + frac(3x) + frac(4x) + frac(11x) < 1, while frac(1x) + frac(3x) + frac(4x) + frac(k*x) > 1 for all k>4 and k<11.
		

Crossrefs

Cf. A007676 (numerators of convergents to e), A079934, A079939, A079941.

Programs

  • Maple
    Digits := 100: a := []: s := 0: x := 1.0/exp(1.0): for n from 1 to 1000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, ps = Plus @@ Table[ FractionalPart[ a[i]*E^-1], {i, n - 1}]}, While[ ps + FractionalPart[k*E^-1] > 1, k++ ]; a[n] = k]; Do[ Print[ a[n]], {n, 20}] (* Robert G. Wilson v, Nov 03 2004 *)

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 30 2003
a(16)-a(20) from Robert G. Wilson v, Nov 03 2004
a(21)-a(23) from Sean A. Irvine, Aug 30 2025

A368619 a(n) is the n-digit denominator of the fraction h/k with h and k coprime palindrome positive integers at which abs(h/k-e) is minimal.

Original entry on oeis.org

1, 4, 323, 939, 14341, 61716, 1621261, 9192919, 324707423, 509838905, 30546664503, 59359795395, 3329737379233, 9164547454619
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

a(3) = 323 corresponds to the denominator of A368617.

Examples

			  n              fraction    approximated value
  -   -------------------    ------------------
  1                   3/1    3
  2                  11/4    2.75
  3               878/323    2.7182662538699...
  4              2552/939    2.7177848775292...
  5           38983/14341    2.7182902168607...
  6          167761/61716    2.7182740294251...
  7       4407044/1621261    2.7182816338640...
  8      24988942/9192919    2.7182815382143...
  9   882646288/324707423    2.7182818299783...
  ...
		

Crossrefs

Cf. A364845 (similar for Pi), A368620, A368621.

Programs

  • Mathematica
    a[1]=1; a[n_]:=Module[{minim = Infinity}, h = Select[Range[10^(n - 1), 10^n - 1], PalindromeQ]; lh = Length[h]; For[i = 1, i <= lh, i++, k = Select[Range[Floor[Part[h, i]/E], Ceiling[Part[h, i]/E]], PalindromeQ]; lk = Length[k]; For[j = 1, j <= lk, j++, If[(dist = Abs[Part[h, i]/Part[k, j] - E]) < minim && GCD[Part[h, i], Part[k, j]] == 1, minim = dist; kmin = Part[k, j]]]]; kmin]; Array[a,9]
  • PARI
    \\ See PARI program in Links

Extensions

a(10)-a(14) from David A. Corneth, Jan 03 2024
Showing 1-10 of 27 results. Next