login
A036982
a(n) = [a*a(n-1)+b]/p^r, where a=2.001, b=3.2, p=2 and p^r is the highest power of p dividing [a*a(n-1)+b], starting with a(0) = 1.
2
1, 5, 13, 29, 61, 125, 253, 509, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093
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, 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
Cf. A029580.
Sequence in context: A093810 A093817 A120274 * A029580 A344920 A113914
KEYWORD
nonn
EXTENSIONS
More terms from James Sellers, Aug 08 2000
STATUS
approved