login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A108415
a(n) = 1, 2 or 3 (resp.) if prime(n) is weak, balanced or strong (resp.).
1
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, 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, 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
OFFSET
2,2
COMMENTS
n >= 2: a(n) = 1, 2 or 3 (resp.) if n-th prime is in A051635, A006562 or A051634 (resp.).
LINKS
MAPLE
p:= 2: q:= 3: r:= 5:
for i from 2 to 200 do
t:= q - (p+r)/2;
A[i]:= piecewise(t<0, 1, t=0, 2, 3);
p:= q; q:= r; r:= nextprime(r);
od:
seq(A[i], i=2..200); # Robert Israel, Mar 25 2018
MATHEMATICA
A108415[n_]:=2+Sign[Prime[n]-1/2(Prime[n-1]+Prime[n+1])]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 02 2005
STATUS
approved