Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #9 Mar 30 2012 18:58:11
%S 6,7,9,9,10,11,12,12,13,13,14,14,14,15,15,15,16,16,16,16,17,17,18,18,
%T 18,19,19,19,19,20,20,20,20,21,21,21,21,21,22,22,22,23,23,23,23,23,23,
%U 24,24,24,24,25,25,25,25,25,26,26,26,26,26,27,27,27,27,27,27
%N Numbers k for which 10 divides prime(k)-prime(j) for some j<k; each k occurs once for each such j.
%C For a guide to related sequences, see A205558.
%e The first six terms match these differences:
%e p(6)-p(2)=13-3=10=10*1
%e p(7)-p(4)=17-7=10=10*1
%e p(9)-p(2)=23-3=20=10*2
%e p(9)-p(6)=23-13=10=10*1
%e p(10)-p(8)=29-19=10=10*1
%e p(11)-p(5)=31-11=20=10*2
%t s[n_] := s[n] = Prime[n]; z1 = 900; z2 = 70;
%t f[n_] := f[n] = Floor[(-1 + Sqrt[8 n - 7])/2];
%t Table[s[n], {n, 1, 30}] (* A000040 *)
%t u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]
%t Table[u[m], {m, 1, z1}] (* A204890 *)
%t v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
%t w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
%t d[n_] := d[n] = Delete[w[n], Position[w[n], 0]]
%t c = 10; t = d[c] (* A205718 *)
%t k[n_] := k[n] = Floor[(3 + Sqrt[8 t[[n]] - 1])/2]
%t j[n_] := j[n] = t[[n]] - f[t][[n]] (f[t[[n]]] + 1)/2
%t Table[k[n], {n, 1, z2}] (* A205720 *)
%t Table[j[n], {n, 1, z2}] (* A205721 *)
%t Table[s[k[n]], {n, 1, z2}] (* A205722 *)
%t Table[s[j[n]], {n, 1, z2}] (* A205723 *)
%t Table[s[k[n]] - s[j[n]], {n, 1, z2}] (* A205724 *)
%t Table[(s[k[n]] - s[j[n]])/c, {n, 1, z2}] (* A205725 *)
%Y Cf. A205558, A204892, A204890, A205725.
%K nonn
%O 1,1
%A _Clark Kimberling_, Jan 31 2012