home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / electronic / rlab / TestMatrix / riemann_r < prev    next >
Encoding:
Text File  |  1994-12-20  |  1.3 KB  |  46 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. // Synopsis:    A matrix associated with the Riemann hypothesis.
  4.  
  5. // Syntax:    A = riemann ( N )
  6.  
  7. // Description:
  8.  
  9. //    A is an N-by-N matrix for which the Riemann hypothesis is true
  10. //    if and only if 
  11.  
  12. //    det(A) = O( N! N^(-1/2+epsilon) ) for every epsilon > 0
  13. //                                        (`!' denotes factorial).
  14.  
  15. //    A = B[2:N+1; 2:N+1], where
  16. //    B[i;j] = i-1 if i divides j and -1 otherwise.
  17. //    Properties include, with M = N+1:
  18.  
  19. //        Each eigenvalue E(i) satisfies ABS(E(i)) <= M - 1/M.
  20. //              i <= E(i) <= i+1 with at most M-SQRT(M) exceptions.
  21. //              All integers in the interval (M/3, M/2] are eigenvalues.
  22. //
  23. //    See also REDHEFF.
  24.  
  25. //      Reference:
  26. //       F. Roesler, Riemann's hypothesis as an eigenvalue problem,
  27. //       Linear Algebra and Appl., 81 (1986), pp. 153-198.
  28.  
  29. //    This file is a translation of riemann.m from version 2.0 of
  30. //    "The Test Matrix Toolbox for Matlab", described in Numerical
  31. //    Analysis Report No. 237, December 1993, by N. J. Higham.
  32.  
  33. //-------------------------------------------------------------------//
  34.  
  35. riemann = function ( n )
  36. {
  37.   local (n)
  38.  
  39.   n = n+1;
  40.   i = (2:n)'*ones(1,n-1);
  41.   j = i';
  42.   A = i .* (!mod(j,i)) - ones(n-1,n-1);
  43.  
  44.   return A;
  45. };
  46.