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 A180713 #51 May 05 2024 03:30:18 %S A180713 0,4,6,11,12,16,18,23,24,28,30,35,36,40,42,47,48,52,54,59,60,64,66,71, %T A180713 72,76,78,83,84,88,90,95,96,100,102,107,108,112,114,119,120,124,126, %U A180713 131,132,136,138,143,144,148,150,155,156,160,162,167,168,172,174,179,180,184,186,191,192,196,198,203,204 %N A180713 If n is even then a(n) = 3n, if n == 1 mod 4 then a(n) = 3n+1, if n == 3 mod 4 then a(n) = 3n+2. %H A180713 Vincenzo Librandi, <a href="/A180713/b180713.txt">Table of n, a(n) for n = 0..1000</a> %H A180713 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %H A180713 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A180713 From _Bruno Berselli_, Jan 23 2011: (Start) %F A180713 G.f.: x*(4+2*x+5*x^2+x^3)/((1-x)*(1-x^4)). %F A180713 a(n) = (12*n+i*(i^n-(-i)^n)-3*(-1)^n+3)/4, where i is the imaginary unit. %F A180713 a(n) = A131743(n) + 3*n. (End) %F A180713 a(n) = +1*a(n-1)+1*a(n-4)-1*a(n-5) for n>=5. [_Joerg Arndt_, Jan 25 2011] %p A180713 U:=n->if n mod 2 = 0 then 3*n elif n mod 4 = 1 then 3*n+1 else 3*n+2; fi; %t A180713 fn[n_]:=Which[EvenQ[n],3n,Mod[n,4]==1,3n+1,Mod[n,4]==3,3n+2]; Array[fn,70,0] (* _Harvey P. Dale_, May 03 2013 *) %t A180713 CoefficientList[Series[x (4 + 2 x + 5 x^2 + x^3) / ((1 - x) (1 - x^4)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jun 19 2013 *) %Y A180713 A variant of A006368. %K A180713 nonn,easy %O A180713 0,2 %A A180713 _N. J. A. Sloane_, Jan 21 2011 %E A180713 Definition corrected by _N. J. A. Sloane_, Jan 23 2011