This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A196815 Smallest index k such that prime(k+n) - prime(k) is a perfect square. 3
 1, 2, 14, 1, 4, 2, 18, 9, 7, 3, 29, 21, 19, 12, 8, 4, 2, 31, 21, 19, 11, 1, 59, 4, 2, 22, 24, 15, 16, 8, 6, 3, 36, 37, 174, 21, 18, 11, 12, 63, 78, 189, 38, 2, 27, 25, 112, 1, 107, 12, 6, 4, 45, 169, 28, 33, 21, 112, 14, 9, 10, 6, 4, 44, 37, 153, 151, 29, 27 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS The corresponding primes are in A196874. LINKS Robert Israel, Table of n, a(n) for n = 1..10000 EXAMPLE a(1) = 1 because prime(1) = 2 is the initial prime of a subset of 2 consecutive primes {2, 3} such that 3 - 2 = 1 = 1^2; a(3) = 14 because prime(14) = 43 is the initial prime of a subset of 4 consecutive primes {43, 47, 53, 59} such that 59 - 43 = 16 = 4^2. MAPLE A196815 := proc(n)         for k from 1 do                 if issqr(ithprime(k+n)-ithprime(k)) then                         return k;                 end if;         end do: end proc: seq(A196815(n), n=1..80) ; # R. J. Mathar, Oct 06 2011 MATHEMATICA spk[n_]:=Module[{k=1}, While[!IntegerQ[Sqrt[Prime[n+k]-Prime[k]]], k++]; k]; Array[spk, 70] (* Harvey P. Dale, Jul 23 2012 *) PROG (PARI) a(n) = {my(k=1); while (! issquare(prime(k+n)- prime(k)), k++); k; } \\ Michel Marcus, Dec 28 2015 CROSSREFS Cf. A000040. Sequence in context: A219221 A249510 A324219 * A260120 A221234 A133420 Adjacent sequences:  A196812 A196813 A196814 * A196816 A196817 A196818 KEYWORD nonn AUTHOR Michel Lagneau, Oct 06 2011 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.

Last modified October 16 13:51 EDT 2019. Contains 328093 sequences. (Running on oeis4.)