Integers that can be expressed as $a^3+b^3+c^3-3abc$ $$S=\{a^3+b^3+c^3-3abc|a,b,c\in\Bbb Z\}$$
Can we decide $S$? that is,  we want to find all integers of the form $a^3+b^3+c^3-3abc$.
obviously, 


*

*if $m,n\in S$, then $mn\in S$, so we only need to consider primes;

*if $n\in S$, then $-n\in S$.


Let $f(a,b,c)=a^3+b^3+c^3-3abc$. $f(0,0,0)=0$, $f(1,0,0)=1$, $f(1,1,0)=2$, we get that $0,1,2\in S$
p.s. I find a solution for $a,b,c \geq0$: $n=2^rp_1^{r_1}\dotsb p_s^{r_s}$, $p_1< p_2<...$ are odd primes, then a suficient and necessary condition for $n$ can be expressed as $a^3+b^3+c^3-3abc$($a,b,c \geq0$) is $p_1>3$ or $p_1=3$ with $r_1\geq2$
 A: Note that $$(a\pm1)^3+a^3+a^3-3(a\pm1)a^2=3a^3\pm3a^2+3a\pm1-3a^3\mp3a^2=3a\pm1$$
and
$$(a+1)^3+a^3+(a-1)^3-3(a+1)a(a-1)=3a^3+6a-3a^3+3a=9a$$
Suppose $n=a^3+b^3+c^3-3abc$ where $n\in\mathbb Z$.
So we can get all $n$ such that $3\nmid n$ or $9\mid n$.
Note that $(3p+k)^3\equiv k^3\equiv k\ \ (\text{mod 9})$ for $k\in\{-1,0,1\}$. 
We can write $a=3p+k$, $b=3q+l$ and $c=3r+m$, where $k,l,m\in\{-1,0,1\}$. Then $$a^3+b^3+c^3-3abc\equiv k+l+m-3(3p+k)(3q+l)(3r+m)\equiv k+l+m-3klm\ \ (\text{mod }9)$$
Additionally
$$k+l+m-3klm\equiv k+l+m\ \ (\text{mod 3})$$
Suppose $3\mid n$. Then $3\mid k+l+m$.
If $k=0$, $l=0$ or $m=0$ the other two must be opposite, so $k+l+m-3klm=0$ and $9\mid n$. Else we can only have $k,l,m=-1$ or $k,l,m=1$. But in both of these cases we get $9\mid n$ too.
We can conclude the only possible values are such $n\in\mathbb Z$ that $3\nmid n$ or $9\mid n$.
A: Using the factorization $(a + b + c)(a^2 + b^2 + c^2 - ab - ac - bc)$, you can set equal to a given number $n$ and then use the linear substitution $a = m - b - c$ where $m$ divides $n$, and then you get a quadratic Diophantine equation in two variables from $a^2 + b^2 + c^2 - ab - ac - bc = n/m$. According to http://www.cs.nyu.edu/pipermail/fom/2006-December/011182.html , a quadratic is decidable over ${\mathbb Z}$. There are only finitely many possibilities for $m$ for a given $n$, so yes, the set $S$ of integers which have an integer solution to your equation is decidable in the algorithmic sense. See also https://mathoverflow.net/questions/51987/which-types-of-diophantine-equations-are-solvable, where the following quote is found:
"In a 1972 paper, C. L. Siegel [Nachr. Akad. Wiss. Göttingen Math.-Phys. Kl. II 1972, 21-46; MR0311578 (47 #140)] constructed an algorithm to determine whether an arbitrary quadratic equation had integer solutions." 
