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!)
A060234 a(n) = (prime(n) mod (prime(n+1)-prime(n))). 1

%I #26 Sep 08 2022 08:45:03

%S 0,1,1,3,1,1,1,3,5,1,1,1,1,3,5,5,1,1,3,1,1,3,5,1,1,1,3,1,1,1,3,5,1,9,

%T 1,1,1,3,5,5,1,1,1,1,1,7,7,3,1,1,5,1,1,5,5,5,1,1,1,1,3,13,3,1,1,9,1,7,

%U 1,1,5,7,1,1,3,5,5,1,1,9,1,1,1,1,3,5,1,1,1,3,11,7,3,3,3,5,5,1,1,1,7,5,5

%N a(n) = (prime(n) mod (prime(n+1)-prime(n))).

%H Muniru A Asiru, <a href="/A060234/b060234.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = prime(n) mod (prime(n+1) - prime(n)) where prime(n) is the n-th prime.

%e 7 is followed by 11. 7 mod (11-7) = 7 mod 4 = 3. So a(4) = 3.

%e This residue is always odd: 3 = 1*2 + 1, 7 = 1*4 + 3, 23 = 3*6 + 5, etc.

%p seq(ithprime(i) mod (ithprime(i+1)-ithprime(i)), i=1..2000); # _Muniru A Asiru_, Jan 29 2018

%t Table[Mod[Prime[n], Prime[n+1] - Prime[n]], {n, 1, 100}] (* _Vincenzo Librandi_, Jan 29 2018 *)

%o (PARI) a(n) = prime(n) % (prime(n+1) - prime(n)); \\ _Michel Marcus_, Nov 26 2013

%o (GAP) P:=Filtered([1..10^7], IsPrime);;

%o P1:=List([1..Length(P)-1], n -> P[n+1] - P[n]);;

%o A060234 := List([1..Length(P1)], n->P[n] mod P1[n]); # _Muniru A Asiru_, Jan 29 2018

%o (Magma) [NthPrime(n) mod (NthPrime(n+1)-NthPrime(n)): n in [1..100]]; // _Vincenzo Librandi_, Jan 29 2018

%Y Cf. A000040, A001223.

%K nonn

%O 1,4

%A _Labos Elemer_, Mar 21 2001

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 April 19 08:39 EDT 2024. Contains 371782 sequences. (Running on oeis4.)