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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064684 Number of primes in orbit of 2n+1 in the 3x+1 problem. 3
0, 3, 2, 6, 6, 5, 3, 4, 4, 7, 1, 4, 7, 25, 6, 24, 7, 3, 7, 11, 25, 8, 4, 23, 7, 6, 3, 24, 8, 11, 5, 20, 7, 9, 3, 22, 25, 2, 6, 11, 5, 24, 1, 9, 10, 20, 3, 20, 26, 7, 8, 19, 11, 21, 26, 15, 2, 8, 5, 10, 20, 13, 23, 12, 26, 9, 7, 9, 20, 13, 3, 20, 26, 24, 7, 3, 8, 18, 12, 13, 20, 5, 24, 15, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

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

EXAMPLE

orbit(3) = 3->10->5->16->8->4->2->1. This contains 3 primes, 3, 5 and 2.

PROG

(ARIBAS): function orbit(n: integer): array; var stk: stack; begin stack_push(stk, n); while n <> 1 do if n mod 2 = 0 then n := n div 2; else n := 3*n + 1; end; stack_push(stk, n); end; return stack2array(stk); end; function primesfilter(ar: array): array; var j, k: integer; stk: stack; begin for j := 0 to length(ar) - 1 do k := prime32test(ar[j]); if k = 1 then stack_push(stk, ar[j]); end; end; return stack2array(stk); end; function a064684(maxarg: integer); var n: integer; begin for n := 1 to maxarg by 2 do write(length(primesfilter(orbit(n))), " "); end; end; a064684(190).

CROSSREFS

Sequence in context: A196565 A104633 A102022 * A098071 A286970 A023360

Adjacent sequences:  A064681 A064682 A064683 * A064685 A064686 A064687

KEYWORD

nonn,easy

AUTHOR

Jon Perry, Oct 10 2001

EXTENSIONS

More terms from Klaus Brockhaus, Oct 13 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 22 13:47 EST 2019. Contains 329393 sequences. (Running on oeis4.)