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!)
A026185 If n even, then 2n. If n odd, then nearest integer to 2n/3. 5
0, 1, 4, 2, 8, 3, 12, 5, 16, 6, 20, 7, 24, 9, 28, 10, 32, 11, 36, 13, 40, 14, 44, 15, 48, 17, 52, 18, 56, 19, 60, 21, 64, 22, 68, 23, 72, 25, 76, 26, 80, 27, 84, 29, 88, 30, 92, 31, 96, 33, 100, 34, 104, 35, 108, 37, 112, 38, 116, 39, 120, 41 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
For n > 0, position of n in A026184. In other words, this is the inverse permutation to A026184. For proof, see the Reble link.
Permutation of nonnegative integers: lodumo_4 of (0,1,0,2,0,3,0,1,0,2,0,3,0,1,0,2,0,3,0,1,0,2,0,3,0,1,0,2,0,3,...). - Philippe Deléham, Oct 25 2011
LINKS
F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020.
FORMULA
a(2n)=4n; a(6n+1)=4n+1; a(6n+3)=4n+2; a(6n+5)=4n+3. G.f.: x(1+4*x+x^2+4*x^3+x^4+4*x^5+x^6)/((1+x^2+x^4)*(1-x^2)^2). - Philippe Deléham, Oct 25 2011
MATHEMATICA
Table[If[EvenQ[n], 2 n, Round[2 n/3]], {n, 0, 50}] (* Vincenzo Librandi, Feb 03 2020 *)
PROG
(Magma) [IsEven(n) select 2*n else Round(2*n/3): n in [0..79] ]; // Vincenzo Librandi, Feb 03 2020
CROSSREFS
Cf. A026184.
Bisections: A008586, A042968.
Sequence in context: A153016 A231549 A088610 * A026209 A198473 A133640
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Feb 02 2020, changing the definition to one given by Philippe Deléham, Oct 25 2011, and making the old definition a comment. Thanks to Don Reble for proving that the two definitions produce the same sequence.
STATUS
approved

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 July 19 04:24 EDT 2024. Contains 374388 sequences. (Running on oeis4.)