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.
%I A369543 #10 Feb 04 2024 18:30:12 %S A369543 1,-1,2,4,6,9,-4,7,0,12,19,-9,20,28,33,-19,34,41,-24,15,4,32,47,-25, %T A369543 48,60,67,-41,68,76,81,-51,82,89,-56,23,12,60,85,-47,86,103,-62,32,80, %U A369543 106,120,129,-82,31,18,84,118,137,-84,39,16,92,131,-73,132,156,169,-107 %N A369543 a(0) = 1; for n >= 0, a(n+1) = n - a(n) if a(n) odd, else a(n+1) = floor((3*n + a(n))/2). %C A369543 After a chaotic part, at n = 358 the sequence settles down and becomes quasi-periodic with a 6-loop. For some choices of the initial term a(0) the sequence stays chaotic. %H A369543 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1). %F A369543 For k >= 0 : %F A369543 a(358 + 6*k) = 1062 + 18*k. %F A369543 a(359 + 6*k) = 1068 + 18*k. %F A369543 a(360 + 6*k) = 1072 + 18*k. %F A369543 a(361 + 6*k) = 1076 + 18*k. %F A369543 a(362 + 6*k) = 1079 + 18*k. %F A369543 a(363 + 6*k) = -717 - 12*k. %e A369543 For n = 0, a(0) = 1. %e A369543 For n = 1, a(0) is odd, thus a(1) = 0 - 1 = -1. %e A369543 For n = 2, a(1) is odd, thus a(2) = 1 - (-1) = 2. %e A369543 For n = 3, a(2) is even, thus a(3) = floor((3*2 + a(2))/2) = 4. %e A369543 etc. %t A369543 a[0] = 1; a[n_] := a[n] = If[OddQ[a[n - 1]], n - 1 - a[n - 1], Floor[(3*n - 3 + a[n - 1])/2]]; Array[a, 100, 0] (* _Amiram Eldar_, Jan 26 2024 *) %Y A369543 Cf. A133058. %K A369543 sign,easy %O A369543 0,3 %A A369543 _Ctibor O. Zizka_, Jan 25 2024