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.

A334566 Number of solutions of the Diophantine equation z^2 - y^2 - x^2 = n > 0 when the positive integers, x, y and z, are consecutive terms of an arithmetic progression.

This page as a plain text file.
%I A334566 #51 Jul 31 2020 11:55:14
%S A334566 0,0,1,1,0,0,1,0,0,0,1,1,0,0,3,1,0,0,1,1,0,0,1,0,0,0,2,1,0,0,1,2,0,0,
%T A334566 3,2,0,0,2,0,0,0,1,1,0,0,1,1,0,0,2,1,0,0,3,0,0,0,1,3,0,0,4,2,0,0,1,1,
%U A334566 0,0,1,0,0,0,3,1,0,0,1,1,0,0,1,3,0,0,2,0
%N A334566 Number of solutions of the Diophantine equation z^2 - y^2 - x^2 = n > 0 when the positive integers, x, y and z, are consecutive terms of an arithmetic progression.
%C A334566 Inspired by the 135th and 136th problems of Project Euler (see links).
%C A334566 If d is the common difference of the arithmetic progression (x, y, z), then the Diophantine equation becomes (y+d)^2 - y^2 - (y-d)^2 = n <==> y^2 - 4dy + n = 0 <==> n = y * (4d-y).
%C A334566 If y is the average term, then y divides n.
%C A334566 Offset is 1 because for n = 0, every (x, y, z)= (3d, 4d, 5d) with d>0 would be solution.
%H A334566 Robert Israel, <a href="/A334566/b334566.txt">Table of n, a(n) for n = 1..10000</a>
%H A334566 Project Euler, <a href="https://projecteuler.net/problem=135">Problem 135: Same differences</a>
%H A334566 Project Euler, <a href="https://projecteuler.net/problem=136">Problem 136: Singleton difference</a>
%F A334566 a(n) = 0 iff n = 4q+1 (A016813), n = 4q+2 (A016825), n = 16q+8 (A051062), q>= 0.
%F A334566 a(n) >= 1 iff n = 4q+3, q >=0 (A004767), n = 16q, q>=1 (A008598), n = 16q+4, q>=0 (A119413), n = 16q+12, q>=0 (A098502).
%F A334566 a(4*q^2) >= 1, for q >= 1, since (q, 2q, 3q) is a solution.
%F A334566 a(p) = 1 for p = 4q+3 prime (A002145).
%F A334566 a(p^2) = 0 for p an odd prime (A065091).
%e A334566 a(3) = 1 because 4^2 - 3^2 - 2^2 = 3.
%e A334566 a(15) = 3 because 5^2 - 3^2 - 1^2 = 7^2 - 5^2 - 3^2 = 19^2 - 15^2 - 11^2 = 15.
%e A334566 If n = 4q+3, q >= 0 then (3q+2, 4q+3, 5q+4) is a solution.
%e A334566 If n = 16q, q >= 1 then (3q-1, 4q, 5q+1) is a solution.
%e A334566 If n = 16q+4, q >= 0 then (6q+1, 8q+2, 10q+3) is a solution.
%e A334566 If n = 16q+12, q >= 0 then (6q+4, 8q+6, 10q+8) is a solution.
%p A334566 f:= proc(n) local r; r:= floor(sqrt(n/3));
%p A334566 nops(select(t -> n/t + t mod 4 = 0 and t > r, numtheory:-divisors(n)))
%p A334566 end proc:
%p A334566 map(f, [$1..100]); # _Robert Israel_, Jul 31 2020
%t A334566 a[n_] := Length@ Solve[(4 d - x) x == n  && x>0 && x-d>0 && x+d>0, {d, x}, Integers]; Array[a, 90] (* _Giovanni Resta_, May 06 2020 *)
%Y A334566 Cf. A001248, A002145, A004767, A008598, A016813, A016825, A051062.
%Y A334566 Cf. A334567 (least value of n such that a(n) = k>0).
%K A334566 nonn
%O A334566 1,15
%A A334566 _Bernard Schott_, May 06 2020
%E A334566 More terms from _Giovanni Resta_, May 06 2020