login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A222118 Number of terms in Collatz (3x+1) trajectory of n that did not appear in previous trajectories. 6
1, 1, 6, 0, 0, 1, 10, 0, 3, 0, 0, 1, 0, 0, 9, 0, 0, 1, 5, 0, 3, 0, 0, 1, 3, 0, 95, 0, 0, 1, 0, 0, 3, 0, 0, 1, 3, 0, 12, 0, 0, 1, 8, 0, 3, 0, 0, 1, 0, 0, 5, 0, 0, 1, 7, 0, 3, 0, 0, 1, 0, 0, 13, 0, 0, 1, 0, 0, 3, 0, 0, 1, 3, 0, 8, 0, 0, 1, 9, 0, 1, 0, 0, 1, 0, 0, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For n > 2, n such that a(n) = 0 are termed impure (A134191), while n such that a(n) > 0 are termed pure (A061641). - T. D. Noe, Feb 23 2013
From Robert G. Wilson v, Feb 25 2017: (Start)
For a(n) to be equal to 0, n != 0 (mod 3),
For a(n) to be an even positive number, n = {3, 7} (mod 12),
For a(n) to be equal to 1, n = {0, 1, 2, 3, 6, 7, 9} (mod 12),
For a(n) to be equal to 3, n = {1, 3, 9} (mod 12),
For a(n) to be an odd number > 3, n = {3, 7} (mod 12).
[Note that the above conditions are necessary but not sufficient. - Editors, Dec 15 2017]
(End)
a(n) gives the number of new terms in the n-th row of A070165 (see A263716). - Andrey Zabolotskiy, Feb 27 2017
LINKS
FORMULA
a(n) = A006577(n) - A221956(n) + 1. - Michel Lagneau, Feb 23 2013
EXAMPLE
a(7) = 10, since trajectory of 7 includes 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, which did not appear in earlier trajectories.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; found = {}; Table[c = Collatz[n]; r = Complement[c, found]; found = Union[found, c]; Length[r], {n, 100}] (* T. D. Noe, Feb 23 2013 *)
PROG
(Python)
s = set([1])
print(1)
for n in range(2, 100):
m, r = n, 0
while m not in s:
s.add(m)
m = (m//2 if m%2==0 else 3*m+1)
r += 1
print(r)
# Andrey Zabolotskiy, Feb 21 2017
CROSSREFS
Sequence in context: A324398 A171916 A325740 * A267333 A337885 A333204
KEYWORD
nonn
AUTHOR
Jayanta Basu, Feb 23 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:32 EDT 2024. Contains 371914 sequences. (Running on oeis4.)