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.

A161665 Primes that can be represented as a sum of 2 and also as a sum of 3 distinct nonzero squares, sharing a term in the sums.

This page as a plain text file.
%I A161665 #5 Aug 06 2015 21:03:31
%S A161665 29,101,109,149,173,181,229,233,241,269,293,389,401,409,421,433,449,
%T A161665 521,569,641,661,677,701,757,761,769,797,821,857,877,881,941,1021,
%U A161665 1069,1097,1109,1117,1181,1229,1237,1277,1289,1301,1373,1381,1429,1433,1481,1549
%N A161665 Primes that can be represented as a sum of 2 and also as a sum of 3 distinct nonzero squares, sharing a term in the sums.
%C A161665 Dropping the requirement of one shared term, we would get the supersequence 17, 29, 41, 53, 61, 73, ... - _R. J. Mathar_, Oct 04 2009
%e A161665 The prime 29 has the representations 29 = 2^2+ 5^2 = 2^2+3^2+4^2, sharing 2^2.
%e A161665 The prime 101 has the representations 101 = 1^2+10^2 = 1^2+6^2+8^2, sharing 1^2.
%e A161665 The prime 109 has the representations 109 = 3^2+10^2 = 3^2+6^2+8^2, sharing 3^2.
%e A161665 The prime 149 has the representations 149 = 7^2+10^2 = 6^2+7^2+8^2, sharing 7^2.
%t A161665 f[n_]:=Module[{k=1},While[(n-k^2)^(1/2)!=IntegerPart[(n-k^2)^(1/2)],k++; If[2*k^2>=n,k=0;Break[]]];k]; lst={};Do[a=f[n];If[a>0,b=f[n-(f[n])^2]; If[b>0,c=(n-a^2-b^2)^(1/2);If[a!=b&&a!=c,If[PrimeQ[n],AppendTo[lst, n]]]]],{n,3,4*6!}];lst
%Y A161665 Cf. A002114, A085317.
%K A161665 nonn
%O A161665 1,1
%A A161665 _Vladimir Joseph Stephan Orlovsky_, Jun 15 2009
%E A161665 Definition reverse-engineered from program by _R. J. Mathar_, Oct 04 2009