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!)
A320146 a(n) = 2*prime(n) modulo (prime(n-1) + prime(n+1)). 1
6, 0, 14, 2, 26, 2, 38, 46, 4, 62, 2, 2, 86, 94, 0, 4, 122, 2, 2, 146, 2, 166, 178, 4, 2, 206, 2, 218, 226, 10, 262, 4, 278, 8, 302, 0, 2, 334, 0, 4, 362, 8, 386, 2, 398, 0, 8, 2, 458, 466, 4, 482, 4, 0, 0, 4, 542, 2, 2, 566, 586, 10, 2, 626, 634, 8, 674, 8, 698, 706, 718, 2, 0, 2, 766, 778, 4, 802, 818, 8, 842 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
This sequence has to do with the relative position of primes with respect to their adjacent primes:
(i) if prime(n) is closer to its predecessor than to its successor, then a(n) = 2*prime(n);
(ii) if prime(n) is closer to its successor than to its predecessor, then a(n) = 2*prime(n) - prime(n-1) - prime(n+1); and
(iii) if prime(n) is equidistant from its predecessor and its successor, then a(n) = 0.
Is lim_{n -> infinity} (Sum_{i=1..n} a(i))/(Sum_{i=1..n} prime(i)) finite? If so, what is its value?
LINKS
MAPLE
seq(modp(2*ithprime(n), (ithprime(n-1)+ithprime(n+1))), n=2..90); # Muniru A Asiru, Oct 07 2018
MATHEMATICA
Table[Mod[2*Prime[n], Prime[n-1] + Prime[n+1]], {n, 2, 120}]
Mod[2#[[2]], #[[1]]+#[[3]]]&/@Partition[Prime[Range[90]], 3, 1] (* Harvey P. Dale, Jan 03 2019 *)
PROG
(PARI) a(n) = 2*prime(n) % (prime(n-1) + prime(n+1)); \\ Michel Marcus, Oct 18 2018
CROSSREFS
Sequence in context: A205966 A183772 A240821 * A283999 A240813 A175567
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Oct 06 2018
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 August 17 02:18 EDT 2024. Contains 375198 sequences. (Running on oeis4.)