Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078350
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078350 Number of primes in {n, f(n), f(f(n)), ...., 1}, where f is the Collatz function defined by f(x) = x/2 if x is even; f(x) = 3x + 1 if x is odd. +0
2
0, 1, 3, 1, 2, 3, 6, 1, 6, 2, 5, 3, 3, 6, 4, 1, 4, 6, 7, 2, 1, 5, 4, 3, 7, 3, 25, 6, 6, 4, 24, 1, 7, 4, 3, 6, 7, 7, 11, 2, 25, 1, 8, 5, 4, 4, 23, 3, 7, 7, 6, 3, 3, 25, 24, 6, 8, 6, 11, 4, 5, 24, 20, 1, 7, 7, 9, 4, 3, 3, 22, 6, 25, 7, 2, 7, 6, 11, 11, 2, 5, 25, 24, 1, 1, 8, 9, 5, 10, 4, 20, 4, 3, 23, 20 (list; graph; listen)
OFFSET

1,3

LINKS

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

J. C. Lagarias, The 3x+1 problem and its generalizations, Amer. Math. Monthly, 92 (1985), 3-23.

EXAMPLE

The finite sequence n, f(n), f(f(n)), ...., 1 for n = 12 is: 12, 6, 3, 10, 5, 16, 8, 4, 2, 1, which has three prime terms. Hence a(12) = 3.

MATHEMATICA

f[n_] := n/2 /; Mod[n, 2] == 0 f[n_] := 3 n + 1 /; Mod[n, 2] == 1 g[n_] := Module[{i, p}, i = n; p = 0; While[i > 1, If[PrimeQ[i], p = p + 1]; i = f[i]]; p]; Table[g[n], {n, 1, 100}]

CROSSREFS

Cf. A064684.

Adjacent sequences: A078347 A078348 A078349 this_sequence A078351 A078352 A078353

Sequence in context: A107341 A138881 A070983 this_sequence A078719 A087227 A060477

KEYWORD

nice,nonn

AUTHOR

Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Dec 23 2002

page 1

Search completed in 0.002 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 October 11 09:12 EDT 2008. Contains 144832 sequences.


AT&T Labs Research