OFFSET
1,2
COMMENTS
The sequence is periodic with period 2^24.
In Poly-1 BASIC, random numbers were generated with the RND(m) function. With RND(0) the internal state was returned as a floating-point number state/2^24, otherwise the state was return modulo m.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..10000
Andrew Trotman, The Poly Preservation Project
Wikipedia, Poly-1
FORMULA
a(n) = (4253261 * a(n-1) + 3518565) mod 2^24.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(4253261*a(n-1)+3518565, 2^24))
end:
seq(a(n), n=1..28); # Alois P. Heinz, May 21 2025
MATHEMATICA
NestList[Mod[4253261*# + 3518565, 2^24] &, 1, 50] (* Paolo Xausa, May 22 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 15 2025
STATUS
approved
