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.

A385362 Consecutive states of the linear congruential pseudo-random number generator (2041*s + 25673) mod 121500 when started at s=1.

This page as a plain text file.
%I A385362 #15 Jul 08 2025 16:47:53
%S A385362 1,27714,92447,20500,70173,266,82579,48912,103565,113338,12531,86444,
%T A385362 39877,9630,119003,32296,88809,6842,17695,55668,41561,44674,80307,
%U A385362 28760,40333,89826,17039,53272,11325,54998,10591,14904,69737,82390,27663,109856,74269,98202
%N A385362 Consecutive states of the linear congruential pseudo-random number generator (2041*s + 25673) mod 121500 when started at s=1.
%C A385362 Periodic with period 121500.
%C A385362 Described in Numerical Recipes as a "quick and dirty" generator.
%H A385362 Sean A. Irvine, <a href="/A385362/b385362.txt">Table of n, a(n) for n = 1..10000</a>
%H A385362 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%H A385362 <a href="/index/Rec#order_121500">Index entries for linear recurrences with constant coefficients</a>, order 121500.
%F A385362 a(n) = (2041 * a(n-1) + 25673) mod 121500.
%p A385362 a:= proc(n) option remember; `if`(n<2, n,
%p A385362       irem(2041*a(n-1)+25673, 121500))
%p A385362     end:
%p A385362 seq(a(n), n=1..44);  # after _Alois P. Heinz_
%t A385362 NestList[Mod[2041*# + 25673, 121500] &, 1, 50] (* after _Paolo Xausa_ *)
%o A385362 (Magma) [n le 1 select 1 else (2041*Self(n-1)+ 25673) mod 121500: n in [1..40]]; // _Vincenzo Librandi_, Jun 27 2025
%Y A385362 Cf. A383126, A385341.
%K A385362 nonn,look,easy
%O A385362 1,2
%A A385362 _Sean A. Irvine_, Jun 26 2025