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.

A385335 Consecutive states of the linear congruential pseudo-random number generator (1741*s + 2731) mod 12960 when started at s=1.

This page as a plain text file.
%I A385335 #11 Jul 08 2025 16:40:17
%S A385335 1,4472,12483,1714,6005,11676,9367,6998,3849,3520,971,8442,3613,7364,
%T A385335 6015,3166,6737,3048,8659,5570,6021,652,10343,8454,11545,1616,3867,
%U A385335 8938,11789,11700,12271,8462,12513,2104,11075,12786,10837,188,6039,6070,8201,11712
%N A385335 Consecutive states of the linear congruential pseudo-random number generator (1741*s + 2731) mod 12960 when started at s=1.
%C A385335 Periodic with period 12960.
%C A385335 Described in Numerical Recipes as a "quick and dirty" generator.
%D A385335 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 A385335 Sean A. Irvine, <a href="/A385335/b385335.txt">Table of n, a(n) for n = 1..12960</a>
%H A385335 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%H A385335 <a href="/index/Rec#order_12960">Index entries for linear recurrences with constant coefficients</a>, order 12960.
%F A385335 a(n) = (1741 * a(n-1) + 2731) mod 12960.
%p A385335 a:= proc(n) option remember; `if`(n<2, n,
%p A385335       irem(1741*a(n-1)+2731, 12960))
%p A385335     end:
%p A385335 seq(a(n), n=1..44);  # after _Alois P. Heinz_
%t A385335 NestList[Mod[1741*# + 2731, 12960] &, 1, 50] (* after _Paolo Xausa_ *)
%Y A385335 Cf. A384431, A385336.
%K A385335 nonn,look,easy
%O A385335 1,2
%A A385335 _Sean A. Irvine_, Jun 25 2025