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.

A287799 If x^2 + 2*y^2 is prime for all positive integers x and y with m = x*y then m is in the sequence.

This page as a plain text file.
%I A287799 #50 Aug 17 2025 01:41:28
%S A287799 1,3,21,33,123,219,321,3453,6621,16521,18273,25089,27831,29787,62313,
%T A287799 69981,75459,95577,101301,105459,157299,196239,197481,247047,259797,
%U A287799 281433,359943,390237,418881,460821,529167,569559,595869,680307,727341,945141,955569,964401
%N A287799 If x^2 + 2*y^2 is prime for all positive integers x and y with m = x*y then m is in the sequence.
%C A287799 a(n) == 3, 15 (mod 18), for n >= 2.
%C A287799 It seems that a(n) = 3*p where p is a prime, for n >= 3.
%C A287799 a(n) is squarefree. - _David A. Corneth_, Jun 01 2017
%C A287799 From _Robert Israel_, Jul 14 2017: (Start)
%C A287799 a(149) = 13304379 = 3*11*403163 is not of the form 3*p.
%C A287799 The generalized Bunyakovsky conjecture implies that there are infinitely many terms of the form 3*p, and infinitely many of the form 3*11*p. (End)
%H A287799 Robert Israel, <a href="/A287799/b287799.txt">Table of n, a(n) for n = 1..300</a>
%H A287799 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bunyakovsky_conjecture">Bunyakovsky conjecture</a>.
%e A287799 1 = 1*1 and 1^2 + 2*1^2 = 3, a prime.
%e A287799 21 = 1*21 = 3*7 = 21*1 = 7*3 => 1^2 + 2*21^2 = 883, 3^2 + 2*7^2 = 107, 21^2 + 2*1^2 = 443 and 7^2 + 2*3^2 = 67 are primes.
%p A287799 filter:= proc(m)
%p A287799    andmap(x -> isprime(x^2 + 2*(m/x)^2),
%p A287799   numtheory:-divisors(m));
%p A287799 end proc:
%p A287799 select(filter, [1, seq(seq(18*i+j, j=[3,15]),i=0..10^5)]); # _Robert Israel_, Jul 14 2017
%t A287799 A287799 = {}; Do[ds = Divisors[n]; If[EvenQ[Length[ds]], flag = True; k = 1; While[k <= Length[ds]/2 && (criterion1 = PrimeQ[ds[[k]]^2 + 2 * ds[[-k]]^2]) && (criterion2 = PrimeQ[ds[[-k]]^2 + 2 * ds[[k]]^2]), k++]; If[criterion1 && criterion2, AppendTo[A287799, n]]], {n, 2, 10^6}]; A287799
%o A287799 (PARI) is(n) = d=divisors(n); for(i=1,#d, if(!isprime(d[i]^2 + 2*d[#d-i+1]^2), return(0))); n > 1 \\ _David A. Corneth_, Jun 01 2017
%o A287799 (Sage)
%o A287799 R = range(1,100000)
%o A287799 [m for m in R if all(is_prime(d^2+2*(m//d)^2) for d in divisors(m))] # _Peter Luschny_, Jun 18 2017
%Y A287799 Cf. A000040, A005117, A236423 (with x^2+y^2 instead of x^2+2*y^2).
%Y A287799 Subsequence of A067201. - _Michel Marcus_, Jun 03 2017
%Y A287799 Cf. A002332, A002333.
%K A287799 nonn
%O A287799 1,2
%A A287799 _Michel Lagneau_, Jun 01 2017
%E A287799 Name reformulated and m=1 added by _Wolfdieter Lang_, Jun 20 2017