2
$\begingroup$

I'm trying to write a code for finding the number of distinct lines in a 3d cube of size n. I started counting manually for $n = 1, 2, 3$ and $4$. I got the sequence: $0, 7, 19, 49, 91 ..$

Is there a simple function of n that governs this sequence?

  • 2
    Use OEIS: http://oeis.org/A0900252012-06-14

1 Answers 1