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!)
A265667 Permutation of nonnegative integers: a(n) = n + floor(n/3)*(-1)^(n mod 3). 11

%I #42 Mar 30 2023 02:36:48

%S 0,1,2,4,3,6,8,5,10,12,7,14,16,9,18,20,11,22,24,13,26,28,15,30,32,17,

%T 34,36,19,38,40,21,42,44,23,46,48,25,50,52,27,54,56,29,58,60,31,62,64,

%U 33,66,68,35,70,72,37,74,76,39,78,80,41,82,84,43,86,88,45

%N Permutation of nonnegative integers: a(n) = n + floor(n/3)*(-1)^(n mod 3).

%C The inverse permutation is given by P(n) = A006368(n-1) + 1, for n >= 1, and P(0) = 0. - _Wolfdieter Lang_, Sep 21 2021

%C This permutation is given by A006369(n-1) + 1, with A006369(-1) = -1. Observed by _Kevin Ryde_. - _Wolfdieter Lang_, Sep 22 2021

%H Bruno Berselli, <a href="/A265667/b265667.txt">Table of n, a(n) for n = 0..1000</a>

%H Peter Lynch and Michael Mackey, <a href="https://arxiv.org/abs/2205.00565">Parity and Partition of the Rational Numbers</a>, arXiv:2205.00565 [math.NT], 2022. See set F p. 4.

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

%H <a href="/index/Per#IntegerPermutation">Index entries for permutations of the positive (or nonnegative) integers</a>.

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

%F a(n) = 2*a(n-3) - a(n-6).

%F a(3*k) = 4*k;

%F a(3*k+1) = 2*k+1, hence a(3*k+1) = a(3*k)/2 + 1;

%F a(3*k+2) = 4*k+2, hence a(3*k+2) = 2*a(3*k+1) = a(3*k) + 2.

%F Sum_{i=0..n} a(i) = A008738(A032793(n+1)).

%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - _Amiram Eldar_, Mar 30 2023

%e -------------------------------------------------------------------------

%e 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...

%e + + + + + + + + + + + + + + + + + + +

%e 0, 0, 0, 1, -1, 1, 2, -2, 2, 3, -3, 3, 4, -4, 4, 5, -5, 5, 6, ...

%e -------------------------------------------------------------------------

%e 0, 1, 2, 4, 3, 6, 8, 5, 10, 12, 7, 14, 16, 9, 18, 20, 11, 22, 24, ...

%e -------------------------------------------------------------------------

%t Table[n + Floor[n/3] (-1)^Mod[n, 3], {n, 0, 70}]

%o (Sage) [n+floor(n/3)*(-1)^mod(n,3) for n in (0..70)]

%o (Magma) [n+Floor(n/3)*(-1)^(n mod 3): n in [0..70]];

%Y Cf. A001477, A006368, A006369, A008738, A032793.

%Y Cf. A064455: n+floor(n/2)*(-1)^(n mod 2).

%Y Cf. A265888: n+floor(n/4)*(-1)^(n mod 4).

%Y Cf. A265734: n+floor(n/5)*(-1)^(n mod 5).

%K nonn,easy

%O 0,3

%A _Bruno Berselli_, Dec 12 2015 - based on an idea by _Paul Curtz_.

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 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)