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!)
A212769 p*q modulo (p+q) with p, q consecutive primes. 4
1, 7, 11, 5, 23, 11, 35, 17, 43, 59, 59, 35, 83, 41, 91, 103, 119, 119, 65, 143, 143, 77, 163, 77, 95, 203, 101, 215, 107, 191, 125, 259, 275, 263, 299, 299, 311, 161, 331, 343, 359, 347, 383, 191, 395, 169, 181, 221, 455, 227, 463, 479, 467, 499, 511, 523 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Graph consists of two branches, the upper one corresponds to cases (q-p) = 2 (mod 4), and the lower one to cases (q-p) = 0 (mod 4).
If prime(n+k) = prime(n)+4*k^2 for k=1..m, then a(n)=...=a(n+m-1)=2*prime(n)+1. - Robert Israel, Jan 20 2022
LINKS
FORMULA
From Robert Israel, Jan 20 2022: (Start)
If prime(n+1)-prime(n) = 4*k+2 with k^2 <= prime(n)/2, then a(n) = 2*prime(n)-4*k^2+1.
If prime(n+1)-prime(n) = 4*k with 4*k^2+2*k<prime(n), then a(n) = prime(n) - 4*k^2 + 2*k. (End)
MAPLE
f:= proc(n) local p, q;
p:= ithprime(n); q:= nextprime(p);
(p*q) mod (p+q)
end proc:
map(f, [$1..100]); # Robert Israel, Jan 20 2022
MATHEMATICA
Mod[Times@@#, Total[#]]&/@Partition[Prime[Range[60]], 2, 1] (* Harvey P. Dale, Feb 21 2022 *)
PROG
(PARI) a(n) = (prime(n)*prime(n+1)) % (prime(n)+prime(n+1)); \\ Michel Marcus, Oct 19 2013
(PARI) a(n)=my(p=prime(n), q=nextprime(p+1)); (p*q)%(p+q) \\ Charles R Greathouse IV, Oct 19 2013
CROSSREFS
Sequence in context: A144076 A113492 A097152 * A269485 A228954 A283651
KEYWORD
nonn
AUTHOR
Zak Seidov, May 26 2012
STATUS
approved

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 16 16:01 EDT 2024. Contains 371749 sequences. (Running on oeis4.)