We're asked to use Euler's Theorem to prove this.
What I've tried:
ϕ(1729)=ϕ(7)ϕ(13)ϕ(19)=1296 .
If (a,n)=1 then a1296≡1(mod 1729) . I note that 1296=362 and that something equivalent to what I need to prove is
a(a36−1)≡0(mod 1729).

I am now wondering what are the conditions for an≡bn(mod m) implying a≡b(mod m) so then I can say (a36)36≡1(mod 1729) implies a36≡1(mod 1729) at which point the equivalent statement would be true.
 
                        
 
It is not much more work (and more insightful) to prove the general case, a variant of which characterizes Carmichael numbers (composites that behave like primes do in little Fermat).
Theorem (Korselt's Pseudoprime Criterion)   For 1<e,n∈N we have
∀a∈Z: n∣ae−a ⟺ n  is  squarefree,  and  p−1∣e−1 for all primes  p∣n

Proof   (⇐)   Since a squarefree natural divides another iff all its prime factors do, we need only show p∣ae−a for each prime p∣n, i.e. that a≢0⇒ae−1≡1  (mod p), which, since p−1∣e−1, follows from a≢0⇒ap−1≡1  (mod p), by little Fermat.
(⇒)   Given that n∣ae−a for all a∈Z, we must show
(1)  n is squarefree,and(2)  p∣n⇒p−1∣e−1

(1)   If n isn't squarefree then 1≠a2∣n∣ae−a⇒a2∣a⇒⇐ (note  e>1⇒a2∣ae)
(2)   Let  a  be a generator of the multiplicative group of Z/p. Thus  a  has order p−1. Now p∣n∣a(ae−1−1) but p∤a, so ae−1≡1 (mod p), therefore e−1 must be divisible by p−1, the order of  a (mod p). QED
  • Thank you very much, I like this. If I can find a proof using Euler's theorem I could come back and submit that as well. – Frudrururu Mar 25 '13 at 2:17
                
 
I think it's better to think about this problem using the Chinese remainder theorem. That is, since we have the ring isomorphism Z/1729≅Z/7×Z/13×Z/19 , via the map m↦(m mod 7, m mod 13, m mod 19) , it is enough to verify that a37=a mod x where x is any one of 7,13 and 19 . But this follows from Fermat's little theorem.
 
 
        
 
                
 
Fermat's Little Theorem is weak. No wonder it's called "little". Euler's Theorem is also pathetic. What you gotta use is Carmichael's Theorem. It states that if (a,n)=1 , then aλ(n)≡1modn . To calculate λ(n) , let the prime factorization of n be ∏piai. Then we have
λ(n)=lcm[λ(p1a1),λ(p2a2)...λ(pkak)]

It may help to know that for p>2 , k≥0 , we have λ(pk)=ϕ(pk) .
Furthermore, λ(2n)=aϕ(2n) where a=1 if n≤2 and a=0.5 otherwise.
We compute λ(1729)=lcm[λ(7),λ(13),λ(19)]=lcm(6,12,18)=36 and the result follows.
As an added bonus, you cannot get any better than this. λ(n) is the lowest number such that ∀(a,n)=1, aλ(n)≡1modn