The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A257088 a(2*n) = 4*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1. 3

%I #14 Aug 31 2015 10:11:56

%S 1,1,4,3,8,5,12,7,16,9,20,11,24,13,28,15,32,17,36,19,40,21,44,23,48,

%T 25,52,27,56,29,60,31,64,33,68,35,72,37,76,39,80,41,84,43,88,45,92,47,

%U 96,49,100,51,104,53,108,55,112,57,116,59,120,61,124,63,128

%N a(2*n) = 4*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1.

%H Reinhard Zumkeller, <a href="/A257088/b257088.txt">Table of n, a(n) for n = 0..1000</a>

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

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

%F a(n) is multiplicative with a(2^e) = 2^(e+1) if e>0, otherwise a(p^e) = p^e.

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

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

%F MOBIUS transform of A215947 is [1, 4, 3, 8, 5, ...].

%F a(n) = n * A040001(n) if n>0.

%F a(n) + a(n-1) = A007310(n) if n>0.

%F a(n) = A001082(n+1) - A001082(n) if n>0.

%F Binomial transform with a(0)=0 is A128543 if n>0.

%F a(2*n) = A008574(n). a(2*n + 1) = A005408(n).

%F a(n) = A022998(n) if n>0. - _R. J. Mathar_, Apr 19 2015

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

%t a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 2 n];

%t a[ n_] := SeriesCoefficient[ (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];

%o (PARI) {a(n) = if( n<1, n==0, n%2, n, 2*n)};

%o (PARI) {a(n) = if( n<0, 0, polcoeff( (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4) + x * O(x^n), n))};

%o (Haskell)

%o import Data.List (transpose)

%o a257088 n = a257088_list !! n

%o a257088_list = concat $ transpose [a008574_list, a005408_list]

%o -- _Reinhard Zumkeller_, Apr 17 2015

%Y Cf. A001082, A005408, A007310, A008574, A040001, A215947.

%Y CF. A257083 (partial sums), A246695.

%K nonn,mult,easy

%O 0,3

%A _Michael Somos_, Apr 16 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 May 14 06:43 EDT 2024. Contains 372528 sequences. (Running on oeis4.)