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.

A242046 Least integer k > n + 1 such that n^2 + (n + 1)^2 + k^2 is prime.

This page as a plain text file.
%I A242046 #40 Aug 06 2015 11:58:14
%S A242046 2,6,4,6,24,14,8,12,16,24,24,14,14,24,16,20,42,20,26,54,30,26,30,28,
%T A242046 26,54,42,38,42,34,40,48,38,36,36,44,48,102,42,46,54,44,50,48,60,54,
%U A242046 66,50,54,54,54,54,54,56,64,84,58,62,84,64,66,78,64,66,84,74
%N A242046 Least integer k > n + 1 such that n^2 + (n + 1)^2 + k^2 is prime.
%C A242046 If n is in A027863 then a(n) = n + 2, otherwise a(n) > n + 2. All terms are even. Corresponding primes are 5, 41, 29, 61, 617, ...
%H A242046 Jens Kruse Andersen, <a href="/A242046/b242046.txt">Table of n, a(n) for n = 0..10000</a>
%t A242046 lk[n_]:=Module[{k=n+2,c=n^2+(n+1)^2},While[!PrimeQ[c+k^2],k++];k]; Array[ lk,70,0] (* _Harvey P. Dale_, Aug 06 2015 *)
%o A242046 (PARI) a(n)=k=n+2; while(!isprime(n^2+(n+1)^2+k^2), k++); k
%o A242046 vector(100,n,a(n-1)) \\ _Jens Kruse Andersen_, Aug 26 2014
%Y A242046 Cf. A027863.
%K A242046 nonn
%O A242046 0,1
%A A242046 _Zak Seidov_, Aug 24 2014
%E A242046 Corrected and extended by _Jens Kruse Andersen_, Aug 26 2014