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.
%I A349664 #33 Dec 20 2021 02:44:23 %S A349664 0,1,2,3,2,7,2,5,4,7,2,17,2,7,12,7,2,13,2,17,12,7,2,27,4,7,6,17,2,37, %T A349664 2,9,12,7,12,31,2,7,12,27,2,37,2,17,22,7,2,37,4,13,12,17,2,19,12,27, %U A349664 12,7,2,87,2,7,22,11,12,37,2,17,12,37,2,49,2,7,22 %N A349664 a(n) is the number of solutions for n^4 = z^2 - x^2 with {z,x} >= 1. %C A349664 If n is an odd prime^i, the number of solutions is 2*i. %C A349664 If n = 2^i, the number of solutions is 2*i-1. %C A349664 These two facts are not generally valid in reverse for terms > 6. %C A349664 If a(n) = 2, n is an odd prime. This is generally valid in reverse. %C A349664 For more information about these facts see the link. %C A349664 The calculation of the terms is done with an algorithm of _Jon E. Schoenfield_, which is described in A349324. %C A349664 Conditions to be satisfied for a valid, countable solution: %C A349664 - z cannot be a square. %C A349664 - z must have at least one prime factor of the form p == 1 (mod 4), a Pythagorean prime (A002144). %C A349664 - If z has prime factors of the form p == 3 (mod 4), which are in A002145, then they must appear in the prime divisor sets of x and n too. %C A349664 - If z is even, x and n must be even too. %C A349664 - The lower limit of the ratio x/n is sqrt(2). %C A349664 - high limits of z and x: %C A349664 | n is odd | n is even %C A349664 ---------+------------------+------------------ %C A349664 z limit | (n^4 + 1)/2 | (n^4 + 4)/4 %C A349664 x limit | (n^4 + 1)/2 - 1 | (n^4 + 4)/4 - 2 %H A349664 Karl-Heinz Hofmann, <a href="/A349664/b349664.txt">Table of n, a(n) for n = 1..10000</a> %H A349664 Karl-Heinz Hofmann, <a href="/A349664/a349664_1.pdf">What the terms can tell about n</a>. %e A349664 a(6) = 7 (solutions): 6^4 = 1296 = 325^2 - 323^2 = 164^2 - 160^2 = 111^2 - 105^2 = 85^2 - 77^2 = 60^2 - 48^2 = 45^2 - 27^2 = 39^2 - 15^2. %t A349664 a[n_] := Length[Solve[n^4 == z^2 - x^2 && x >= 1 && z >= 1, {x, z}, Integers]]; Array[a, 75] (* _Amiram Eldar_, Dec 14 2021 *) %o A349664 (PARI) a(n) = numdiv(if(n%2, n^4, n^4/4))\2; \\ _Jinyuan Wang_, Dec 19 2021 %Y A349664 Cf. A000290, A000583, A271576, A349663, A002144, A002145, A346115. %Y A349664 Cf. A345645, A345700, A345968, A346110, A348655, A349324. %K A349664 nonn %O A349664 1,3 %A A349664 _Karl-Heinz Hofmann_, Dec 13 2021