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 A186101 #28 Apr 12 2023 08:05:41 %S A186101 0,1,2,2,4,5,4,7,8,6,10,11,8,13,14,10,16,17,12,19,20,14,22,23,16,25, %T A186101 26,18,28,29,20,31,32,22,34,35,24,37,38,26,40,41,28,43,44,30,46,47,32, %U A186101 49,50,34,52,53,36,55,56,38,58,59,40,61,62,42,64,65,44,67,68,46,70,71,48 %N A186101 a(n) = 2*n / 3 if n divisible by 3, a(n) = n otherwise. %H A186101 Colin Barker, <a href="/A186101/b186101.txt">Table of n, a(n) for n = 0..1000</a> %H A186101 Michael Somos, <a href="http://cis.csuohio.edu/~somos/rfmc.pdf">Rational function multiplicative coefficients</a>. %H A186101 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1). %F A186101 Euler transform of length 4 sequence [ 2, -1, 2, -1]. %F A186101 a(n) is multiplicative with a(3^e) = (2*3^e + 0^e)/3, a(p^e) = p^e otherwise. %F A186101 G.f.: x * (1 + x)^2 * (1 + x^2) / (1 - x^3)^2. %F A186101 a(-n) = -a(n). %F A186101 Dirichlet g.f.: zeta(s-1)*(1-1/3^s). - _R. J. Mathar_, Mar 12 2012 %F A186101 a(0)=0, a(1)=1, a(2)=2, a(3)=2, a(4)=4, a(5)=5, a(n)=2*a(n-3)-a(n-6). - _Harvey P. Dale_, Apr 15 2015 %F A186101 a(n) = n*(8 - 2*cos((2*Pi*n)/3)) / 9. - _Colin Barker_, Mar 06 2017 %F A186101 Sum_{k=1..n} a(k) ~ (4/9) * n^2. - _Amiram Eldar_, Nov 28 2022 %e A186101 x + 2*x^2 + 2*x^3 + 4*x^4 + 5*x^5 + 4*x^6 + 7*x^7 + 8*x^8 + 6*x^9 + ... %t A186101 Table[If[Divisible[n,3],2 n/3,n],{n,0,80}] (* or *) LinearRecurrence[ {0,0,2,0,0,-1},{0,1,2,2,4,5},80] (* _Harvey P. Dale_, Apr 15 2015 *) %o A186101 (PARI) {a(n) = n - if( n%3, 0, n/3)} %o A186101 (PARI) {a(n) = if( n==0, 0, sign(n) * direuler( p=2, abs(n), (1 - (p==3) * X) / (1 - p * X)) [abs(n)])} %o A186101 (PARI) concat(0, Vec(x*(1 + x)^2*(1 + x^2)/(1 - x^3)^2 + O(x^100))) \\ _Colin Barker_, Mar 06 2017 %K A186101 nonn,mult,easy %O A186101 0,3 %A A186101 _Michael Somos_, Feb 12 2011