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.

A231883 Number of ways to write n = x + y (x, y > 0) with x^2 + (n-2)*y^2 prime.

This page as a plain text file.
%I A231883 #14 Nov 21 2013 08:58:52
%S A231883 0,0,2,2,2,2,4,1,5,2,5,1,4,4,3,1,7,2,3,3,6,7,3,2,6,2,9,3,8,3,10,3,5,8,
%T A231883 8,4,7,5,13,4,12,6,7,6,8,10,14,4,17,9,9,6,9,5,8,5,9,7,12,10,11,7,11,8,
%U A231883 12,4,13,3,22,6,16,7,14,8,10,4,14,4,17,9,16,6,12,11,14,4,21,4,21,8,18,3,11,14,23,7,22,5,23,8
%N A231883 Number of ways to write n = x + y (x, y > 0) with x^2 + (n-2)*y^2 prime.
%C A231883 Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 8, 12, 16. Moreover, if m and n are positive integers with m >= max{2, n-1} and gcd(m, n+1) = 1, then x^2 + n*y^2 is prime for some positive integers x and y with x + y = m, except for the case m = n + 3 = 29.
%C A231883 (ii) Let m and n be integers greater than one with m >= (n-1)/2 and gcd(m, n-1) = 1. Then x + n*y is prime for some positive integers x and y with x + y = m.
%C A231883 (iii) Any integer n > 3 not equal to 12 or 16 can be written as x + y (x, y > 0) with (n-2)*x - y and (n-2)*x^2 + y^2 both prime.
%H A231883 Zhi-Wei Sun, <a href="/A231883/b231883.txt">Table of n, a(n) for n = 1..10000</a>
%H A231883 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, preprint, arXiv:1211.1588.
%e A231883  a(8) = 1 since 8 = 5 + 3 with 5^2 + (8-2)*3^2 = 79 prime.
%e A231883 a(12) = 1 since 12 = 11 + 1 with 11^2 + (12-2)*1^2 = 131 prime.
%e A231883 a(16) = 1 since 16 = 15 + 1 with 15^2 + (16-2)*1^2 = 239 prime.
%t A231883 a[n_]:=Sum[If[PrimeQ[x^2+(n-2)*(n-x)^2],1,0],{x,1,n-1}]
%t A231883 Table[a[n],{n,1,100}]
%Y A231883 Cf. A000040, A036468, A219842, A219864, A220417, A232174, A232186, A232194.
%K A231883 nonn
%O A231883 1,3
%A A231883 _Zhi-Wei Sun_, Nov 21 2013