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 A216972 #51 Feb 16 2024 12:32:18 %S A216972 0,1,2,3,4,5,2,7,8,9,2,11,12,13,2,15,16,17,2,19,20,21,2,23,24,25,2,27, %T A216972 28,29,2,31,32,33,2,35,36,37,2,39,40,41,2,43,44,45,2,47,48,49,2,51,52, %U A216972 53,2,55,56,57,2,59,60,61,2,63,64,65,2,67,68,69,2 %N A216972 a(4n+2) = 2, otherwise a(n) = n. %C A216972 For n>0, a(n) is the denominator of A214282(n)/(-A214283(n+1)): %C A216972 1/1, 1/2, 1/3, 3/4, 3/5, 1/2, 3/7, 5/8, 5/9, ... %C A216972 For n>0, a(n) is the denominator of A214283(n)/A214283(n+1): %C A216972 0/1, 1/2, 2/3, 3/4, 2/5, 1/2, 4/7, 5/8, 4/9, ... %C A216972 a(n), first and second differences: %C A216972 0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 2, 11, 12, ... %C A216972 1, 1, 1, 1, 1, -3, 5, 1, 1, -7, 9, 1, 1, ... %C A216972 0, 0, 0, 0, -4, 8, -4, 0, -8, 16, -8, 0, -12, ... %H A216972 Bruno Berselli, <a href="/A216972/b216972.txt">Table of n, a(n) for n = 0..1000</a> %H A216972 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,2,0,0,0,-1). %F A216972 a(n) = 2*a(n-4) - a(n-8). %F A216972 a(n+4) - a(n) = 4*A152822(n). %F A216972 a(2n) + a(2n+1) = |A141124(n)|. %F A216972 a(4n) + a(4n+1) + a(4n+2) + a(4n+3) = 6*A005408(n) = A017593(n). %F A216972 G.f.: (x+2*x^2+3*x^3+4*x^4+3*x^5-2*x^6+x^7) / (1-2*x^4+x^8). - _Jean-François Alcover_, Sep 25 2012 %F A216972 a(n) = 2+(4-(1+(-1)^n)*(1-i^n))*(n-2)/4, where i=sqrt(-1). - _Bruno Berselli_, Sep 26 2012 %F A216972 a(2n) = 2*|A009531(n)|, a(2n+1) = 2n+1. - _Bruno Berselli_, Sep 27 2012 %t A216972 a[n_] := If[Mod[n, 4] == 2, 2, n]; Table[a[n], {n, 0, 81}] (* _Jean-François Alcover_, Sep 25 2012 *) %t A216972 LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,1,2,3,4,5,2,7},80] (* _Harvey P. Dale_, Nov 06 2017 *) %o A216972 (Magma) [n mod 4 eq 2 select 2 else n: n in [0..70]]; // _Bruno Berselli_, Sep 26 2012 %o A216972 (Maxima) makelist(expand(2+(4-(1+(-1)^n)*(1-%i^n))*(n-2)/4), n, 0, 70); /* _Bruno Berselli_, Sep 26 2012 */ %o A216972 (Python) %o A216972 def A216972(n): return 2 if n&3==2 else n # _Chai Wah Wu_, Jan 31 2024 %Y A216972 Cf. A028233, A034684, A000265, A026741, A060819, A145979, A214682. %K A216972 nonn,easy %O A216972 0,3 %A A216972 _Paul Curtz_, Sep 21 2012