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 A299913 #21 Mar 02 2025 18:30:54 %S A299913 0,1,1,7,9,55,73,439,585,3511,4681,28087,37449,224695,299593,1797559, %T A299913 2396745,14380471,19173961,115043767,153391689,920350135,1227133513, %U A299913 7362801079,9817068105,58902408631,78536544841,471219269047,628292358729,3769754152375,5026338869833 %N A299913 a(n) = a(n-1) + 2*a(n-2) if n even, or 3*a(n-1) + 4*a(n-2) if n odd, starting with 0, 1. %D A299913 Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31. %H A299913 Colin Barker, <a href="/A299913/b299913.txt">Table of n, a(n) for n = 0..1000</a> %H A299913 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,8,8) %F A299913 G.f.: -x*(2*x+1)/((x+1)*(8*x^2-1)). - _Alois P. Heinz_, Mar 10 2018 %F A299913 From _Colin Barker_, Mar 11 2018: (Start) %F A299913 a(n) = (2^(3*n/2) - 1) / 7 for n even. %F A299913 a(n) = 3*2^((3*(n-1))/2+1)/7 + 1/7 for n odd. %F A299913 a(n) = -a(n-1) + 8*a(n-2) + 8*a(n-3) for n>2. %F A299913 (End) %p A299913 a:= n-> (<<0|1|0>, <0|0|1>, <8|8|-1>>^n. <<0, 1, 1>>)[1,1]: %p A299913 seq(a(n), n=0..35); # _Alois P. Heinz_, Mar 10 2018 %t A299913 Fold[Append[#1, Inner[Times, 2 Boole[OddQ@ #2] + {1, 2}, {#1[[-1]], #1[[-2]]}, Plus]] &, {0, 1}, Range[2, 30]] (* or *) %t A299913 CoefficientList[Series[-x (2 x + 1)/((x + 1) (8 x^2 - 1)), {x, 0, 30}], x] (* _Michael De Vlieger_, Mar 10 2018 *) %t A299913 nxt[{n_,a_,b_}]:={n+1,b,If[OddQ[n],b+2a,3b+4a]}; NestList[nxt,{1,0,1},30][[;;,2]] (* _Harvey P. Dale_, Mar 02 2025 *) %o A299913 (PARI) concat(0, Vec(x*(1 + 2*x) / ((1 + x)*(1 - 8*x^2)) + O(x^40))) \\ _Colin Barker_, Mar 11 2018 %Y A299913 Bisections give A023001, A083068. %Y A299913 Cf. A299914, A299915, A299916. %K A299913 nonn,easy %O A299913 0,4 %A A299913 _N. J. A. Sloane_, Mar 10 2018 %E A299913 More terms from _Altug Alkan_, Mar 10 2018