The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A347342 a(n) = prime(n) mod floor(prime(n) / n). 1

%I #15 Sep 14 2021 04:43:05

%S 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,

%T 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,

%U 2,1,1,3,2,3,4,3,4,2,1,4,4,1,1,3,4,3

%N a(n) = prime(n) mod floor(prime(n) / n).

%H Simon Strandgaard, <a href="/A347342/a347342.png">Plot of 1000 terms</a>

%F a(n) = A000040(n) mod A038605(n).

%e a(1) = 2 mod floor( 2 / 1) = 2 mod 2 = 0,

%e a(2) = 3 mod floor( 3 / 2) = 3 mod 1 = 0,

%e a(3) = 5 mod floor( 5 / 3) = 5 mod 1 = 0,

%e a(4) = 7 mod floor( 7 / 4) = 7 mod 1 = 0,

%e a(5) = 11 mod floor(11 / 5) = 11 mod 2 = 1.

%t A347342[n_] := Mod[Prime[n] , Floor[Prime[n]/n]]; Table[A347342[n], {n, 1, 86}] (* _Robert P. P. McKone_, Aug 27 2021 *)

%o (PARI) a(n) = prime(n) % (prime(n) \ n);

%o (Ruby) require 'prime'

%o values = []

%o Prime.first(30).each_with_index do |prime,i|

%o values << prime % (prime/(i+1))

%o end

%o p values

%Y Cf. A000040, A038605.

%K nonn

%O 1,13

%A _Simon Strandgaard_, Aug 27 2021

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 May 23 05:59 EDT 2024. Contains 372758 sequences. (Running on oeis4.)