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.

A359439 a(n) is the least number of the form p^2 + q^2 - 2 for primes p and q that is an odd multiple of 2^n, or -1 if there is no such number.

This page as a plain text file.
%I A359439 #41 Jan 05 2023 19:00:14
%S A359439 11,6,-1,56,16,32,192,128,2816,1536,15360,30720,12288,73728,147456,
%T A359439 32768,196608,1179648,22806528,11010048,34603008,31457280,314572800,
%U A359439 679477248,50331648,301989888,1006632960,10871635968,20132659200,4831838208,28991029248,173946175488,450971566080,77309411328
%N A359439 a(n) is the least number of the form p^2 + q^2 - 2 for primes p and q that is an odd multiple of 2^n, or -1 if there is no such number.
%C A359439 Suggested by an email from _J. M. Bergot_.
%C A359439 a(2) = -1 because if p and q are odd primes, p^2 + q^2 - 2 is divisible by 8.
%e A359439 a(0) = 11 = 2^2 + 3^2 - 2 = 11*2^0.
%e A359439 a(1) = 6 = 2^2 + 2^2 - 2 = 3*2^1.
%e A359439 a(3) = 56 = 3^2 + 7^2 - 2 = 7*2^3.
%e A359439 a(4) = 16 = 3^2 + 3^2 - 2 = 1*2^4.
%p A359439 f:= proc(n) local b,t,s,x,y;
%p A359439     t:= 2^n;
%p A359439     for b from 1 by 2  do
%p A359439       if ormap(s -> subs(s,x) <= subs(s,y) and isprime(subs(s,x)) and isprime(subs(s,y)), [isolve(x^2+y^2-2=b*t)]) then return b*t fi
%p A359439     od;
%p A359439 end proc:
%p A359439 f(2):= -1:
%p A359439 map(f, [$0..40]);
%Y A359439 Cf. A045636
%K A359439 sign
%O A359439 0,1
%A A359439 _Robert Israel_, Jan 02 2023