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.

A174054 Primes of the form x^2+y^2 such that L(x)*L(y) = -1, where L is the Liouville lambda-function A008836.

This page as a plain text file.
%I A174054 #12 Dec 26 2023 12:11:34
%S A174054 5,41,61,109,137,149,157,229,269,281,317,389,397,401,461,509,557,601,
%T A174054 617,653,701,769,773,797,829,857,877,937,941,977,997,1009,1013,1061,
%U A174054 1093,1097,1153,1181,1213,1217,1229,1249,1277,1289,1321,1409,1453,1489
%N A174054 Primes of the form x^2+y^2 such that L(x)*L(y) = -1, where L is the Liouville lambda-function A008836.
%e A174054 5 = 1 + 2^2 and L(1)*L(2)= (1) *(-1) = -1.
%e A174054 41 = 4^2 + 5^2 and L(4)*L(5)= (1)*(-1) = -1
%p A174054 isA174054 := proc(n)
%p A174054         local x,y ;
%p A174054         if not isprime(n) then
%p A174054                 return false;
%p A174054         end if;
%p A174054         for x from 1 do
%p A174054                 if x^2 > n then
%p A174054                         return false;
%p A174054                 end if;
%p A174054                 if issqr(n-x^2) then
%p A174054                         y := sqrt(n-x^2) ;
%p A174054                         if A008836(x) * A008836(y) = -1 then
%p A174054                                 return true;
%p A174054                         end if;
%p A174054                 end if;
%p A174054         end do:
%p A174054 end proc:
%p A174054 for n from 1 to 2000 do
%p A174054         if isA174054(n) then
%p A174054                 printf("%d,\n",n) ;
%p A174054         end if;
%p A174054 end do: # _R. J. Mathar_, Jul 09 2012
%t A174054 lambdaQ[{x_, y_}] := LiouvilleLambda[x]*LiouvilleLambda[y] == -1; Select[ Prime /@ Range[300], Or @@ lambdaQ /@ PowersRepresentations[#, 2, 2] &] (* _Jean-François Alcover_, Jul 30 2013 *)
%Y A174054 Cf. A174050, A002313.
%K A174054 nonn
%O A174054 1,1
%A A174054 _Michel Lagneau_, Mar 06 2010