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!)
A255347 a(n) = n * (1 - (-1)^(n/4) / 4) if n divisible by 4, a(n) = n otherwise. 1

%I #55 Dec 29 2022 06:30:37

%S 0,1,2,3,5,5,6,7,6,9,10,11,15,13,14,15,12,17,18,19,25,21,22,23,18,25,

%T 26,27,35,29,30,31,24,33,34,35,45,37,38,39,30,41,42,43,55,45,46,47,36,

%U 49,50,51,65,53,54,55,42,57,58,59,75,61,62,63,48,65,66

%N a(n) = n * (1 - (-1)^(n/4) / 4) if n divisible by 4, a(n) = n otherwise.

%H G. C. Greubel, <a href="/A255347/b255347.txt">Table of n, a(n) for n = 0..2500</a>

%H Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.txt">Rational Function Multiplicative Coefficients</a>.

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

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

%F a(n) is multiplicative with a(2) = 2, a(4) = 5, a(2^e) = 3*2^(e-2) if e>2, a(p^e) = p^e otherwise. [corrected by _Amiram Eldar_, Dec 29 2022]

%F G.f.: f(x) - f(-x^4) where f(x) := x / (1 - x)^2.

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

%F a(n) = -a(-n) for all n in Z.

%F Dirichlet g.f.: zeta(s-1)*(1+1/4^s-4/8^s). - _Amiram Eldar_, Dec 29 2022

%e G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 6*x^8 + 9*x^9 + ...

%t a[ n_] := n {1, 1, 1, 5/4, 1, 1, 1, 3/4}[[Mod[ n, 8, 1]]];

%t a[ n_] := n If[ Divisible[ n, 4], 1 - (-1)^(n/4) / 4, 1];

%t LinearRecurrence[{2,-1,0,-2,4,-2,0,-1,2,-1},{0,1,2,3,5,5,6,7,6,9},70] (* _Harvey P. Dale_, Jul 28 2018 *)

%t CoefficientList[Series[x*(1+x^3)*(1+x^5)/((1-x)^2*(1+x^4)^2), {x,0,60}], x] (* _G. C. Greubel_, Aug 02 2018 *)

%o (PARI) {a(n) = n * if( n%4, 1, 1 - (-1)^(n/4) / 4)};

%o (PARI) {a(n) = n * [3/4, 1, 1, 1, 5/4, 1, 1, 1][n%8 + 1]};

%o (PARI) my(x='x+O('x^60)); concat([0], Vec(x*(1+x^3)*(1+x^5)/((1-x)^2*(1 + x^4)^2))) \\ _G. C. Greubel_, Aug 02 2018

%o (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x^3)*(1+x^5)/((1-x)^2*(1+x^4)^2))); // _G. C. Greubel_, Aug 02 2018

%K nonn,mult,easy

%O 0,3

%A _Michael Somos_, May 04 2015

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 25 11:21 EDT 2024. Contains 371967 sequences. (Running on oeis4.)