login
Inverse of permutation in A160016.
2

%I #21 Nov 12 2023 08:11:45

%S 0,2,1,6,3,10,4,14,5,18,7,22,8,26,9,30,11,34,12,38,13,42,15,46,16,50,

%T 17,54,19,58,20,62,21,66,23,70,24,74,25,78,27,82,28,86,29,90,31,94,32,

%U 98,33,102,35,106,36,110,37,114,39,118,40,122,41,126,43,130,44,134,45,138,47,142,48,146,49,150,51,154,52,158

%N Inverse of permutation in A160016.

%C Permutation of the nonnegative integers.

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

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

%F Blocks of 6 numbers: a(6*k+0 .. 6*k+5) = (4*k+0, 12*k+2, 4*k+1, 12*k+6, 4*k+3, 12*k+10) for k >= 0.

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

%F If n is odd, then a(n) = 2*n; otherwise, a(n) = nearest integer to 2*n/3. - _Philippe Deléham_, Nov 09 2023

%p gf := (x*(1 + x^2)*(2 + x + 2*x^2 + x^3 + 2*x^4))/((-1 + x)^2*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)): ser := series(gf, x, 82):

%p seq(coeff(ser, x, n), n=0..79); # _Peter Luschny_, Oct 16 2020

%t LinearRecurrence[{0,1,0,0,0,1,0,-1}, {0,2,1,6,3,10,4,14},80]

%o (PARI) my(x='x+O('x^80)); Vec((x*(2+x+4*x^2+2*x^3+4*x^4+x^5+2*x^6))/((1-x^2)^2*(1+x^2+x^4)))

%Y Cf. A160016.

%K nonn,easy

%O 0,2

%A _Georg Fischer_, Oct 16 2020