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.

A385037 Consecutive states of the linear congruential pseudo-random number generator (936*s + 1399) mod 6655 when started at s=1.

This page as a plain text file.
%I A385037 #15 Jul 06 2025 18:26:11
%S A385037 1,2335,4119,3538,5432,1331,2730,1159,1458,1812,406,2080,5019,753,777,
%T A385037 3276,6435,1784,818,1722,2681,1880,4159,1048,4042,4671,1120,4884,838,
%U A385037 477,1986,3550,3354,6238,3732,676,1910,5619,3333,6547,136,2250,4419,4828,1662
%N A385037 Consecutive states of the linear congruential pseudo-random number generator (936*s + 1399) mod 6655 when started at s=1.
%C A385037 Periodic with period 6655.
%C A385037 Described in Numerical Recipes as a "quick and dirty" generator.
%D A385037 William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C (2nd ed), Cambridge University Press, 1999 (see p. 285).
%H A385037 Sean A. Irvine, <a href="/A385037/b385037.txt">Table of n, a(n) for n = 1..6655</a>
%H A385037 W. E. Sharp and Carter Bays, <a href="https://doi.org/10.1016/0098-3004(92)90060-5">A review of portable random number generators</a>, Computers and Geosciences, 18, 1 (1982), 79-87.
%H A385037 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%H A385037 <a href="/index/Rec#order_6655">Index entries for linear recurrences with constant coefficients</a>, order 6655.
%F A385037 a(n) = (936 * a(n-1) + 1399) mod 6655.
%p A385037 a:= proc(n) option remember; `if`(n<2, n,
%p A385037       irem(936*a(n-1)+1399, 6655))
%p A385037     end:
%p A385037 seq(a(n), n=1..44);  # after _Alois P. Heinz_
%t A385037 NestList[Mod[936*# + 1399, 6655] &, 1, 50] (* _Paolo Xausa_, Jun 16 2025 *)
%Y A385037 Cf. A384113, A384971, A385002, A385003.
%K A385037 nonn,look,easy
%O A385037 1,2
%A A385037 _Sean A. Irvine_, Jun 14 2025