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.

A341678 Irregular triangle read by rows: row n consists of all numbers x such that x^2 + y^2 = A006278(n), with 0 < x < y.

This page as a plain text file.
%I A341678 #41 Feb 16 2025 08:34:01
%S A341678 1,1,4,4,9,12,23,2,19,46,67,74,86,109,122,64,103,167,191,236,281,292,
%T A341678 359,449,512,568,601,607,664,673,743,59,132,531,581,627,876,1008,1284,
%U A341678 1588,1659,1723,2092,2136,2317,2373,2736,2757,2803,3072,3164,3333,3469,3704,3821,4028,4077,4136,4371,4596,4668,4712,4851
%N A341678 Irregular triangle read by rows: row n consists of all numbers x such that x^2 + y^2 = A006278(n), with 0 < x < y.
%C A341678 The n-th row of the triangle is of length 2^(n-1), since a product of n distinct primes congruent to 1 (mod 4) has 2^(n-1) solutions to being the sum of two squares.
%H A341678 Andrew Howroyd, <a href="/A341678/b341678.txt">Table of n, a(n) for n = 1..1023</a> (rows 1..10)
%H A341678 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SumofSquaresFunction.html">Sum of Squares Function</a>
%e A341678 Triangle starts:
%e A341678 1,
%e A341678 1, 4,
%e A341678 4, 9, 12, 23,
%e A341678 2, 19, 46, 67, 74, 86, 109, 122,
%e A341678 64, 103, 167, 191, 236, 281, 292, 359, 449, 512, 568, 601, 607, 664, 673, 743,
%e A341678 ...
%e A341678 In the second row, calculations are as follows. 5*13 is the product of the first two primes congruent to 1 (mod 4), and 65 = 1^2 + 8^2 = 4^2 + 7^2, so the second row is 1, 4.
%o A341678 (PARI) row(n) = {my(t=1, q=3, v=vector(2^n/2)); for(k=1, n, until(q%4==1, q=nextprime(q+1)); t*=q); q=0; for(k=1, #v, until(issquare(t-q^2), q++); v[k]=q); v; } \\ _Jinyuan Wang_, Mar 03 2021
%Y A341678 Cf. A006278, A230710.
%Y A341678 Cf. A236381 (1st column).
%K A341678 nonn,tabf
%O A341678 1,3
%A A341678 _Richard Peterson_, Feb 17 2021