Simon Strandgaard, <a href="/A347342/a347342.png">TITLE FOR LINKPlot of 1000 terms</a>
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
Simon Strandgaard, <a href="/A347342/a347342.png">TITLE FOR LINKPlot of 1000 terms</a>
Simon Strandgaard, <a href="/A347342/a347342.png">TITLE FOR LINK</a>
(PARI) a(n) = prime(n) % floor(prime(n) / n); (Ruby) require 'prime'
(Ruby) require 'prime'
allocated for Simon Strandgaard
a(n) = prime(n) mod floor(prime(n) / n).
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
1,13
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.
(PARI) a(n) = prime(n) % floor(prime(n) / n); (Ruby) require 'prime'
values = []
Prime.first(30).each_with_index do |prime, i|
values << prime % (prime/(i+1))
end
p values
allocated
nonn
Simon Strandgaard, Aug 27 2021
approved
editing
allocated for Simon Strandgaard
allocated
approved