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 A303611 #44 May 28 2025 14:10:53 %S A303611 2,1,11,7,47,31,191,127,767,511,3071,2047,12287,8191,49151,32767, %T A303611 196607,131071,786431,524287,3145727,2097151,12582911,8388607, %U A303611 50331647,33554431,201326591,134217727,805306367,536870911,3221225471,2147483647,12884901887,8589934591 %N A303611 a(n) = (-1 - (-2)^(n-2)) mod 2^n. %C A303611 A198693 and A083420 interleaved. From 11 onwards, apparently A283651 and A290195 contain the same terms. - _Bruno Berselli_, May 07 2018 %H A303611 Olivier Rozier, <a href="https://arxiv.org/abs/1805.00133">Parity sequences of the 3x+1 map on the 2-adic integers and Euclidean embedding</a>, arXiv:1805.00133 [math.DS], 2018-2025, see Definition 4.4 on p. 21. %H A303611 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4). %F A303611 a(n) = 2^(n-2) - 1 for odd n, otherwise a(n) = 3*2^(n-2) - 1, with n>1. %F A303611 From _Bruno Berselli_, May 07 2018: (Start) %F A303611 O.g.f.: x^2*(2 - x + 2*x^2)/((1 - x)*(1 - 2*x)*(1 + 2*x)). %F A303611 E.g.f.: (1 + 2*x - 4*exp(x) + exp(-2*x) + 2*exp(2*x))/4. %F A303611 a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3). %F A303611 a(n) = (2 + (-1)^n)*2^(n-2) - 1. (End) %t A303611 Table[If[OddQ[n], 2^(n - 2) - 1, 3 2^(n - 2) - 1], {n, 2, 80}] %t A303611 LinearRecurrence[{1, 4, -4}, {2, 1, 11}, 30] %o A303611 (Magma) [IsOdd(n) select 2^(n-2)-1 else 3*2^(n-2)-1: n in [2..40]]; %o A303611 (Magma) I:=[2,1,11]; [n le 3 select I[n] else Self(n-1)+4*Self(n-2)-4*Self(n-3): n in [1..35]]; %o A303611 (PARI) a(n) = if (n%2, 2^(n-2) - 1, 3*2^(n-2) - 1); \\ _Michel Marcus_, May 30 2018 %Y A303611 All terms belong to A052955 and A180516. %Y A303611 Cf. A083420, A198693, A283651, A290195. %K A303611 nonn,easy %O A303611 2,1 %A A303611 _Vincenzo Librandi_, May 07 2018