|
|
A006369
|
|
a(n) = 2n/3 for n divisible by 3, otherwise a(n) = round(4n/3). Or, equivalently, a(3*n-2) = 4*n-3, a(3*n-1) = 4*n-1, a(3*n) = 2*n.
(Formerly M2245)
|
|
27
|
|
|
0, 1, 3, 2, 5, 7, 4, 9, 11, 6, 13, 15, 8, 17, 19, 10, 21, 23, 12, 25, 27, 14, 29, 31, 16, 33, 35, 18, 37, 39, 20, 41, 43, 22, 45, 47, 24, 49, 51, 26, 53, 55, 28, 57, 59, 30, 61, 63, 32, 65, 67, 34, 69, 71, 36, 73, 75, 38, 77, 79, 40, 81, 83, 42, 85, 87, 44, 89, 91, 46, 93, 95
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Original name was: Nearest integer to 4n/3 unless that is an integer, when 2n/3.
This function was studied by Lothar Collatz in 1932.
Fibonacci numbers lodumo_2. - Philippe Deléham, Apr 26 2009
a(n) = A006368(n) + A168223(n); A168222(n) = a(a(n)); A168221(a(n)) = A006368(n). - Reinhard Zumkeller, Nov 20 2009
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems in Number Theory, E17.
M. Klamkin, Proposer, An infinite permutation, Problem 63-13, SIAM Review, Vol. 8:2 (1966), 234-236.
M. Klamkin, ed., Problems in Applied Mathematics: Selections from SIAM Review, SIAM, 1990; see pp. 579-581.
K. Knopp, Infinite Sequences and Series, Dover Publications, NY, 1958, p. 77.
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 31 (g(n)) and page 270 (f(n)).
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
J. H. Conway, On unsettleable arithmetical problems, Amer. Math. Monthly, 120 (2013), 192-198.
J. C. Lagarias, The 3x+1 problem and its generalizations, Amer. Math. Monthly, 92 (1985), 3-23.
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, Appendix to Thesis, Montreal, 1992
S. Schreiber & N. J. A. Sloane, Correspondence, 1980
Index entries for sequences that are permutations of the natural numbers
Index entries for two-way infinite sequences
Index entries for sequences related to 3x+1 (or Collatz) problem
|
|
FORMULA
|
From Michael Somos, Oct 05 2003: (Start)
G.f.: x * (1 + 3*x + 2*x^2 + 3*x^3 + x^4) / (1 - x^3)^2.
a(3*n) = 2*n, a(3*n + 1) = 4*n + 1, a(3*n - 1) = 4*n - 1, a(n) = -a(-n) for all n in Z. (End)
The map is: n -> if n mod 3 = 0 then 2*n/3 elif n mod 3 = 1 then (4*n-1)/3 else (4*n+1)/3.
a(n) = (2 - ((2*n + 1) mod 3) mod 2) * floor((2*n + 1)/3) + (2*n + 1) mod 3 - 1. - Reinhard Zumkeller, Jan 23 2005
a(n) = lod_2(F(n)). - Philippe Deléham, Apr 26 2009
0 = 21 + a(n)*(18 +4*a(n) - a(n+1) - 7*a(n+2)) + a(n+1)*(-a(n+2)) + a(n+2)*(-18 + 4*a(n+2)) for all n in Z. - Michael Somos, Aug 24 2014
a(n) = n + floor((n+1)/3)*(-1)^((n+1) mod 3). [Bruno Berselli, Dec 10 2015]
|
|
EXAMPLE
|
G.f. = x + 3*x^2 + 2*x^3 + 5*x^4 + 7*x^5 + 4*x^6 + 9*x^7 + 11*x^8 + 6*x^9 + ...
|
|
MAPLE
|
A006369 := proc(n) if n mod 3 = 0 then 2*n/3 else round(4*n/3); fi; end;
f:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end; # N. J. A. Sloane, Feb 04 2011
A006369:=(1+z**2)*(z**2+3*z+1)/(z-1)**2/(z**2+z+1)**2; # Simon Plouffe, in his 1992 dissertation
|
|
MATHEMATICA
|
Table[If[Divisible[n, 3], (2n)/3, Floor[(4n)/3+1/2]], {n, 0, 80}] (* Harvey P. Dale, Nov 03 2011 *)
Table[n + Floor[(n + 1)/3] (-1)^Mod[n + 1, 3], {n, 0, 80}] (* Bruno Berselli, Dec 10 2015 *)
|
|
PROG
|
(PARI) {a(n) = if( n%3, round(4*n / 3), 2*n / 3)}; /* Michael Somos, Oct 05 2003 */
(Haskell)
a006369 n | m > 0 = round (4 * fromIntegral n / 3)
| otherwise = 2 * n' where (n', m) = divMod n 3
-- Reinhard Zumkeller, Dec 31 2011
|
|
CROSSREFS
|
Inverse mapping to A006368. Cf. A028397, A069196.
Trajectories under A006368 and A006369: A180853, A217218, A185590, A180864, A028393, A028394, A094328, A094329, A028396, A028395, A217729, A182205, A223083-A223088, A185589.
Sequence in context: A209584 A209140 A265903 * A097284 A276684 A105353
Adjacent sequences: A006366 A006367 A006368 * A006370 A006371 A006372
|
|
KEYWORD
|
nonn,nice,easy,changed
|
|
AUTHOR
|
N. J. A. Sloane and J. H. Conway
|
|
EXTENSIONS
|
New name from Jon E. Schoenfield, Jul 28 2015
|
|
STATUS
|
approved
|
|
|
|