|
Search: id:A064684
|
|
|
| A064684 |
|
Number of primes in orbit of 2n+1 in the 3x+1 problem. |
|
+0 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; listen)
|
|
|
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.
|
|
PROGRAM
|
(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: A107271 A104633 A102022 this_sequence A060408 A098071 A023360
Adjacent sequences: A064681 A064682 A064683 this_sequence A064685 A064686 A064687
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Jon Perry (perry(AT)globalnet.co.uk), Oct 10 2001
|
|
EXTENSIONS
|
More terms from Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Oct 13 2001
|
|
|
Search completed in 0.002 seconds
|