The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A138750 a(n) = ceiling(n/2) if n == 2 (mod 3), a(n) = 2n otherwise. 9
0, 2, 1, 6, 8, 3, 12, 14, 4, 18, 20, 6, 24, 26, 7, 30, 32, 9, 36, 38, 10, 42, 44, 12, 48, 50, 13, 54, 56, 15, 60, 62, 16, 66, 68, 18, 72, 74, 19, 78, 80, 21, 84, 86, 22, 90, 92, 24, 96, 98, 25, 102, 104, 27, 108, 110, 28, 114, 116, 30, 120, 122, 31, 126, 128, 33, 132, 134, 34 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This map is inspired by A124123, which hides in fact a variation of the Collatz problem, defined on the set of primes and working mod 3 instead of mod 2. See A138751 for more information.
The use of ceiling() is here equivalent to round().
The main reason for defining this function is to write A124123 as complement of A007918(A138750(A000040)), and to express the recursion function occurring there in terms of this map.
It might have been more natural to define this map as a(n) = 2n if n == 1 (mod 3), a(n) = ceiling(n/2) otherwise, which is equivalent for all primes > 3 (which are either == 1 or == 2 (mod 3)) and would have "better" properties regarding the analysis of orbits of all integers under this map.
However, for the prime n=3 it does make a difference, and in order to reproduce the map occurring in A124123, we had to adopt the present convention.
LINKS
FORMULA
G.f.: x*(2 + x + 6*x^2 + 6*x^3 + 2*x^4 + 6*x^5 + 4*x^6) / ( (1+x)*(x^2-x+1)*(x-1)^2*(1+x+x^2)^2 ). - R. J. Mathar, Oct 16 2013
a(n) = a(n-3) + a(n-6) - a(n-9); a(0)=0, a(1)=2, a(2)=1, a(3)=6, a(4)=8, a(5)=3, a(6)=12, a(7)=14, a(8)=4. - Harvey P. Dale, Nov 20 2013
EXAMPLE
a(0)=2*0=0, a(1)=2*1=2, a(3)=2*3=6, a(4)=2*4=8, ... since these indices are not congruent to 2 (mod 3).
a(2)=ceiling(2/2)=1, a(5)=ceiling(5/2)=3, a(8)=ceiling(8/2)=4, a(11)=ceiling(11/2)=6, ... since these indices are congruent to 2 (mod 3).
MATHEMATICA
Table[If[Mod[n, 3]==2, Ceiling[n/2], 2n], {n, 0, 70}] (* or *) LinearRecurrence[{0, 0, 1, 0, 0, 1, 0, 0, -1}, {0, 2, 1, 6, 8, 3, 12, 14, 4}, 70] (* Harvey P. Dale, Nov 20 2013 *)
PROG
(PARI) A138750(n) = if( n%3==2, ceil(n/2), 2*n )
CROSSREFS
Cf. A001281, A124123, A138751-A138753, A008588 (trisection), A016933 (trisection), A032766 (trisection)
Sequence in context: A138510 A026215 A026220 * A342369 A342842 A352760
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Mar 28 2008
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 May 23 02:40 EDT 2024. Contains 372758 sequences. (Running on oeis4.)