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 A102899 #28 Dec 10 2022 01:29:32 %S A102899 0,1,1,0,3,3,0,5,5,0,7,7,0,9,9,0,11,11,0,13,13,0,15,15,0,17,17,0,19, %T A102899 19,0,21,21,0,23,23,0,25,25,0,27,27,0,29,29,0,31,31,0,33,33,0,35,35,0, %U A102899 37,37,0,39,39,0,41,41,0,43,43,0,45,45,0,47,47,0,49,49,0,51,51,0,53,53,0 %N A102899 a(n) = ceiling(n/3)^2 - floor(n/3)^2. %C A102899 If n is a multiple of 3, then a(n) = 0, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 2*k + 1. - _Antti Karttunen_, Apr 14 2022 %D A102899 Maria Paola Bonacina and Nachum Dershowitz, Canonical Inference for Implicational Systems, in Automated Reasoning, Lecture Notes in Computer Science, Volume 5195/2008, Springer-Verlag. %H A102899 G. C. Greubel, <a href="/A102899/b102899.txt">Table of n, a(n) for n = 0..5000</a> %H A102899 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1). %F A102899 G.f.: x*(1+x+x^3+x^4)/(1-2*x^3+x^6). %F A102899 a(n) = A011655(n)*A004396(n). %F A102899 a(n) = (2/3)*floor((2*n+1)/3)*(1-cos(2*Pi*n/3)). %F A102899 From _M. F. Hasler_, Dec 13 2007: (Start) %F A102899 a(n) = |A120691(n+1)| for n>0. %F A102899 a(n) = ([n/3]*2 + 1)*dist(n,3Z). (End) %F A102899 a(n) = 2*sin(n*Pi/3)*(4*n*sin(n*Pi/3)-sqrt(3)*cos(n*Pi))/9. - _Wesley Ivan Hurt_, Sep 24 2017 %F A102899 a(n) = 2*a(n-3) - a(n-6), for n > 5. - _Chai Wah Wu_, Jul 27 2022 %t A102899 LinearRecurrence[{0,0,2,0,0,-1}, {0,1,1,0,3,3}, 90] (* _G. C. Greubel_, Dec 09 2022 *) %o A102899 (PARI) A102899(n)=(n\3*2+1)*(0<n%3) \\ _M. F. Hasler_, Dec 13 2007 %o A102899 (Magma) I:=[0,1,1,0,3,3]; [n le 6 select I[n] else 2*Self(n-3) - Self(n-6): n in [1..91]]; // _G. C. Greubel_, Dec 09 2022 %o A102899 (SageMath) %o A102899 def A102899(n): return (1+2*(n//3))*((n%3)>0) %o A102899 [A102899(n) for n in range(91)] # _G. C. Greubel_, Dec 09 2022 %Y A102899 Cf. A003417, A004396, A011655, A120691, A353314, A353327. %K A102899 easy,nonn %O A102899 0,5 %A A102899 _Paul Barry_, Jan 17 2005