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?
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?
It is shown in OEIS A090025 where the formula $a(n) = \sum_{k=1}^n\mu(k)((\lfloor n/k\rfloor+1)^3-1)$is given. You can decide if you think that is simple.