function a = r8ci_dif2 ( n )

%*****************************************************************************80
%
%% R8CI_DIF2 sets up a R8CI second difference matrix.
%
%  Discussion:
%
%    This is actually a periodic second difference matrix.
%
%    The R8CI storage format is used for an N by N circulant matrix.
%    An N by N circulant matrix A has the property that the entries on
%    row I appear again on row I+1, shifted one position to the right,
%    with the final entry of row I appearing as the first of row I+1.
%    The format simply records the first row of the matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 June 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the order of the matrix.
%    N must be positive.
%
%    Output, real A(N), the R8CI matrix.
%
  a = zeros ( n, 1 );

  a(1) = 2.0;
  a(2) = -1.0;
  a(n) = -1.0;

  return
end
