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

A054385 Beatty sequence for e/(e-1); complement of A022843.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 37, 39, 41, 42, 44, 45, 47, 49, 50, 52, 53, 55, 56, 58, 60, 61, 63, 64, 66, 68, 69, 71, 72, 74, 75, 77, 79, 80, 82, 83, 85, 87, 88, 90, 91, 93, 94, 96, 98, 99, 101, 102, 104, 105, 107, 109
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A022843.
Cf. A108599.

Programs

  • Haskell
    a054385 n = a054385_list !! n
    a054385_list = map (floor . (* e') . fromIntegral) [1..]
       where e' = e / (e - 1); e = exp 1
    -- Reinhard Zumkeller, Jul 06 2013
    
  • Maple
    A054385 := proc(n)
        floor(n*exp(1)/(exp(1)-1)) ;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    a[n_] := Floor[n E/(E - 1)];
    Array[a, 100] (* Jean-François Alcover, Mar 24 2020 *)
  • Python
    from sympy import E
    print([n*E//(E-1) for n in range(1, 70)]) # Karl V. Keller, Jr., Aug 07 2020

A258244 Number of steps from n to 0, where allowable steps are x -> [x/e] if x = is in A022843 (the Beatty sequence for e) and x -> [e*x] otherwise, where [ ] = floor.

Original entry on oeis.org

0, 2, 1, 3, 5, 3, 5, 7, 2, 4, 4, 6, 8, 6, 8, 10, 4, 6, 8, 6, 8, 8, 10, 12, 3, 5, 7, 5, 7, 5, 7, 9, 7, 9, 11, 9, 11, 13, 7, 9, 9, 11, 13, 11, 13, 15, 5, 7, 7, 9, 11, 9, 11, 13, 7, 9, 11, 9, 11, 9, 11, 13, 11, 13, 15, 13, 15, 4, 6, 8, 6, 8, 10, 8, 10, 12, 6, 8
Offset: 0

Views

Author

Clark Kimberling, Jun 08 2015

Keywords

Comments

a(n) = number of edges from 0 to n in the tree at A258243.

Examples

			20->54->19->6->16->5->1->2->0, so that a(20) = 8.
		

Crossrefs

Programs

  • Mathematica
    r = E; w = Table[Floor[r*n], {n, 1, 1000}];
    f[x_] := If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    g[x_] := Drop[FixedPointList[f, x], -1];
    Table[-1+ Length[g[n]], {n, 0, 100}]

A276859 First differences of the Beatty sequence A022843 for e.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 24 2016

Keywords

Crossrefs

Programs

Formula

a(n) = floor(n*r) - floor(n*r - r), where r = e, n >= 1.

A191455 Dispersion of (floor(n*e)), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 13, 21, 10, 6, 35, 57, 27, 16, 7, 95, 154, 73, 43, 19, 9, 258, 418, 198, 116, 51, 24, 11, 701, 1136, 538, 315, 138, 65, 29, 12, 1905, 3087, 1462, 856, 375, 176, 78, 32, 14, 5178, 8391, 3974, 2326, 1019, 478, 212, 86, 38, 15, 14075, 22809
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...2....5....13...35
  3...8....21...57...154
  4...10...27...73...198
  6...16...43...116..315
  7...19...51...138..375
		

Crossrefs

Programs

  • Maple
    A191455 := proc(r, c)
        option remember;
        if c = 1 then
            A054385(r) ;
        else
            A022843(procname(r, c-1)) ;
        end if;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=Floor[n*E]   (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191455 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191455 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A276871 Sums-complement of the Beatty sequence for sqrt(5).

Original entry on oeis.org

1, 10, 19, 28, 37, 48, 57, 66, 75, 86, 95, 104, 113, 124, 133, 142, 151, 162, 171, 180, 189, 198, 209, 218, 227, 236, 247, 256, 265, 274, 285, 294, 303, 312, 323, 332, 341, 350, 359, 370, 379, 388, 397, 408, 417, 426, 435, 446, 455, 464, 473, 484, 493, 502
Offset: 1

Views

Author

Clark Kimberling, Sep 24 2016

Keywords

Comments

The sums-complement of a sequence s(1), s(2), ... of positive integers is introduced here as the set of numbers c(1), c(2), ... such that no c(n) is a sum s(j)+s(j+1)+...+s(k) for any j and k satisfying 1 <= j <= k. If this set is not empty, the term "sums-complement" also applies to the (possibly finite) sequence of numbers c(n) arranged in increasing order. In particular, the difference sequence D(r) of a Beatty sequence B(r) of an irrational number r > 2 has an infinite sums-complement, abbreviated as SC(r) in the following table:
r B(r) D(r) SC(r)
----------------------------------------------------
2+sqrt(1/2) A182769 A276869 A276888
sqrt(2)+sqrt(3) A110117 A276870 A276889
From Jeffrey Shallit, Aug 15 2023: (Start)
Simpler description: this sequence represents those positive integers that CANNOT be expressed as a difference of two elements of A022839.
There is a 20-state Fibonacci automaton for the terms of this sequence (see a276871.pdf). It takes as input the Zeckendorf representation of n and accepts iff n is a member of A276871. (End)

Examples

			The Beatty sequence for sqrt(5) is A022839 = (0,2,4,6,8,11,13,15,...), with difference sequence s = A081427 = (2,2,2,2,3,2,2,2,3,2,...).  The sums s(j)+s(j+1)+...+s(k) include (2,3,4,5,6,7,8,9,11,12,...), with complement (1,10,19,28,37,...).
		

Crossrefs

Programs

  • Mathematica
    z = 500; r = Sqrt[5]; b = Table[Floor[k*r], {k, 0, z}]; (* A022839 *)
    t = Differences[b]; (* A081427 *)
    c[k_, n_] := Sum[t[[i]], {i, n, n + k - 1}];
    u[k_] := Union[Table[c[k, n], {n, 1, z - k + 1}]];
    w = Flatten[Table[u[k], {k, 1, z}]]; Complement[Range[Max[w]], w];  (* A276871 *)

A103762 a(n) = least k with Sum_{j = n..k} 1/j >= 1.

Original entry on oeis.org

1, 4, 7, 10, 12, 15, 18, 20, 23, 26, 29, 31, 34, 37, 39, 42, 45, 48, 50, 53, 56, 58, 61, 64, 67, 69, 72, 75, 77, 80, 83, 86, 88, 91, 94, 97, 99, 102, 105, 107, 110, 113, 116, 118, 121, 124, 126, 129, 132, 135, 137, 140, 143, 145, 148, 151, 154, 156, 159, 162
Offset: 1

Views

Author

David W. Wilson, Apr 14 2008

Keywords

Comments

a(n) = A136617(n) + n for n > 1. Also a(n) = A136616(n-1) + 1 for n > 1.
If you compare this to floor(e*n) = A022843, 2,5,8,10,13,16,..., it appears that floor(e*n)-a(n) = 1,1,1,0,1,1,1,1,1,1,0,..., initially consisting of 0's and 1's. The places where the 0's occur are 4, 11, 18, 25, 32, 36, 43, 50, 57, 64, 71, ... whose differences seem to be 4, 7 or 11.
There are some rather sharp estimates on this type of differences between harmonic numbers in Theorem 3.2 of the Sintamarian reference, which may help to uncover such a pattern. - R. J. Mathar, Apr 15 2008
a(n) = round(e*(n-1/2)) with the exception of the terms of A277603; at those values of n, a(n) = round(e*(n-1/2)) + 1. - Jon E. Schoenfield, Apr 03 2018

Crossrefs

Cf. A136616, A136617, A242679 (Bobo numbers).

Programs

  • Mathematica
    i = 0; s = 0; Table[While[s < 1, i++; s = s + 1/i]; s = s - 1/n; i, {n, 100}] (* T. D. Noe, Jun 26 2012 *)
  • PARI
    default(realprecision, 10^5); e=exp(1);
    a(n) = if(n<2, 1, floor(e*n+(1-e)/2+(e-1/e)/(24*n-12))); \\ Jinyuan Wang, Mar 06 2020

A077545 Primes of the form floor(k*e).

Original entry on oeis.org

2, 5, 13, 19, 29, 43, 59, 67, 73, 89, 97, 103, 127, 149, 157, 163, 173, 179, 233, 239, 241, 263, 269, 271, 277, 293, 307, 331, 337, 347, 353, 383, 421, 443, 467, 521, 557, 587, 617, 619, 641, 701, 709, 733, 739, 761, 769, 823, 829, 839, 853, 883, 907, 929, 937
Offset: 1

Views

Author

Amarnath Murthy, Nov 09 2002

Keywords

Comments

Primes not in A077545 are in A184856, since {floor(k*e)} and {floor(j*e/(e-1))} are complementary Beatty sequences (A022843 and A054385).

Crossrefs

Programs

  • Mathematica
    r=E; s=r/(r-1);
    a[n_]:=Floor[n*r];
    b[n_]:=Floor[n*s];
    Table[a[n], {n, 1, 120}]  (* A022843 *)
    t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1, a[n]]], {n, 1, 600}]; t1
    t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2, n]], {n, 1, 600}]; t2
    t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3, n]], {n, 1, 300}]; t3
    t4={}; Do[If[PrimeQ[b[n]], AppendTo[t4, b[n]]], {n, 1, 600}]; t4
    t5={}; Do[If[PrimeQ[b[n]], AppendTo[t5, n]], {n, 1, 600}]; t5
    t6={}; Do[If[MemberQ[t4, Prime[n]], AppendTo[t6, n]], {n, 1, 300}]; t6
    (* List t1 matches A077545; list t2 matches A062409;
    lists t3-t6 match A184855-A184858. *)

Extensions

More terms from Sascha Kurz, Jan 12 2003
Mathematica code and crossreferences by Clark Kimberling, Jan 24 2011

A022852 Integer nearest n * e, where e is the natural log base.

Original entry on oeis.org

0, 3, 5, 8, 11, 14, 16, 19, 22, 24, 27, 30, 33, 35, 38, 41, 43, 46, 49, 52, 54, 57, 60, 63, 65, 68, 71, 73, 76, 79, 82, 84, 87, 90, 92, 95, 98, 101, 103, 106, 109, 111, 114, 117, 120, 122, 125, 128, 130, 133, 136, 139, 141, 144, 147, 150, 152, 155, 158, 160
Offset: 0

Views

Author

Keywords

Comments

A022843(n) <= a(n) <= A121384(n). - Reinhard Zumkeller, Mar 17 2015

Examples

			2 * e = 5.436563656918..., so a(2) = 5.
3 * e = 8.1548454853771357..., so a(3) = 8.
4 * e = 10.87312731383618..., so a(4) = 11.
		

Crossrefs

Programs

Extensions

Zero prepended by Harvey P. Dale, Jan 08 2014

A024573 a(n) = floor(1/frac(n*e)).

Original entry on oeis.org

1, 2, 6, 1, 1, 3, 35, 1, 2, 5, 1, 1, 2, 17, 1, 2, 4, 1, 1, 2, 11, 1, 1, 4, 1, 1, 2, 8, 1, 1, 3, 1, 1, 2, 7, 1, 1, 3, 76, 1, 2, 5, 1, 1, 3, 24, 1, 2, 5, 1, 1, 2, 14, 1, 1, 4, 1, 1, 2, 10, 1, 1, 3, 1, 1, 2, 8, 1, 1, 3, 1, 1, 2, 6, 1, 1, 3, 38, 1, 2, 5, 1, 1, 2, 18, 1, 2, 4, 1, 1, 2, 12, 1, 1, 4, 1, 1, 2, 9, 1
Offset: 1

Views

Author

Keywords

Comments

From Hieronymus Fischer, Apr 15 2012: (Start)
The sequence is well defined, since frac(n*e)>0 for n>0.
Let b(n,m) = |{a(k)| 1<=k<=n, a(k)>=m}| be the number of the first n terms which are >= m >= 1. Then, lim b(n,m)/n = 1/m for n-->oo since frac(n*e) is uniformly distributed. (End)

Crossrefs

Programs

  • Maple
    seq(floor(1/frac(n*exp(1))), n=1..30); # Ridouane Oudra, Jun 09 2025
  • Mathematica
    f[n_] := Floor[1/FractionalPart[n*E]]; Array[f, 100] (* Robert G. Wilson v, Apr 17 2012 *)

Formula

From Ridouane Oudra, Jun 09 2025: (Start)
a(n!) = n.
a(n) = 1 if n is in A190860.
a(n) > 1 if n is in A190847. (End)

A121384 a(n) = ceiling(n*e).

Original entry on oeis.org

0, 3, 6, 9, 11, 14, 17, 20, 22, 25, 28, 30, 33, 36, 39, 41, 44, 47, 49, 52, 55, 58, 60, 63, 66, 68, 71, 74, 77, 79, 82, 85, 87, 90, 93, 96, 98, 101, 104, 107, 109, 112, 115, 117, 120, 123, 126, 128, 131, 134, 136, 139, 142, 145, 147, 150, 153, 155, 158, 161, 164, 166
Offset: 0

Views

Author

Mohammad K. Azarian, Sep 06 2006

Keywords

Comments

Because the difference between e=A001113 and the constant 1/(1-theta), theta = A102525, defined in A054414 is only 0.00877, the difference |a(n)-A054414(n)| increases approximately as 0.00877*n. - R. J. Mathar, Apr 14 2008
A022843(n) <= A022852(n) <= a(n). - Reinhard Zumkeller, Mar 17 2015

Crossrefs

Programs

Showing 1-10 of 31 results. Next