login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Robert Israel, Table of n, a(n) for n = 2..10000

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

Cf. A006562, A051634, A051635.

Sequence in context: A287561 A046924 A015710 * A278572 A136644 A111963

Adjacent sequences:  A108412 A108413 A108414 * A108416 A108417 A108418

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 1 04:06 EDT 2020. Contains 337441 sequences. (Running on oeis4.)