OFFSET
0,2
COMMENTS
Let a(0), C1, C2, C be integers. Consider the sequence a(n) = a(n-1) + C1*n + C2 if a(n-1) is not divisible by C or a(n) = a(n-1)/C otherwise.
For a fixed C1, C2, C this sequence shows chaotic behavior for some a(0) and a highly regular behavior for other a(0).
The parameter C1 tells how many regular subclasses are there.
The sequence grows roughly as a(n) ~ n*const.
Here C = 2. Other sequences showing very interesting behavior have C = power of 2.
Example: C1=3, C2=10, C=3. Thus a(n)= a(n-1)+3*n+10 if a(n-1) is not divisible by 3, or a(n)= a(n-1)/3 otherwise. There are 2 classes:
a regular class with 3 subclasses (C1=3) for initial values
{a(0)=3,38,79,...}
{a(0)=1,8,12,42,47,49,63,77,88,...}
{a(0)=2,43,45,...}
and a "chaotic" class for other initial values a(0).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MAPLE
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[OddQ[a], a+n+1, a/2]}; NestList[nxt, {0, 1}, 60][[;; , 2]] (* Harvey P. Dale, Mar 02 2023 *)
PROG
(Haskell)
a135287 n = a135287_list !! n
a135287_list = 1 : f 1 1 where
f x y = z : f (x + 1) z where
z = if m == 0 then y' else x + y; (y', m) = divMod y 2
-- Reinhard Zumkeller, Mar 02 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ctibor O. Zizka, Dec 03 2007, Dec 05 2007
EXTENSIONS
More terms from R. J. Mathar, Dec 12 2007
Offset fixed by Reinhard Zumkeller, Mar 02 2012
STATUS
approved