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 A245477 #44 Sep 08 2022 08:46:08 %S A245477 1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1, %T A245477 1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1, %U A245477 1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1 %N A245477 Period 6: repeat [1, 1, 1, 1, 1, 2]. %C A245477 First differences of A047368. The first differences of this sequence are in A131533. - _Wesley Ivan Hurt_, Jul 24 2014 %C A245477 Binomial Transform of a(n) gives: 1, 2, 4, 8, 16, 33, 70, 149, 312, 638, 1276, 2511, ... - _Wesley Ivan Hurt_, Aug 13 2014 %H A245477 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1). %F A245477 a(n) = floor((n+1)*7/6) - floor((n)*7/6). %F A245477 G.f.: 1/(1-x) + x^5/(1-x^6). - _Robert Israel_, Jul 23 2014 %F A245477 From _Wesley Ivan Hurt_, Jul 24 2014, Aug 06-29 2014: (Start) %F A245477 a(n) = 2 - sign((n+1) mod 6). %F A245477 a(n) = 3 - 2^sign((n+1) mod 6). %F A245477 a(n) = A172051(n) + 1. %F A245477 a(2n) = 1, a(2n+1) = A177702(n). %F A245477 Sum_{i=0..n-2} a(i) = A047368(n), n>0. %F A245477 a(n) = 1 + mod(n, 1 + mod(n-1, 3)). %F A245477 a(n) = 1 + binomial(mod(5n + 10, 6), 5). (End) %F A245477 From _Wesley Ivan Hurt_, Jun 23 2016: (Start) %F A245477 a(n) = a(n-6) for n>5. %F A245477 a(n) = (7 - cos(n*Pi) + cos(n*Pi/3) - cos(2*n*Pi/3) - sqrt(3)*sin(n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/6. (End) %p A245477 A:= n -> piecewise(n mod 6 = 5, 2, 1); %p A245477 seq(A(n), n=0..100); # _Robert Israel_, Jul 23 2014 %t A245477 Table[2 - Sign[Mod[n + 1, 6]], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jul 24 2014 *) %t A245477 PadRight[{},120,{1,1,1,1,1,2}] (* _Harvey P. Dale_, Jun 02 2016 *) %o A245477 (Sage) %o A245477 [floor((n+1)*7/6) - floor((n)*7/6) for n in [0..200]] %o A245477 (PARI) a(n) = 7*(n+1)\6 - 7*n\6; \\ _Michel Marcus_, Jul 23 2014 %o A245477 (Magma) [Floor((n+1)*7/6) - Floor((n)*7/6) : n in [0..100]]; // _Wesley Ivan Hurt_, Aug 06 2014 %Y A245477 Cf. A024643, A047368, A097325, A130782, A131534, A172051, A177702, A177704, A177706. %K A245477 nonn,easy %O A245477 0,6 %A A245477 _Hailey R. Olafson_, Jul 23 2014