OFFSET
1,1
COMMENTS
Inspired by geometric interpretation of A030078.
Obviously, there is only one solution for a, b and c to the equation p X p X p = a X b X c where p is prime, if a > 1, b > 1 and c > 1. So there can be only one rectangular prism that is composed of p^3 unit cubes, if a > 1, b > 1 and c > 1. That rectangular prism is the p X p X p cube. Its uniqueness is a motivation for this sequence.
The number of unit cubes that have a side on the surface of the p X p X p cube is p^3 - (p-2)^3 = 6*p^2 - 12*p + 8.
EXAMPLE
For the 5 X 5 X 5 cube, composed of 125 unit cubes, there are 98 unit cubes that have a side on the surface of the cube.
MATHEMATICA
Table[6 Prime[n]^2 - 12 Prime[n] + 8, {n, 50}] (* Vincenzo Librandi, Sep 08 2015 *)
PROG
(PARI) vector(45, n, 6*prime(n)^2-12*prime(n)+8)
(PARI) a(n, p=prime(n))=6*p^2-12*p+8 \\ Charles R Greathouse IV, Sep 08 2015
(Magma) [6*NthPrime(n)^2-12*NthPrime(n)+8: n in [1..40]]; // Vincenzo Librandi, Sep 08 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Sep 07 2015
STATUS
approved