login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A186101 a(n) = 2*n / 3 if n divisible by 3, a(n) = n otherwise. 2

%I #28 Apr 12 2023 08:05:41

%S 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 26,18,28,29,20,31,32,22,34,35,24,37,38,26,40,41,28,43,44,30,46,47,32,

%U 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 a(n) = 2*n / 3 if n divisible by 3, a(n) = n otherwise.

%H Colin Barker, <a href="/A186101/b186101.txt">Table of n, a(n) for n = 0..1000</a>

%H Michael Somos, <a href="http://cis.csuohio.edu/~somos/rfmc.pdf">Rational function multiplicative coefficients</a>.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1).

%F Euler transform of length 4 sequence [ 2, -1, 2, -1].

%F a(n) is multiplicative with a(3^e) = (2*3^e + 0^e)/3, a(p^e) = p^e otherwise.

%F G.f.: x * (1 + x)^2 * (1 + x^2) / (1 - x^3)^2.

%F a(-n) = -a(n).

%F Dirichlet g.f.: zeta(s-1)*(1-1/3^s). - _R. J. Mathar_, Mar 12 2012

%F 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 a(n) = n*(8 - 2*cos((2*Pi*n)/3)) / 9. - _Colin Barker_, Mar 06 2017

%F Sum_{k=1..n} a(k) ~ (4/9) * n^2. - _Amiram Eldar_, Nov 28 2022

%e 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 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 (PARI) {a(n) = n - if( n%3, 0, n/3)}

%o (PARI) {a(n) = if( n==0, 0, sign(n) * direuler( p=2, abs(n), (1 - (p==3) * X) / (1 - p * X)) [abs(n)])}

%o (PARI) concat(0, Vec(x*(1 + x)^2*(1 + x^2)/(1 - x^3)^2 + O(x^100))) \\ _Colin Barker_, Mar 06 2017

%K nonn,mult,easy

%O 0,3

%A _Michael Somos_, Feb 12 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 06:39 EDT 2024. Contains 371920 sequences. (Running on oeis4.)