cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A384113 Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.

This page as a plain text file.
%I A384113 #20 May 26 2025 06:28:33
%S A384113 1,13,169,2197,829,1533,1441,245,874,2118,2113,2048,1203,1773,2250,
%T A384113 1518,1246,21,273,1238,2228,1232,2150,218,523,2177,569,464,1410,2153,
%U A384113 257,1030,1835,745,441,1111,577,568,451,1241,2267,1739,1808,394,500,1878,1304
%N A384113 Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.
%C A384113 An example of a terrible random number generator.
%C A384113 Periodic with period 1155 (well below the modulus 2311).
%D A384113 Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).
%H A384113 Sean A. Irvine, <a href="/A384113/b384113.txt">Table of n, a(n) for n = 1..1155</a>
%H A384113 Stephen K. Park and Keith W. Miller, <a href="https://doi.org/10.1145/63039.63042">Random number generators: good ones are hard to find</a>, Communications of the ACM, Vol 31, 10 (1988), 192-201.
%H A384113 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%H A384113 <a href="/index/Rec#order_1155">Index entries for linear recurrences with constant coefficients</a>, order 1155.
%F A384113 a(n) = 13 * a(n-1) mod 2311.
%p A384113 a:= proc(n) option remember; `if`(n<2, n,
%p A384113       irem(13*a(n-1), 2311))
%p A384113     end:
%p A384113 seq(a(n), n=1..47);  # _Alois P. Heinz_, May 21 2025
%t A384113 NestList[Mod[13*#, 2311] &, 1, 100] (* _Paolo Xausa_, May 22 2025 *)
%o A384113 (PARI) my(f=Mod(13,2311)); a(n) = lift(f^((n-1) % 1155)); \\ _Kevin Ryde_, May 25 2025
%Y A384113 Cf. A001022.
%Y A384113 Cf. A096550-A096561 other pseudo-random number generators.
%Y A384113 Cf. A383809 (another generator with a similar problem).
%K A384113 nonn,easy
%O A384113 1,2
%A A384113 _Sean A. Irvine_, May 19 2025