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

A081573 Decimal expansion of Sum_(1/(2^q-1)) with the summation extending over all pairs of integers gcd(p,q) = 1, 0 < p/q < e = 2.718... .

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Apr 21 2003

Keywords

Examples

			4.866141732...
		

Crossrefs

Cf. A001113 (e).

Programs

  • Mathematica
    With[{digmax = 120}, RealDigits[Sum[1/2^Floor[k/E], {k, 1, 20*digmax}], 10, digmax][[1]]] (* Amiram Eldar, May 25 2023 *)

Formula

Equals Sum_{k>=1} (1/2)^floor(k/e) = Sum_{k>=1} 1/2^A032634(k).

Extensions

Data corrected by Amiram Eldar, May 25 2023

A023124 Signature sequence of 1/e (arrange the numbers i+j*x (i,j >= 1) in increasing order; the sequence of i's is the signature of x).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Arrange the numbers i+j*e (i,j >= 1) in increasing order; this sequence is the sequence of j's. - Michel Marcus, Dec 18 2021
If one deletes the first occurrence of 1, the first occurrence of 2, the first occurrence of 3, etc., then the sequence is unchanged. - Brady J. Garvin, Sep 11 2024
Any signature sequence A is closely related to the partial sums of the corresponding homogeneous Beatty sequence: Let Q(d) = d + the sum from g=0 to g=d-1 of floor(theta * g) and Qinv(i) = the maximum integer d such that Q(d) <= i. If there is some d for which Q(d) = i, then A_i = 1. Otherwise, A_i = A_{i - Qinv(i)} + 1. - Brady J. Garvin, Sep 13 2024

References

  • J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence h) p. 82.
  • Clark Kimberling, "Fractal Sequences and Interspersions", Ars Combinatoria, vol. 45 p 157 1997.

Crossrefs

Programs

  • Mathematica
    Quiet[Block[{$ContextPath}, Needs["Combinatorica`"]], {General::compat}]
    theta = 1 / E;
    sums = {0};
    cached = <||>;
    A023124[i_] := Module[{term, path, base},
      While[sums[[-1]] < i,
        term = sums[[-1]] + Floor[theta * (Length[sums] - 1)] + 1;
        AppendTo[sums, term];
        cached[term] = 1
      ];
      path = {i};
      While[Not[KeyExistsQ[cached, path[[-1]]]],
        AppendTo[path, path[[-1]] - Combinatorica`BinarySearch[sums, path[[-1]]] + 3/2];
      ];
      base = cached[path[[-1]]];
      MapIndexed[(cached[#1] = base + Length[path] - First[#2]) &, path];
      cached[i]
    ];
    Print[Table[A023124[i], {i, 1, 100}]]; (* Brady J. Garvin, Sep 13 2024 *)
  • Python
    from bisect import bisect
    from sympy import floor, E
    theta = 1 / E
    sums = [0]
    cached = {}
    def A023124(i):
        while sums[-1] < i:
            term = sums[-1] + floor(theta * (len(sums) - 1)) + 1
            sums.append(term)
            cached[term] = 1
        path = [i]
        while path[-1] not in cached:
            path.append(path[-1] - bisect(sums, path[-1]) + 1)
        base = cached[path[-1]]
        for offset, vertex in enumerate(reversed(path)):
            cached[vertex] = base + offset
        return cached[i]
    print([A023124(i) for i in range(1, 1001)])  # Brady J. Garvin, Sep 13 2024

A225593 The integer closest to n/e.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A032634 (with floor).

Programs

A062276 a(n) = floor(n^(n+1) / (n+1)^n).

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jul 02 2001

Keywords

Comments

a(n) is close to n/e (cf. A032634).

Examples

			a(2) = floor(2^3/3^2) = floor(8/9) = 0.
		

Crossrefs

Programs

  • GAP
    List([0..90],n->Int(n^(n+1)/(n+1)^n)); # Muniru A Asiru, Jul 01 2018
  • Maple
    seq(floor(n^(n+1)/(n+1)^n),n=0..90); # Muniru A Asiru, Jul 01 2018
  • Mathematica
    Array[Floor[#^(# + 1)/(# + 1)^#] &, 78, 0] (* Michael De Vlieger, Jul 01 2018 *)
  • PARI
    { default(realprecision, 50); for (n=0, 1000, write("b062276.txt", n, " ", floor(n^(n + 1) / (n + 1)^n)) ) } \\ Harry J. Smith, Aug 03 2009
    
Showing 1-4 of 4 results.