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 A028356 #58 Apr 19 2024 02:03:20 %S A028356 1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4, %T A028356 3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2, %U A028356 3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4 %N A028356 Simple periodic sequence underlying clock sequence A028354. %C A028356 From _Klaus Brockhaus_, May 15 2010: (Start) %C A028356 Continued fraction expansion of (28+sqrt(2730))/56. %C A028356 Decimal expansion of 1112/9009. %C A028356 Partial sums of 1 followed by A130151. %C A028356 First differences of A028357. (End) %D A028356 Zdeněk Horský, "Pražský orloj" ("The Astronomical Clock of Prague", in Czech), Panorama, Prague, 1988, pp. 76-78. %H A028356 Michal Křížek, Alena Šolcová and Lawrence Somer, <a href="https://dml.cz/handle/10338.dmlcz/119666">Construction of Šindel sequences</a>, Comment. Math. Univ. Carolin., 48 (2007), 373-388. %H A028356 N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98). %H A028356 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1). %F A028356 Sum of any six successive terms is 15. %F A028356 G.f.: (1 + 2*x + 3*x^2 + 4*x^3 + 3*x^4 + 2*x^5)/(1 - x^6). %F A028356 From _Wesley Ivan Hurt_, Jun 23 2016: (Start) %F A028356 a(n) = a(n-1) - a(n-3) + a(n-4) for n>3. %F A028356 a(n) = (15 - cos(n*Pi) - 8*cos(n*Pi/3))/6. (End) %F A028356 E.g.f.: (15*exp(x) - exp(-x) - 8*cos(sqrt(3)*x/2)*(sinh(x/2) + cosh(x/2)))/6. - _Ilya Gutkovskiy_, Jun 23 2016 %F A028356 a(n) = abs(((n+3) mod 6)-3) + 1. - _Daniel Jiménez_, Jan 14 2023 %p A028356 A028356:=n->[1, 2, 3, 4, 3, 2][(n mod 6)+1]: seq(A028356(n), n=0..100); # _Wesley Ivan Hurt_, Jun 23 2016 %t A028356 CoefficientList[ Series[(1 + 2x + 3x^2 + 4x^3 + 3x^4 + 2x^5)/(1 - x^6), {x, 0, 85}], x] %t A028356 LinearRecurrence[{1,0,-1,1},{1,2,3,4},120] (* or *) PadRight[{},120,{1,2,3,4,3,2}] (* _Harvey P. Dale_, Apr 15 2016 *) %o A028356 (Magma) &cat [[1, 2, 3, 4, 3, 2]^^20]; // _Klaus Brockhaus_, May 15 2010 %o A028356 (Sage) %o A028356 def A(): %o A028356 a, b, c, d = 1, 2, 3, 4 %o A028356 while True: %o A028356 yield a %o A028356 a, b, c, d = b, c, d, a + (d - b) %o A028356 A028356 = A(); [next(A028356) for n in range(106)] # _Peter Luschny_, Jul 26 2014 %o A028356 (Python) %o A028356 def A028356(n): return (1,2,3,4,3,2)[n%6] # _Chai Wah Wu_, Apr 18 2024 %Y A028356 Cf. A000034, A028354, A068073, A118382, A118383. %Y A028356 Cf. A177924 (decimal expansion of (28+sqrt(2730))/56), A130151 (repeat 1, 1, 1, -1, -1, -1), A028357 (partial sums of A028356). - _Klaus Brockhaus_, May 15 2010 %K A028356 nonn,easy %O A028356 0,2 %A A028356 _N. J. A. Sloane_ %E A028356 Additional comments from _Robert G. Wilson v_, Mar 01 2002