login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A permutation of the nonnegative numbers: a(4n) = 8n, a(4n+1) = 2n + 1, a(4n+2) = 4n + 2, a(4n+3) = 8n + 4.
1

%I #50 Sep 08 2022 08:46:09

%S 0,1,2,4,8,3,6,12,16,5,10,20,24,7,14,28,32,9,18,36,40,11,22,44,48,13,

%T 26,52,56,15,30,60,64,17,34,68,72,19,38,76,80,21,42,84,88,23,46,92,96,

%U 25,50,100,104,27,54,108,112,29,58,116,120

%N A permutation of the nonnegative numbers: a(4n) = 8n, a(4n+1) = 2n + 1, a(4n+2) = 4n + 2, a(4n+3) = 8n + 4.

%C A permutation of the nonnegative integers.

%H G. C. Greubel, <a href="/A247555/b247555.txt">Table of n, a(n) for n = 0..5000</a>

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

%F a(n) = a(n-4) + a(n-8) - a(n-12).

%F a(n) = 2*a(n-4) - a(n-8). - _Colin Barker_, Sep 19 2014

%F G.f.: x*(4*x^6 + 2*x^5 + x^4 + 8*x^3 + 4*x^2 + 2*x + 1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - _Colin Barker_, Sep 19 2014

%F a(n) = (11*n-3+(n+3)*(-1)^n+(4*n-1+(-1)^n)*cos(n*Pi/2)+2*(9-3*n+4(-1)^n)* sin(n*Pi/2))/8. - _Wesley Ivan Hurt_, May 07 2021

%t a[n_]:=Switch[Mod[n,4],0,2 n,1,(n+1)/2,2,n,3,2 n-2]; Table[a[n],{n,0,60}] (* _Jean-François Alcover_, Oct 09 2014 *)

%t LinearRecurrence[{0,0,0,2,0,0,0,-1}, {0,1,2,4,8,3,6,12}, 50] (* _G. C. Greubel_, May 01 2018 *)

%o (PARI) Vec(x*(4*x^6+2*x^5+x^4+8*x^3+4*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100)) \\ _Colin Barker_, Sep 19 2014

%o (Magma) &cat[[4*(i-1),i,2*i,4*i]: i in [1..50 by 2]]; // _Bruno Berselli_, Sep 19 2014

%Y Cf. A005408, A008590, A016825, A017113, A225055, A001477, A111284.

%K nonn,easy,less

%O 0,3

%A _Paul Curtz_, Sep 19 2014