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!)
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 (list; graph; refs; listen; history; text; internal format)
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
Wikipedia, Balanced prime
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
Sequence in context: A287561 A046924 A015710 * A278572 A136644 A111963
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 02 2005
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)