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.

A173854 Smallest positive integer k such that 2^n + k^2 is a prime number.

This page as a plain text file.
%I A173854 #11 Jan 27 2019 21:35:13
%S A173854 1,1,1,3,1,3,3,3,1,3,3,9,9,9,7,15,1,15,3,9,5,21,5,3,11,57,7,21,9,33,3,
%T A173854 27,9,15,5,39,25,3,35,57,25,9,15,33,39,99,27,3,25,63,67,9,105,51,145,
%U A173854 33,9,3,15,57,15,243,13,111,9,15,3,81,71,21,5,21,19,33,57,81,141,51,17,33,125
%N A173854 Smallest positive integer k such that 2^n + k^2 is a prime number.
%C A173854 The list of associated primes 2^n + k^2 is 2, 3, 5, 17, 17, 41, 73, 137, 257, 521, 1033, ...
%C A173854 All terms are odd. - _Harvey P. Dale_, Dec 19 2014
%D A173854 Leonard E. Dickson: History of the Theory of numbers, vol. I, Dover Publications 2005
%D A173854 Louis J. Mordell: Diophantine equations, Academic Press Inc., 1969
%D A173854 Wolfgang M. Schmidt, Diophantine approximations and Diophantine equations, Lecture Notes in Mathematics vol. 785, Springer-Verlag, 2000
%H A173854 Harvey P. Dale, <a href="/A173854/b173854.txt">Table of n, a(n) for n = 0..1000</a>
%e A173854 2^0 + 1^2 = 2 = A000040(1) => a(0) = k = 1
%e A173854 2^1 + 1^2 = 3 = A000040(2) => a(1) = k = 1
%e A173854 2^2 + 1^2 = 5 = A000040(3) => a(2) = k = 1
%e A173854 2^3 + 3^2 = 17 = A000040(7) => a(3) = k = 3
%e A173854 2^61 + 243^2 = A000040(tbd) => a(61) = k = 243.
%p A173854 A173854 := proc(n) local twon,k ; twon := 2^n ; for k from 1 do if isprime(twon+k^2) then return k ; end if; end do ; end proc:
%p A173854 seq(A173854(n),n=0..90) ; # _R. J. Mathar_, Mar 05 2010
%t A173854 spi[n_]:=Module[{t=2^n,k=1},While[!PrimeQ[t+k^2],k=k+2];k]; Array[spi,90,0] (* _Harvey P. Dale_, Dec 19 2014 *)
%Y A173854 Cf. A013597, A014210.
%K A173854 nonn
%O A173854 0,4
%A A173854 Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 26 2010
%E A173854 Extended by _R. J. Mathar_, Mar 05 2010