login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342730 a(n) = floor((frac(e*n) + 1) * prime(n+1)). 2
2, 5, 7, 8, 20, 20, 22, 19, 40, 42, 36, 70, 66, 57, 49, 94, 88, 73, 129, 116, 99, 85, 149, 135, 120, 197, 172, 149, 121, 206, 196, 165, 271, 236, 211, 172, 291, 256, 216, 175, 309, 262, 223, 364, 316, 263, 219, 392, 335, 273, 445, 390, 325, 268, 459, 395 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A340326 A188341 A238364 * A227445 A216968 A088757
KEYWORD
nonn,look
AUTHOR
Simon Strandgaard, Mar 19 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:11 EDT 2024. Contains 371914 sequences. (Running on oeis4.)