login
A347342
a(n) = prime(n) mod floor(prime(n) / n).
1
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 3, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 1, 2, 1, 1, 3, 2, 3, 4, 3, 4, 2, 1, 4, 4, 1, 1, 3, 4, 3
OFFSET
1,13
FORMULA
a(n) = A000040(n) mod A038605(n).
EXAMPLE
a(1) = 2 mod floor( 2 / 1) = 2 mod 2 = 0,
a(2) = 3 mod floor( 3 / 2) = 3 mod 1 = 0,
a(3) = 5 mod floor( 5 / 3) = 5 mod 1 = 0,
a(4) = 7 mod floor( 7 / 4) = 7 mod 1 = 0,
a(5) = 11 mod floor(11 / 5) = 11 mod 2 = 1.
MATHEMATICA
A347342[n_] := Mod[Prime[n] , Floor[Prime[n]/n]]; Table[A347342[n], {n, 1, 86}] (* Robert P. P. McKone, Aug 27 2021 *)
PROG
(PARI) a(n) = prime(n) % (prime(n) \ n);
(Ruby) require 'prime'
values = []
Prime.first(30).each_with_index do |prime, i|
values << prime % (prime/(i+1))
end
p values
CROSSREFS
Sequence in context: A106028 A105307 A281012 * A304943 A248597 A082071
KEYWORD
nonn
AUTHOR
Simon Strandgaard, Aug 27 2021
STATUS
approved