login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204900 Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k) is the k-th odd prime. 23

%I #14 May 15 2017 15:03:32

%S 2,2,4,3,5,4,6,4,8,5,9,6,9,6,11,7,11,8,12,8,14,9,15,9,15,9,16,10,17,

%T 11,18,11,19,11,20,12,21,12,22,13,23,14,23,14,24,15,24,15,25,15,27,16,

%U 28,16,29,16,30,17,31,18,30,18,31,18,32,19,32,19,34,20,34,21,34

%N Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k) is the k-th odd prime.

%C See A204892 for a discussion and guide to related sequences

%t s[n_] := s[n] = Prime[n + 1]; z1 = 400; z2 = 50;

%t Table[s[n], {n, 1, 30}] (* A065091 *)

%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}] (* A204898 *)

%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] = First[Delete[w[n], Position[w[n], 0]]]

%t Table[d[n], {n, 1, z2}] (* A204899 *)

%t k[n_] := k[n] = Floor[(3 + Sqrt[8 d[n] - 1])/2]

%t m[n_] := m[n] = Floor[(-1 + Sqrt[8 n - 7])/2]

%t j[n_] := j[n] = d[n] - m[d[n]] (m[d[n]] + 1)/2

%t Table[k[n], {n, 1, z2}] (* A204900 *)

%t Table[j[n], {n, 1, z2}] (* A204901 *)

%t Table[s[k[n]], {n, 1, z2}] (* A204902 *)

%t Table[s[j[n]], {n, 1, z2}] (* A204903 *)

%t Table[s[k[n]] - s[j[n]], {n, 1, z2}] (* A204904 *)

%t Table[(s[k[n]] - s[j[n]])/n, {n, 1, z2}] (* A000034 conjectured *)

%Y Cf. A000040, A065091, A204892.

%K nonn

%O 1,1

%A _Clark Kimberling_, Jan 20 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)