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 A084642 #16 May 06 2024 18:59:14 %S A084642 1,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, %T A084642 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, %U A084642 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1 %N A084642 A Jacobsthal ratio. %C A084642 The Jacobsthal recurrence means that A001045(n+1)/A001045(n) = 1 + 2/(A001045(n)/A001045(n-1)). The sequence of these fractions alternates after the first terms values just above 2 and just below 2, because the mapping x -> 1+2/x is concave in the neighborhood of x=2, where x=2 is an attractor. As a consequence, this sequence here iterates like A040001 or A000034 after a few terms. - _R. J. Mathar_, Sep 17 2008 %C A084642 Decimal expansion of 433/3300. - _Elmo R. Oliveira_, May 06 2024 %H A084642 G. C. Greubel, <a href="/A084642/b084642.txt">Table of n, a(n) for n = 0..1000</a> %H A084642 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1). %F A084642 a(n) = floor(A001045(n+2)/A001045(n+1)). %F A084642 a(n) = floor((2^(n+2) - (-1)^(n+2))/(2^(n+1) - (-1)^(n+1))). %F A084642 From _G. C. Greubel_, Mar 20 2023: (Start) %F A084642 a(n) = A000034(n) + [n=1]. %F A084642 a(n) = a(n-2), for n > 3, with a(0) = 1, a(1) = 3, a(2) = 1, a(3) = 2. %F A084642 G.f.: (1 + 3*x - x^3)/(1-x^2). %F A084642 E.g.f.: (1/2)*(2*x + 3*exp(x) - exp(-x)). (End) %t A084642 Table[(3-(-1)^n)/2 +Boole[n==1], {n,0,120}] (* _G. C. Greubel_, Mar 20 2023 *) %o A084642 (Magma) [1,3] cat [1+ (n mod 2): n in [2..120]]; // _G. C. Greubel_, Mar 20 2023 %o A084642 (SageMath) [1 + (n%2) + int(n==1) for n in range(121)] # _G. C. Greubel_, Mar 20 2023 %Y A084642 Cf. A000034, A001045, A040001. %K A084642 easy,nonn %O A084642 0,2 %A A084642 _Paul Barry_, Jun 08 2003