cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085099 Least natural number k such that k^2 + n is prime.

This page as a plain text file.
%I A085099 #32 Feb 04 2019 19:41:30
%S A085099 1,1,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,4,1,6,7,2,9,2,1,12,1,4,3,2,3,
%T A085099 6,1,2,3,2,1,24,1,2,3,4,1,6,5,2,3,4,1,6,5,2,9,2,1,18,1,6,3,2,3,6,1,2,
%U A085099 9,2,1,6,1,4,3,2,5,6,1,2,3,4,1,12,5,2
%N A085099 Least natural number k such that k^2 + n is prime.
%C A085099 First values of k and n such that k > 100 are: k=114, n=6041; for k > 200: k=210, n=26171; for k > 300: k=357, n=218084; for k > 400: k=402, n=576239.
%C A085099 Additionally, for k > 500: k=585, n=3569114; for k > 600: k=630, n=3802301; for k > 700: k=744, n=24307841; for k > 800: k=855, n=25051934; for k > 900: k=1008, n=54168539. Other cases k > 900: k=945, n=74380946, k=915, n=89992964, k=939, n=118991066. - _Zak Seidov_, May 23 2007
%C A085099 It is easily proved that for n > 2, a(n) >= A089128(n+1). The first inequality is a(21) = 4. - _Franklin T. Adams-Watters_, May 16 2018
%H A085099 Zak Seidov, <a href="/A085099/b085099.txt">Table of n, a(n) for n = 1..10000</a>
%F A085099 a(n) = sqrt(A059843(n) - n). - _Zak Seidov_, Nov 24 2011
%p A085099 a:= proc(n) local d, t; d, t:= 1, n+1; while not
%p A085099       isprime(t) do d:= d+2; t:= t+d od; (d+1)/2
%p A085099     end:
%p A085099 seq(a(n), n=1..100);  # _Alois P. Heinz_, Feb 04 2019
%t A085099 Table[i = 1; While[! PrimeQ[i^2 + n], i++]; i, {n, 85}] (* _Jayanta Basu_, Apr 24 2013 *)
%o A085099 (PARI) a(n)=my(k); while(!isprime(k++^2+n),); k \\ _Charles R Greathouse IV_, Jul 17 2016
%Y A085099 Cf. A059843, A200926, A058055, A053000, A089128.
%K A085099 nonn,easy
%O A085099 1,3
%A A085099 _Jason Earls_, Aug 10 2003