login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060234 a(n) = (prime(n) mod (prime(n+1)-prime(n))). 1
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Muniru A Asiru, Table of n, a(n) for n = 1..1000

FORMULA

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

EXAMPLE

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

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

MAPLE

seq(ithprime(i) mod (ithprime(i+1)-ithprime(i)), i=1..2000); # Muniru A Asiru, Jan 29 2018

MATHEMATICA

Table[Mod[Prime[n], Prime[n+1] - Prime[n]], {n, 1, 100}] (* Vincenzo Librandi, Jan 29 2018 *)

PROG

(PARI) a(n) = prime(n) % (prime(n+1) - prime(n)); \\ Michel Marcus, Nov 26 2013

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

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

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

(MAGMA) [NthPrime(n) mod (NthPrime(n+1)-NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Jan 29 2018

CROSSREFS

Cf. A000040, A001223.

Sequence in context: A076476 A243200 A016733 * A131270 A109223 A263009

Adjacent sequences:  A060231 A060232 A060233 * A060235 A060236 A060237

KEYWORD

nonn

AUTHOR

Labos Elemer, Mar 21 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 05:39 EST 2020. Contains 331104 sequences. (Running on oeis4.)