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

A226033 Round(n * exp(-1 - 1/(2n))), an approximation to the number of daughters to wait before picking in the sultan's dowry problem (Better that A225593).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26
Offset: 1

Views

Author

Keywords

Comments

It is very similar to the sequence A054404, but differs for example at n=97 (see A226082).

Crossrefs

Programs

  • Maple
    A226033 := proc(n)
        round(n/exp(1+1/2/n)) ;
    end proc: # R. J. Mathar, Jun 09 2013
  • Mathematica
    Table[Round[n*E^(-1-1/(2*n))], {n,100}]

A306480 Numbers k such that A054404(k) is not floor(k/e - 1/(2*e) + 1/2).

Original entry on oeis.org

97, 24586, 14122865, 14437880866, 23075113325617, 53123288947296842, 166496860519928411041, 681661051602157413173890, 3532450008306093939076231361, 22600996284275635202947629995722, 174979114331029936735527491233938577, 1612273088535187752419835130130200398626
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that the optimal threshold in the secretary problem with k candidates is not floor(k/e - 1/(2*e) + 1/2).

Examples

			A054404(97)=35 but floor(97/e - 1/(2e) + 1/2) = 36.
		

Crossrefs

Programs

  • Mathematica
    P[r_, n_] := If[r == 0, 1/n, r/n (PolyGamma[0, n] - PolyGamma[0, r])]
    in[n_] := (n - 1/2)/E + 1/2 - (3E - 1)/2/(2 n + 3E - 1) - 1
    su[n_] := n/E - 1/2/E + 1/2
    A054404[n_] := If[P[Floor[su[n]], n] >= P[Ceiling[in[n]], n], Floor[su[n]], Ceiling[in[n]]]
    lista = Select[Range[25000], ! Floor[su[#]] == Ceiling[in[#]] &];
    IS[n_] := If[Floor[su[n]] == Ceiling[in[n]], False, ! (A054404[n] == Floor[su[n]])]
    Select[lista, IS]

Formula

Empirical observation: a(n) = (2*d(6k+3)+1)/2, where d(m) is the denominator of the truncated continued fraction [a_0;a_1,a_2,...,a_m] of 1/e. - Giovanni Corbelli, Jul 23 2021

Extensions

a(4)-a(12) from Jon E. Schoenfield, Feb 28 2019
Showing 1-2 of 2 results.