OFFSET
1,3
EXAMPLE
n=1: no differences arise; n=3: primes={2, 3, 5}, C[3, 2]=3, differences={3, 2, 1}, a(3)=3;
n=7: primes={2, 3, 5, 7, 11, 13, 17}, differences={15, 14, 12, 10, 6, 4, 11, 10, 8, 6, 2, 9, 8, 6, 4, 5, 4, 2, 3, 2, 1}, distinct terms ={15, 14, 12, 11, 10, 9, 8, 6, 5, 4, 3, 2, 1}, a(7)=13.
MATHEMATICA
f[n_] := Length[ Union[ Flatten[ Table[ Prime[i] - Prime[j], {i, 2, n}, {j, i - 1}]] ]]; Table[ f[n], {n, 61}] (* Robert G. Wilson v, Jul 30 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 26 2003
STATUS
approved