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!)
A185452 Image of n under the map n -> n/2 if n even, (5*n+1)/2 if n odd. 8
0, 3, 1, 8, 2, 13, 3, 18, 4, 23, 5, 28, 6, 33, 7, 38, 8, 43, 9, 48, 10, 53, 11, 58, 12, 63, 13, 68, 14, 73, 15, 78, 16, 83, 17, 88, 18, 93, 19, 98, 20, 103, 21, 108, 22, 113, 23, 118, 24, 123, 25, 128, 26, 133, 27, 138, 28, 143, 29, 148, 30, 153, 31, 158, 32, 163, 33, 168, 34, 173, 35, 178, 36, 183, 37, 188, 38, 193, 39, 198 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
REFERENCES
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see pages 11, 88.
LINKS
FORMULA
a(n) = (6*n+1-(4*n+1)*(-1)^n)/4; g.f.: x*(3+x+2*x^2)/(1-x^2)^2; a(n) = 2*a(n-2)-a(n-4) for n>3. [Bruno Berselli, Feb 09 2011]
MAPLE
f:=n->if n mod 2 = 0 then n/2 else (5*n+1)/2; fi;
MATHEMATICA
LinearRecurrence[{0, 2, 0, -1}, {0, 3, 1, 8}, 80] (* Harvey P. Dale, May 16 2014 *)
If[EvenQ[#], #/2, (5#+1)/2]&/@Range[0, 80] (* Harvey P. Dale, Jan 02 2015 *)
PROG
(Magma) [ IsEven(n) select n/2 else (5*n+1)/2: n in [0..79] ]; // Bruno Berselli, Feb 09 2011
(PARI) a(n)=if(n%2, 5*n+1, n)/2 \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
Sequence in context: A073072 A273927 A293975 * A179449 A049541 A352939
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 04 2011
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 April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)