login
This site is supported by donations to The OEIS 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!)
A038702 Prime(n)^2 mod prime(n-1). 16
1, 1, 4, 2, 4, 3, 4, 16, 13, 4, 5, 16, 4, 16, 36, 36, 4, 36, 16, 4, 36, 16, 36, 64, 16, 4, 16, 4, 16, 83, 16, 36, 4, 100, 4, 36, 36, 16, 36, 36, 4, 100, 4, 16, 4, 144, 144, 16, 4, 16, 36, 4, 100, 36, 36, 36, 4, 36, 16, 4, 100, 196, 16, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

a(n+1) = n-th prime gap squared mod the n-th prime = A076821(n) mod A000040(n). Probably a(n) = A076821(n+1) for n > 31. This holds up to 4 * 10^18. - Charles R Greathouse IV, Apr 17 2012

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 2..10000

EXAMPLE

To get a(4): square the fourth prime to get 7^2 = 49. The remainder when this is divided by the third prime, 5, is 4. So a(3) = 4.

MAPLE

A038702 := proc(n)

    modp( ithprime(n)^2, ithprime(n-1)) ;

end proc: # R. J. Mathar, Jan 09 2015

MATHEMATICA

Table[Mod[Prime[n+1]^2, Prime[n]], {n, 5!}] (* Vladimir Joseph Stephan Orlovsky, Apr 26 2010 *)

Table[PowerMod[Prime[n], 2, Prime[n-1]], {n, 2, 70}] (* Harvey P. Dale, Mar 22 2012 *)

PROG

(PARI) a(n)=prime(n)^2%prime(n-1) \\ Charles R Greathouse IV, Apr 17 2012

CROSSREFS

Cf. A038703.

Sequence in context: A056158 A010316 A083954 * A085062 A053051 A075234

Adjacent sequences:  A038699 A038700 A038701 * A038703 A038704 A038705

KEYWORD

nonn,easy

AUTHOR

Neil Fernandez, May 01 2000

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 19 18:16 EST 2019. Contains 319309 sequences. (Running on oeis4.)