function [ n_data, p ] = gaussian_prime_real_values ( n_data )

%*****************************************************************************80
%
%% gaussian_prime_real_values() returns some values of real (integer) Gaussian primes.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 January 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer ndata:  The user sets n_data to 0 before the first call.  
%    Thereafter, it should simply be the value returned by the previous call.
%
%  Output:
%
%    integer n_data: On each call, the routine increments n_data by 1, and
%    returns the corresponding data; when there is no more data, the
%    output value of n_data will be 0 again.
%
%    integer p: a real Gaussian prime.
%
  n_max = 18;

  p_vec = [ ...
      3; 
      7; 
     11; 
     19; 
     23; 
     31; 
     43; 
     47; 
     59; 
     67; 
     71; 
     79; 
     83; 
    103; 
    211; 
    307; 
    419; 
    503 ];

  if ( n_data < 0 )
    n_data = 0;
  end

  n_data = n_data + 1;

  if ( n_max < n_data )
    n_data = 0;
    p = 0;
  else
    p = p_vec(n_data);
  end

  return
end
