login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A344348
a(n) = floor(frac(e * n) * n).
0
0, 0, 0, 0, 3, 2, 1, 0, 5, 4, 1, 9, 7, 4, 0, 11, 7, 3, 16, 12, 7, 1, 17, 11, 5, 23, 17, 10, 3, 24, 16, 8, 31, 23, 14, 4, 30, 21, 11, 0, 29, 18, 7, 38, 26, 14, 1, 35, 22, 9, 45, 32, 18, 3, 42, 27, 12, 53, 38, 22, 5, 49, 33, 15, 62, 44, 26, 8, 57, 38, 19, 70
OFFSET
0,5
EXAMPLE
x(n) = frac(e * n),
a(0) = floor(x(0) * 0) = floor(0.00 * 0) = 0,
a(1) = floor(x(1) * 1) = floor(0.72 * 1) = 0,
a(2) = floor(x(2) * 2) = floor(0.44 * 2) = 0,
a(3) = floor(x(3) * 3) = floor(0.15 * 3) = 0,
a(4) = floor(x(4) * 4) = floor(0.87 * 4) = 3.
PROG
(Ruby) p (0..50).map {|n| (((Math::E * n) % 1) * n).floor }
CROSSREFS
Cf. A001113, A342730 (uses primes, where this uses positive integers).
Sequence in context: A031251 A194885 A128317 * A179753 A279318 A084269
KEYWORD
nonn
AUTHOR
Simon Strandgaard, May 15 2021
STATUS
approved