login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204908 Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k) is the k-th prime >=5. 14
2, 2, 3, 3, 5, 3, 6, 4, 7, 5, 8, 5, 9, 6, 10, 7, 11, 7, 12, 9, 13, 8, 14, 8, 16, 9, 15, 11, 18, 10, 17, 10, 18, 11, 21, 11, 20, 12, 21, 13, 22, 13, 23, 16, 23, 14, 24, 14, 25, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

See A204892 for a discussion and guide to related sequences.

LINKS

Jinyuan Wang, Table of n, a(n) for n = 1..1000

MATHEMATICA

s[n_] := s[n] = Prime[n + 2]; z1 = 400; z2 = 50;

Table[s[n], {n, 1, 30}] (* primes >=5 *)

u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]

Table[u[m], {m, 1, z1}]     (* A204906 *)

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

Table[d[n], {n, 1, z2}]     (* A204907 *)

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

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

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

Table[k[n], {n, 1, z2}]     (* A204908 *)

Table[j[n], {n, 1, z2}]     (* A204909 *)

Table[s[k[n]], {n, 1, z2}]  (* A204910 *)

Table[s[j[n]], {n, 1, z2}]  (* A204911 *)

PROG

(PARI) a(n) = {my(p=5, k=1); while(sum(i=5, p-1, isprime(i)&&(p-i)%n==0)==0, p=nextprime(p+1); k++); k; } \\ Jinyuan Wang, Jan 30 2020

CROSSREFS

Cf. A000040, A204892, A204900.

Sequence in context: A204987 A102347 A230846 * A340265 A339696 A263027

Adjacent sequences:  A204905 A204906 A204907 * A204909 A204910 A204911

KEYWORD

nonn

AUTHOR

Clark Kimberling, Jan 20 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 27 20:18 EDT 2021. Contains 348290 sequences. (Running on oeis4.)