cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A320146 a(n) = 2*prime(n) modulo (prime(n-1) + prime(n+1)).

This page as a plain text file.
%I A320146 #53 Jan 03 2019 18:04:49
%S A320146 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,
%T A320146 2,218,226,10,262,4,278,8,302,0,2,334,0,4,362,8,386,2,398,0,8,2,458,
%U A320146 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
%N A320146 a(n) = 2*prime(n) modulo (prime(n-1) + prime(n+1)).
%C A320146 This sequence has to do with the relative position of primes with respect to their adjacent primes:
%C A320146 (i) if prime(n) is closer to its predecessor than to its successor, then a(n) = 2*prime(n);
%C A320146 (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
%C A320146 (iii) if prime(n) is equidistant from its predecessor and its successor, then a(n) = 0.
%C A320146 Is lim_{n -> infinity} (Sum_{i=1..n} a(i))/(Sum_{i=1..n} prime(i)) finite? If so, what is its value?
%H A320146 Harvey P. Dale, <a href="/A320146/b320146.txt">Table of n, a(n) for n = 2..1000</a>
%p A320146 seq(modp(2*ithprime(n),(ithprime(n-1)+ithprime(n+1))),n=2..90); # _Muniru A Asiru_, Oct 07 2018
%t A320146 Table[Mod[2*Prime[n], Prime[n-1] + Prime[n+1]], {n, 2, 120}]
%t A320146 Mod[2#[[2]],#[[1]]+#[[3]]]&/@Partition[Prime[Range[90]],3,1] (* _Harvey P. Dale_, Jan 03 2019 *)
%o A320146 (PARI) a(n) = 2*prime(n) % (prime(n-1) + prime(n+1)); \\ _Michel Marcus_, Oct 18 2018
%Y A320146 Cf. A000040, A001223, A006562, A274263, A276309.
%K A320146 nonn
%O A320146 2,1
%A A320146 _Andres Cicuttin_, Oct 06 2018