OFFSET
0,1
LINKS
Simon Strandgaard, Plot of 400 terms
EXAMPLE
x(n) = frac(e * n) + 1,
a(0) = floor(x(0) * prime(1)) = floor(1.00 * 2) = 2,
a(1) = floor(x(1) * prime(2)) = floor(1.72 * 3) = 5,
a(2) = floor(x(2) * prime(3)) = floor(1.44 * 5) = 7,
a(3) = floor(x(3) * prime(4)) = floor(1.15 * 7) = 8,
a(4) = floor(x(4) * prime(5)) = floor(1.87 * 11) = 20.
MATHEMATICA
Array[Floor[(Mod[E #, 1] + 1) Prime[# + 1]] &, 56, 0] (* Michael De Vlieger, Mar 19 2021 *)
PROG
(Ruby) require 'prime'
values = []
primes = Prime.first(20)
primes.each_with_index do |prime, n|
x = ((n * Math::E) % 1) + 1
values << (x * prime).floor
end
p values
(PARI) a(n) = floor((frac(exp(1)*n) + 1) * prime(n+1)); \\ Michel Marcus, Mar 20 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Simon Strandgaard, Mar 19 2021
STATUS
approved