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
KEYWORD
nonn
AUTHOR
Simon Strandgaard, May 15 2021
STATUS
approved