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.

A204065 Least nonnegative integer k with n+k and n+k^2 both prime.

This page as a plain text file.
%I A204065 #16 Jan 14 2013 02:05:14
%S A204065 1,0,0,1,0,1,0,3,2,1,0,1,0,3,2,1,0,1,0,3,16,1,0,7,4,15,2,1,0,1,0,9,8,
%T A204065 3,6,1,0,3,2,1,0,1,0,3,8,1,0,5,10,3,10,1,0,5,4,15,2,1,0,1,0,21,4,3,6,
%U A204065 1,0,15,2,1,0,1,0,33,8,25,6,1,0,3,16,1,0,5,4,15,14,1,0,7,6,9,4,3,6,1,0,3,2,1
%N A204065 Least nonnegative integer k with n+k and n+k^2 both prime.
%C A204065 Conjecture: For any n > 0 not among 1, 21, 326, 341, 626, we have a(n) < sqrt(n)*log(n). If n > 626 is not equal to 971, then n+k and n+k^2 are both prime for some 0< k < sqrt(n)*log(n). Also, n+k^2 is prime for some 0< k <= sqrt(n) if n > 43181.
%C A204065 Obviously, a(n)=0 iff n is a prime. - _M. F. Hasler_, Jan 11 2013
%H A204065 Zhi-Wei Sun, <a href="/A204065/b204065.txt">Table of n, a(n) for n = 1..10000</a>
%H A204065 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588.
%e A204065 a(8)=3 since 8+3 and 8+3^2 are both prime, but none of 8, 8+1, 8+2 is prime.
%t A204065 Do[Do[If[PrimeQ[n+k]==True&&PrimeQ[n+k^2]==True,Print[n," ",k];Goto[aa]],{k,0,n}];
%t A204065 Label[aa];Continue,{n,1,100}]
%o A204065 (PARI) a(n)=my(k=0); while(!isprime(n+k) || !isprime(n+k^2), k++); k \\ - _M. F. Hasler_, Jan 11 2013
%Y A204065 Cf. A185636, A071558.
%K A204065 nonn
%O A204065 1,8
%A A204065 _Zhi-Wei Sun_, Jan 09 2013