Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A138757
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A138757 A007918(A138750(n)) = least prime > n/2 if n=2 (mod 3), > 2n else. +0
2
2, 2, 2, 7, 11, 3, 13, 17, 5, 19, 23, 7, 29, 29, 7, 31, 37, 11, 37, 41, 11, 43, 47, 13, 53, 53, 13, 59, 59, 17, 61, 67, 17, 67, 71, 19, 73, 79, 19, 79, 83, 23, 89, 89, 23, 97, 97, 29, 97, 101, 29, 103, 107, 29, 109, 113, 29, 127, 127, 31, 127, 127, 31, 127 (list; graph; listen)
OFFSET

0,1

COMMENT

This can be considered as the analogue of the Collatz (or 3n+1) map on the set of primes, see A138751 and A138754 for details.

Numbers 0,1,2 go immediately to the unique fixed point 2, all others end up in the cycle 7 -> 17 -> 11 -> 7, after a number of iterations given by A138753(A138757(n))-1 (= A138753(n)-2 if n is prime).

LINKS

Georges Brougnard, Definition of GB-sequences.

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

FORMULA

A138757(n)=A007918(A138750(n)) ; for p prime, A138757(p)=A138751(A000720(p))

EXAMPLE

a(7) = 17 since 7 = 1 (mod 3), thus A138750(7) = 2*7 = 14, nextprime(14) = 17.

a(11) = 7 since 11 = 2 (mod 3), thus A138750(11) = ceil(11/2) = 6, nextprime(6) = 7.

PROGRAM

(PARI) A138757(n)=nextprime(if(n%3==2, (n+1)\2, 2*n))

CROSSREFS

Cf. A124123, A138750-A138756, A007918.

Sequence in context: A029610 A094246 A023573 this_sequence A158927 A121258 A087421

Adjacent sequences: A138754 A138755 A138756 this_sequence A138758 A138759 A138760

KEYWORD

easy,nonn

AUTHOR

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

page 1

Search completed in 0.006 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 24 14:25 EST 2009. Contains 167438 sequences.


AT&T Labs Research