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 A260316 #14 May 20 2018 11:56:29 %S A260316 0,0,1,1,3,4,2,6,7,3,9,10,4,12,13,5,15,16,6,18,19,7,21,22,8,24,25,9, %T A260316 27,28,10,30,31,11,33,34,12,36,37,13,39,40,14,42,43,15,45,46,16,48,49, %U A260316 17,51,52,18,54,55,19,57,58,20,60,61,21,63,64,22,66,67,23 %N A260316 n/3 if 3 divides n, else n-1. %H A260316 Peter Kagey, <a href="/A260316/b260316.txt">Table of n, a(n) for n = 0..1000</a> %H A260316 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1). %F A260316 a(3k) = k; a(3k + 1) = 3k; a(3k + 2) = 3k + 1. %F A260316 a(n) = 2*a(n-3) - a(n-6) for n>5. - _Colin Barker_, Jul 23 2015 %F A260316 G.f.: x^2*(2*x^3+3*x^2+x+1) / ((x-1)^2*(x^2+x+1)^2). - _Colin Barker_, Jul 23 2015 %e A260316 a(5) = 5 - 1 = 4 because 5 is not divisible by 3. %e A260316 a(12) = 12/3 = 4 because 12 is divisible by 3. %t A260316 Table[If[Mod[n, 3] == 0, n/3, n - 1], {n, 0, 69}] (* or *) %t A260316 CoefficientList[Series[x^2*(2 x^3 + 3 x^2 + x + 1)/((x - 1)^2*(x^2 + x + 1)^2), {x, 0, 69}], x] (* _Michael De Vlieger_, Jul 23 2015 *) %t A260316 LinearRecurrence[{0,0,2,0,0,-1},{0,0,1,1,3,4},80] (* _Harvey P. Dale_, May 20 2018 *) %o A260316 (Ruby) def a(n);(n%3==0)?n/3:n-1 end %o A260316 (PARI) concat([0,0], Vec(x^2*(2*x^3+3*x^2+x+1) / ((x-1)^2*(x^2+x+1)^2) + O(x^100))) \\ _Colin Barker_, Jul 23 2015 %Y A260316 A029578 is an analogous case where the divisor is 2 instead of 3. %K A260316 nonn,easy %O A260316 0,5 %A A260316 _Peter Kagey_, Jul 22 2015