OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = (prime(1) * 1) mod prime(1+1) = 2 * 1 mod 3 = 2,
a(2) = (prime(2) * 2) mod prime(2+1) = 3 * 2 mod 5 = 1,
a(3) = (prime(3) * 3) mod prime(3+1) = 5 * 3 mod 7 = 1,
a(4) = (prime(4) * 4) mod prime(4+1) = 7 * 4 mod 11 = 6,
a(5) = (prime(5) * 5) mod prime(5+1) = 11 * 5 mod 13 = 3.
MATHEMATICA
Table[Mod[n*Prime[n], Prime[n+1]], {n, 62}] (* Stefano Spezia, Jan 17 2021 *)
PROG
(Ruby) require 'prime'
values = []
primes = Prime.first(20)
primes.each_index do |n|
next if n < 1
values << (primes[n-1] * n) % primes[n]
end
p values
(PARI) a(n) = (prime(n)*n) % prime(n+1); \\ Michel Marcus, Jan 20 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Simon Strandgaard, Jan 15 2021
STATUS
approved