A Giuga number is a composite number n such that for each of its distinct prime factors pi we have 
  
    
      
        
          p
          
            i
          
        
        
          |
        
        
          (
          
            
              
                n
                
                  p
                  
                    i
                  
                
              
            
            −
            1
          
          )
        
      
    
    {\displaystyle p_{i}|\left({n \over p_{i}}-1\right)}
  
, or equivalently such that for each of its distinct prime factors pi we have 
  
    
      
        
          p
          
            i
          
          
            2
          
        
        
          |
        
        (
        n
        −
        
          p
          
            i
          
        
        )
      
    
    {\displaystyle p_{i}^{2}|(n-p_{i})}
  
. 
 The Giuga numbers are named after the mathematician Giuseppe Giuga, and relate to his conjecture on primality.
 Alternative definition for a Giuga number due to Takashi Agoh is:  a composite number n is a Giuga number if and only if the congruence
 holds true, where B is a Bernoulli number and 
  
    
      
        φ
        (
        n
        )
      
    
    {\displaystyle \varphi (n)}
  
 is Euler's totient function.
 An equivalent formulation due to Giuseppe Giuga is:  a composite number n is a Giuga number if and only if the congruence
 and if and only if
 All known Giuga numbers n in fact satisfy the stronger condition
 The sequence of Giuga numbers begins
 For example, 30 is a Giuga number since its prime factors are 2, 3 and 5, and we can verify that
 The prime factors of a Giuga number must be distinct. If 
  
    
      
        
          p
          
            2
          
        
      
    
    {\displaystyle p^{2}}
  
 divides 
  
    
      
        n
      
    
    {\displaystyle n}
  
, then it follows that 
  
    
      
        
          
            n
            p
          
        
        −
        1
        =
        m
        −
        1
      
    
    {\displaystyle {n \over p}-1=m-1}
  
, where 
  
    
      
        m
        =
        n
        
          /
        
        p
      
    
    {\displaystyle m=n/p}
  
 is divisible by 
  
    
      
        p
      
    
    {\displaystyle p}
  
.  Hence, 
  
    
      
        m
        −
        1
      
    
    {\displaystyle m-1}
  
 would not be divisible by 
  
    
      
        p
      
    
    {\displaystyle p}
  
, and thus 
  
    
      
        n
      
    
    {\displaystyle n}
  
 would not be a Giuga number. 
 Thus, only square-free integers can be Giuga numbers.  For example, the factors of 60 are 2, 2, 3 and 5, and 60/2 - 1 = 29, which is not divisible by 2. Thus, 60 is not a Giuga number.
 This rules out squares of primes, but semiprimes cannot be Giuga numbers either. For if 
  
    
      
        n
        =
        
          p
          
            1
          
        
        
          p
          
            2
          
        
      
    
    {\displaystyle n=p_{1}p_{2}}
  
, with 
  
    
      
        
          p
          
            1
          
        
        <
        
          p
          
            2
          
        
      
    
    {\displaystyle p_{1}<p_{2}}
  
 primes, then

  
    
      
        
          
            n
            
              p
              
                2
              
            
          
        
        −
        1
        =
        
          p
          
            1
          
        
        −
        1
        <
        
          p
          
            2
          
        
      
    
    {\displaystyle {n \over p_{2}}-1=p_{1}-1<p_{2}}
  
, so 
  
    
      
        
          p
          
            2
          
        
      
    
    {\displaystyle p_{2}}
  
 will not divide 
  
    
      
        
          
            n
            
              p
              
                2
              
            
          
        
        −
        1
      
    
    {\displaystyle {n \over p_{2}}-1}
  
, and thus 
  
    
      
        n
      
    
    {\displaystyle n}
  
 is not a Giuga number.
 Are there infinitely many Giuga numbers? All known Giuga numbers are even. If an odd Giuga number exists, it must be the product of at least 14 primes. It is not known if there are infinitely many Giuga numbers.
 It has been conjectured by Paolo P. Lava (2009) that Giuga numbers are the solutions of the differential equation n' = n+1, where n'  is the arithmetic derivative of n. (For square-free numbers 
  
    
      
        n
        =
        
          ∏
          
            i
          
        
        
          
            p
            
              i
            
          
        
      
    
    {\displaystyle n=\prod _{i}{p_{i}}}
  
, 
  
    
      
        
          n
          ′
        
        =
        
          ∑
          
            i
          
        
        
          
            n
            
              p
              
                i
              
            
          
        
      
    
    {\displaystyle n'=\sum _{i}{\frac {n}{p_{i}}}}
  
, so n' = n+1 is just the last equation in the above section Definitions, multiplied by n.)
 José Mª Grau and Antonio Oller-Marcén have shown that an integer n is a  Giuga number if and only if it satisfies n' = a n + 1 for some integer a > 0, where n'  is the arithmetic derivative of n. (Again, n' = a n + 1 is identical to the third equation in Definitions, multiplied by n.)