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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138754 PrimePi(A138751(n)) - a variation of the Collatz (3n+1) map. 5
1, 4, 2, 7, 4, 10, 5, 13, 6, 7, 19, 22, 9, 24, 10, 10, 11, 31, 33, 12, 35, 38, 14, 15, 45, 16, 47, 17, 48, 17, 55, 19, 20, 60, 22, 63, 66, 67, 24, 24, 25, 73, 25, 77, 26, 79, 83, 87, 31, 89, 31, 31, 93, 31, 32, 33, 33, 101, 102, 35, 104, 35, 113, 37, 115, 38, 122, 123, 41, 126 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

This map is a variation of the Collatz (or 3n+1) map:

Instead of considering the parity of the number, we look at

prime(n) (mod 3) to decide if this prime should be halved or doubled,

before going to the next prime (A007918) and finally back to the

positive integers via PrimePi (A000720).

Exactly like for the Collatz (3n+1) map (defined on nonnegative integers),

the first element for which it is defined is its only fixed point,

and all other starting values seem to end up in a cycle of length 3,

here: 4 -> 7 -> 5 -> 4.

Except for p=3, no prime yields a prime result under the

map A138750 (as can be seen using p=6k+1 or p=6k-1). Therefore

instead of applying primepi() after nextprime(), one could also simply use 1+primepi().

The prime p=3 is also the only case where n=2(mod 3) is not equivalent

to n != 1 (mod 3). It might have been a better choice to define

A138750(x)=2x if x=1 mod 3, =ceil(x/2) else. But since here it makes

only a difference for p=3, we use the original definition (cf

A124123).

LINKS

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

FORMULA

A138754(n) = A000720(A138751(n)) = A000720(A007918(A138750(A000040(n))))

EXAMPLE

a(4) = 7 since prime(4) = 7 = 1 (mod 3), thus A138750(7) =

2*7 = 14, nextprime(14) = 17, PrimePi(17) = 7 (i.e. 17 is the 7-th

prime).

a(5) = 4 since prime(5) = 11 = 2 (mod 3), thus A138750(11)

= ceil(11/2) = 6, nextprime(6) = 7, PrimePi(7) = 4 (i.e. 7 is the 4-th

prime).

PROG

(PARI) A138754(n)=primepi(A138751(n)) /* see there */

CROSSREFS

Cf. A124123, A138750-A138753, A000040, A000720, A007918.

Sequence in context: A197026 A195779 A130849 * A021963 A131914 A115302

Adjacent sequences:  A138751 A138752 A138753 * A138755 A138756 A138757

KEYWORD

easy,nonn

AUTHOR

M. F. Hasler (www.univ-ag.fr/~mhasler), Apr 01 2008

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

Content is available under The OEIS End-User License Agreement .

Last modified February 14 18:47 EST 2012. Contains 205663 sequences.