OFFSET
1,3
COMMENTS
Number of cuboids of maximal side length n having integral shortest path going on the surface from one vertex to the opposite one.
Number of subsets {a,b} of {1..n} such that (a+b,n) form the shorter two legs of a Pythagorean triple.
For all primes p, p > 3: a(p)=0 (this directly follows from SierpiĆski's proof that one of the shorter sides of a Pythagorean triple must be a multiple of 3, and one must be a multiple of 4). - Michael Turniansky, Jul 27 2016
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..4096
Project Euler, Problem 86: Cuboid route
EXAMPLE
For n=3, we have the 3 X 3 X 1 and the 3 X 2 X 2 cuboid, for which the shortest path on the surface from one vertex to the opposite is of integral length sqrt(3^2 + (2+2)^2) = sqrt(3^2 + (3+1)^2) = 5.
For n=4, there is the 4 X 2 X 1 cuboid having this property.
For n=1,2 and 5 there is no cuboid having this property, i.e., no s >= 2, s <= 2n such that s^2 + n^2 would be a square.
PROG
(PARI) A143714(M)=sum(a=1, M, sum(b=a, M, issquare((a+b)^2+M^2)))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Aug 29 2008
STATUS
approved