OFFSET
0,2
COMMENTS
With exact rational arithmetic, this is an eventually cyclic sequence: a(8) = a(1678) = 1021. The preperiod has length 8 and the period is 1670. [Corrected by Adam Reichert, May 11 2026]
If the constants 2.001 and 3.2 are stored as floating-point numbers, the computation may calculate a different sequence. - Adam Reichert, May 11 2026
If an array is made of columns of -nacci sequences, fibo-, tribo- etc. all starting w. 1,1,2 etc, the nw to se diagonals can be extended by computation. The above minus the first digit is diagonal 4. See A159741 for details. [From Al Hakanson (hawkuu(AT)gmail.com), Apr 20 2009]
LINKS
Adam Reichert, Table of n, a(n) for n = 0..9999
Adam Reichert, Python
PROG
(Python)
import fractions
import math
def a036982():
A = fractions.Fraction("2.001")
B = fractions.Fraction("3.2")
p = 2
a = 1
while True:
yield a
a = math.floor(A * a + B)
while a % p == 0:
a //= p
# Adam Reichert, May 11 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from James Sellers, Aug 08 2000
STATUS
approved
