OFFSET
1,1
COMMENTS
For a guide to related sequences, see A205558.
EXAMPLE
The first six terms match these differences:
p(6)-p(2)=13-3=10=10*1
p(7)-p(4)=17-7=10=10*1
p(9)-p(2)=23-3=20=10*2
p(9)-p(6)=23-13=10=10*1
p(10)-p(8)=29-19=10=10*1
p(11)-p(5)=31-11=20=10*2
MATHEMATICA
s[n_] := s[n] = Prime[n]; z1 = 900; z2 = 70;
f[n_] := f[n] = Floor[(-1 + Sqrt[8 n - 7])/2];
Table[s[n], {n, 1, 30}] (* A000040 *)
u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]
Table[u[m], {m, 1, z1}] (* A204890 *)
v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
d[n_] := d[n] = Delete[w[n], Position[w[n], 0]]
c = 10; t = d[c] (* A205718 *)
k[n_] := k[n] = Floor[(3 + Sqrt[8 t[[n]] - 1])/2]
j[n_] := j[n] = t[[n]] - f[t][[n]] (f[t[[n]]] + 1)/2
Table[k[n], {n, 1, z2}] (* A205720 *)
Table[j[n], {n, 1, z2}] (* A205721 *)
Table[s[k[n]], {n, 1, z2}] (* A205722 *)
Table[s[j[n]], {n, 1, z2}] (* A205723 *)
Table[s[k[n]] - s[j[n]], {n, 1, z2}] (* A205724 *)
Table[(s[k[n]] - s[j[n]])/c, {n, 1, z2}] (* A205725 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 31 2012
STATUS
approved