The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103381 Numbers which are the sum of four distinct squares, a^2+b^2+c^2+d^2, such that a^2+b^2, c^2+d^2, a^2+d^2 and b^2+c^2 are all prime. 3
46, 66, 78, 102, 114, 126, 142, 154, 162, 174, 198, 222, 246, 262, 270, 274, 282, 286, 294, 298, 318, 322, 334, 342, 354, 366, 378, 382, 394, 402, 406, 414, 426, 438, 442, 454, 462, 486, 498, 502, 510, 518, 522, 526, 534, 538, 546, 550, 558, 562, 574, 582 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Such primes must be == 1 mod 4. All the terms of the sequence are of the form 4*k+2.
LINKS
EXAMPLE
46 = 1^2+2^2+5^2+4^2 = 5+41 = 17+29
102 = 3^2+2^2+5^2+8^2 = 13+89 = 73+29
MATHEMATICA
t = Partition[ Flatten[ Table[{a^2 + b^2 + c^2 + d^2, a^2, b^2, c^2, d^2}, {d, 4, 20}, {c, 3, d - 1}, {b, 2, c - 1}, {a, b - 1}]], 5]; lst = {}; lg = Length[t]; Do[a = t[[n, 2]]; b = t[[n, 3]]; c = t[[n, 4]]; d = t[[n, 5]]; If[ Drop[ Sort[ Join[ {Mod[a + b, 4] == 1 && Mod[c + d, 4] == 1 && PrimeQ[a + b] && PrimeQ[c + d]}, {Mod[a + c, 4] == 1 && Mod[b + d, 4] == 1 && PrimeQ[a + c] && PrimeQ[b + d]}, {Mod[a + d, 4] == 1 && Mod[b + c, 4] == 1 && PrimeQ[a + d] && PrimeQ[b + c]}]], 1] == {True, True}, AppendTo[ lst, t[[n, 1]] ]], {n, lg}]; Take[ Union[ lst], 52] (* Robert G. Wilson v, Mar 25 2005 *)
apQ[{a_, b_, c_, d_}]:=AllTrue[{a+b, c+d, a+d, b+c}, PrimeQ]; Total/@Select[ Flatten[ Permutations/@Subsets[Range[20]^2, {4}], 1], apQ]//Union (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 22 2018 *)
CROSSREFS
Sequence in context: A020175 A118698 A350203 * A101577 A051413 A167283
KEYWORD
nonn
AUTHOR
Robin Garcia, Mar 20 2005
EXTENSIONS
Edited by Don Reble and Robert G. Wilson v, Mar 25 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 06:48 EDT 2024. Contains 372743 sequences. (Running on oeis4.)