

A320146


a(n) = 2*prime(n) modulo (prime(n1) + 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(n1)  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

Harvey P. Dale, Table of n, a(n) for n = 2..1000


MAPLE

seq(modp(2*ithprime(n), (ithprime(n1)+ithprime(n+1))), n=2..90); # Muniru A Asiru, Oct 07 2018


MATHEMATICA

Table[Mod[2*Prime[n], Prime[n1] + 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(n1) + prime(n+1)); \\ Michel Marcus, Oct 18 2018


CROSSREFS

Cf. A000040, A001223, A006562, A274263, A276309.
Sequence in context: A205966 A183772 A240821 * A283999 A240813 A175567
Adjacent sequences: A320143 A320144 A320145 * A320147 A320148 A320149


KEYWORD

nonn


AUTHOR

Andres Cicuttin, Oct 06 2018


STATUS

approved



