login
A340649
a(n) = (n*prime(n+1)) mod prime(n).
4
1, 1, 1, 2, 10, 11, 14, 13, 8, 20, 4, 11, 26, 13, 43, 43, 34, 47, 9, 40, 53, 9, 55, 14, 3, 52, 5, 56, 7, 81, 124, 61, 66, 62, 70, 65, 65, 152, 67, 67, 82, 58, 86, 176, 90, 154, 142, 192, 98, 200, 73, 104, 48, 73, 73, 73, 114, 77, 236, 120, 44, 282, 252, 128
OFFSET
1,4
LINKS
FORMULA
a(n) = A117495(n+1) mod prime(n). - Michel Marcus, Jan 15 2021
EXAMPLE
a(1) = (prime(1+1) * 1) mod prime(1) = 3 * 1 mod 2 = 1,
a(2) = (prime(2+1) * 2) mod prime(2) = 5 * 2 mod 3 = 1,
a(3) = (prime(3+1) * 3) mod prime(3) = 7 * 3 mod 5 = 1,
a(4) = (prime(4+1) * 4) mod prime(4) = 11 * 4 mod 7 = 2,
a(5) = (prime(5+1) * 5) mod prime(5) = 13 * 5 mod 11 = 10.
MATHEMATICA
Table[Mod[Prime[n + 1]*n, Prime[n]], {n, 1, 64}] (* Robert P. P. McKone, Jan 15 2021 *)
PROG
(Ruby) require 'prime'
values = []
primes = Prime.first(20)
primes.each_index do |n|
next if n < 1
values << (primes[n] * n) % primes[n-1]
end
p values
(PARI) a(n) = prime(n+1)*n % prime(n); \\ Michel Marcus, Jan 15 2021
(Magma) [ (n*NthPrime(n+1)) mod NthPrime(n) : n in [1..60]]; // Wesley Ivan Hurt, Apr 23 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Simon Strandgaard, Jan 14 2021
STATUS
approved