login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006368 The "amusical permutation" of the nonnegative numbers: a(2n)=3n, a(4n+1)=3n+1, a(4n-1)=3n-1.
(Formerly M2249)
27
0, 1, 3, 2, 6, 4, 9, 5, 12, 7, 15, 8, 18, 10, 21, 11, 24, 13, 27, 14, 30, 16, 33, 17, 36, 19, 39, 20, 42, 22, 45, 23, 48, 25, 51, 26, 54, 28, 57, 29, 60, 31, 63, 32, 66, 34, 69, 35, 72, 37, 75, 38, 78, 40, 81, 41, 84, 43, 87, 44, 90, 46, 93, 47, 96, 49, 99, 50, 102, 52, 105, 53 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

A permutation of the nonnegative integers.

There is a famous open question concerning the closed trajectories under this map - see A217218, A028393, A028394, and Conway (2013).

This is lodumo_3 of A131743. - Philippe Deléham, Oct 24 2011

Multiples of 3 interspersed with numbers other than multiples of 3. - Harvey P. Dale, Dec 16 2011

REFERENCES

J. H. Conway, Unpredictable iterations, in Proc. Number Theory Conf., Boulder, CO, 1972, pp. 49-52.

R. K. Guy, Unsolved Problems in Number Theory, E17.

J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 5.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

R. Zumkeller, Table of n, a(n) for n = 0..10000

David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669, 2015.

J. H. Conway, On unsettleable arithmetical problems, Amer. Math. Monthly, 120 (2013), 192-198. [Introduces the name "amusical permutation".]

Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992.

Simon Plouffe, 1031 Generating Functions and Conjectures, Université du Québec à Montréal, 1992.

Index entries for sequences related to 3x+1 (or Collatz) problem

Index entries for two-way infinite sequences

Index entries for sequences that are permutations of the natural numbers

Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1).

FORMULA

If n even, then a(n) = 3n/2; otherwise, a(n) = nearest integer to 3n/4.

G.f.: x(1+3x+x^2+3x^3+x^4)/((1-x^2)(1-x^4)). - Michael Somos, Jul 23 2002

a(n)=-a(-n).

a(n)=A006369(n)-A168223(n); A168221(n)=a(a(n)); A168222(a(n))=A006369(n). - Reinhard Zumkeller, Nov 20 2009

a(0)=0, a(1)=1, a(2)=3, a(3)=2, a(4)=6, a(5)=4, a(n)=a(n-2)+a(n-4)- a(n-6). - Harvey P. Dale, Dec 16 2011

a(n) = ((n+1) mod 2) * (3n/2) + (n mod 2) * round(3n/4). - Wesley Ivan Hurt, Nov 23 2013

EXAMPLE

9 is odd so a(9)=round(3*9/4)=round(7-1/4)=7.

MAPLE

f:=n-> if n mod 2 = 0 then 3*n/2 elif n mod 4 = 1 then (3*n+1)/4 else (3*n-1)/4; fi; [N. J. A. Sloane, Jan 21 2011]

A006368:=(1+3*z+z**2+3*z**3+z**4)/(1+z**2)/(z-1)**2/(1+z)**2; [Conjectured (correctly, except for the offset) by Simon Plouffe in his 1992 dissertation.]

MATHEMATICA

Table[If[EvenQ[n], (3n)/2, Floor[(3n+2)/4]], {n, 0, 80}] (* or *) LinearRecurrence[ {0, 1, 0, 1, 0, -1}, {0, 1, 3, 2, 6, 4}, 80] (* Harvey P. Dale, Dec 16 2011 *)

PROG

(PARI) a(n)=(3*n+n%2)\(2+n%2*2)

(PARI) a(n)=if(n%2, round(3*n/4), 3*n/2)

(Haskell)

a006368 n | u' == 0   = 3 * u

          | otherwise = 3 * v + (v' + 1) `div` 2

          where (u, u') = divMod n 2; (v, v') = divMod n 4

-- Reinhard Zumkeller, Apr 18 2012

CROSSREFS

Inverse mapping to A006369.

Cf. A028393, A028294, A028397, A180853, A180864, A182205, A217218.

Trajectories under A006368 and A006369: A180853, A217218, A185590, A180864, A028393, A028394, A094328, A094329, A028396, A028395, A217729, A182205, A223083-A223088, A185589, A185590.

Sequence in context: A257903 A257877 A257910 * A202845 A202838 A105354

Adjacent sequences:  A006365 A006366 A006367 * A006369 A006370 A006371

KEYWORD

nonn,nice,easy

AUTHOR

N. J. A. Sloane and J. H. Conway

EXTENSIONS

Edited by Michael Somos, Jul 23 2002

I replaced the definition by the original definition of Conway and Guy. - N. J. A. Sloane, Oct 03 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 26 18:43 EDT 2017. Contains 287129 sequences.