Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Mar 26 2018 19:51:56
%S 1,2,1,3,1,3,1,1,3,1,3,3,1,1,2,3,1,3,3,1,3,1,1,3,3,1,3,1,1,3,1,3,1,3,
%T 1,2,3,1,2,3,1,3,1,3,1,2,3,3,1,1,3,1,3,2,2,3,1,3,3,1,1,3,3,1,1,3,1,3,
%U 1,1,1,3,2,3,1,1,3,1,1,3,1,3,1,3,1,1,3,3,1,1,3,3,1,3,1,1,3,1,3,1,3,2,3,1,1
%N a(n) = 1, 2 or 3 (resp.) if prime(n) is weak, balanced or strong (resp.).
%C n >= 2: a(n) = 1, 2 or 3 (resp.) if n-th prime is in A051635, A006562 or A051634 (resp.).
%H Robert Israel, <a href="/A108415/b108415.txt">Table of n, a(n) for n = 2..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_prime">Balanced prime</a>
%p p:= 2: q:= 3: r:= 5:
%p for i from 2 to 200 do
%p t:= q - (p+r)/2;
%p A[i]:= piecewise(t<0,1,t=0,2,3);
%p p:= q; q:= r; r:= nextprime(r);
%p od:
%p seq(A[i],i=2..200); # _Robert Israel_, Mar 25 2018
%t A108415[n_]:=2+Sign[Prime[n]-1/2(Prime[n-1]+Prime[n+1])]
%Y Cf. A006562, A051634, A051635.
%K nonn
%O 2,2
%A _Zak Seidov_, Jun 02 2005