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!)
A204916 Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k)=(prime(k))^2. 6

%I #5 Mar 30 2012 18:58:08

%S 2,3,3,3,2,4,3,3,4,4,6,4,5,5,4,3,8,5,7,4,3,7,10,4,9,8,10,5,11,6,10,5,

%T 6,9,7,5,14,11,5,4,14,7,13,7,4,10,16,5,15,11,8,8,17,11,6,5,7,13,18,6

%N Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k)=(prime(k))^2.

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

%t s[n_] := s[n] = Prime[n]^2; z1 = 1000; z2 = 60;

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

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

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

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

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

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

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

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

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

%Y Cf. A000040, A204892, A204900, A204908.

%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 23 07:57 EDT 2024. Contains 371905 sequences. (Running on oeis4.)