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.

A385338 Consecutive states of the linear congruential pseudo-random number generator (421*s + 17117) mod 81000 when started at s=1.

This page as a plain text file.
%I A385338 #10 Jul 06 2025 18:13:09
%S A385338 1,17538,29615,11032,44589,78086,5323,71100,61217,31474,64671,27608,
%T A385338 57085,73902,25859,49756,66393,23570,58087,9744,69341,49678,33555,
%U A385338 49772,73129,24426,13463,15040,30957,9014,5011,20748,4025,10642,42399,47096,80533,63510
%N A385338 Consecutive states of the linear congruential pseudo-random number generator (421*s + 17117) mod 81000 when started at s=1.
%C A385338 Periodic with period 81000.
%C A385338 Described in Numerical Recipes as a "quick and dirty" generator.
%D A385338 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 A385338 Sean A. Irvine, <a href="/A385338/b385338.txt">Table of n, a(n) for n = 1..10000</a>
%H A385338 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%H A385338 <a href="/index/Rec#order_81000">Index entries for linear recurrences with constant coefficients</a>, order 81000.
%F A385338 a(n) = (421 * a(n-1) + 17117) mod 81000.
%p A385338 a:= proc(n) option remember; `if`(n<2, n,
%p A385338       irem(421*a(n-1)+17117, 81000))
%p A385338     end:
%p A385338 seq(a(n), n=1..44);  # after _Alois P. Heinz_
%t A385338 NestList[Mod[421*# + 17117, 81000] &, 1, 50] (* after _Paolo Xausa_ *)
%Y A385338 Cf. A383126, A385039.
%K A385338 nonn,look,easy
%O A385338 1,2
%A A385338 _Sean A. Irvine_, Jun 25 2025