|
Search: id:A098726
|
|
|
| A098726 |
|
Take three consecutive primes started with the n-th prime:{p(n),p(n+1),p(n+2)}. Calculate d(i,j)=Abs[p(i)-p(j)], for all {i,j}, i.e. all possible differences. a[n] is the number of distinct differences which are either 3 or 2. |
|
+0 2
|
|
| 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
EXAMPLE
|
a[n]=2 iff the consecutive prime-differences are equal.
|
|
MATHEMATICA
|
k=3; t=Table[Abs[Prime[n+i]-Prime[n+j]], {i, 0, k-1}, {j, 0, k-1}]; u=Delete[Union[Flatten[t]], 1]; a(n)=Length[u]
|
|
CROSSREFS
|
Cf. A080370, A054643.
Sequence in context: A080428 A120004 A079790 this_sequence A065801 A086920 A117451
Adjacent sequences: A098723 A098724 A098725 this_sequence A098727 A098728 A098729
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Labos E. (labos(AT)ana.sote.hu), Oct 05 2004
|
|
|
Search completed in 0.002 seconds
|