cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A187486 Distance between first and second positions of A181762(n).

Original entry on oeis.org

0, 15, 0, 25, 0, 35, 0, 45, 0, 55, 0, 65, 0, 75, 0, 85, 15, 95, 0, 105, 0, 115, 0, 125, 0, 135, 0, 145, 25, 155, 0, 165, 0, 175, 0, 185, 0, 195, 0, 205, 35, 215, 0, 225, 0, 235, 0, 245, 0, 255, 0, 265, 45, 275, 0, 285, 0, 295, 0, 305, 0, 315, 0, 325, 55, 335, 0, 345, 0, 355
Offset: 0

Views

Author

Zak Seidov, Mar 10 2011

Keywords

Comments

Some entries of A181762 occur twice some only once.
The sequence gives the distance between first and second positions of A181762(n),
a(n)=0 if A181762(n) occurs only once.
The numbers that occur in A181762 only once are 0, 2, 4, 6, 8, 10, 12, 14, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 42, 44, 46, ...

Crossrefs

Cf. A181762.

A330710 Numbers that reach 1 in the 3x + 5 variation of Collatz map.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 18, 32, 36, 41, 53, 64, 69, 72, 82, 106, 107, 111, 128, 138, 141, 143, 144, 163, 164, 169, 189, 212, 214, 217, 219, 222, 231, 247, 256, 263, 276, 281, 282, 286, 287, 288, 299, 326, 328, 331, 338, 349, 363, 373, 378, 381, 383, 397
Offset: 1

Views

Author

Cara Bennett, Dec 27 2019

Keywords

Comments

In this variation of the Collatz function, f(x) = x/2 if x is even, 3x + 5 if x is odd.
f(a(n)) will end in the loop 8, 4, 2, 1.
For any odd number n in the sequence, n*2^x where x is a positive integer will also be in the sequence.

Examples

			For n = 53, the numbers produced are 53 -> 164 -> 82 -> 41 -> 128 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1 -> 8 -> 4 -> 2 -> 1 -> ...
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 400, Function[n, NestWhile[If[EvenQ@ #, #/2, 3 # + 5] &, n, And[FreeQ[{##}, 1], Count[{##}, n] <= 2] &, All, 120] == 1]] (* Michael De Vlieger, Dec 27 2019 *)

A350044 Loop starting at 187 in the Collatz-like map {x -> 3x+5 if x is odd, x/2 otherwise}.

Original entry on oeis.org

187, 566, 283, 854, 427, 1286, 643, 1934, 967, 2906, 1453, 4364, 2182, 1091, 3278, 1639, 4922, 2461, 7388, 3694, 1847, 5546, 2773, 8324, 4162, 2081, 6248, 3124, 1562, 781, 2348, 1174, 587, 1766, 883, 2654, 1327, 3986, 1993, 5984, 2992, 1496, 748, 374, 187, 566, 283, 854
Offset: 1

Views

Author

Keywords

Comments

Repeats every forty-four terms starting at 187. Although other loops exist for the "3x+5" map, including 5 -> 20 -> 10 -> 5 and 19 -> 62 -> 31 -> 98 -> 49 -> 152 -> 76 -> 38 -> 19, this loop is much longer and does not appear in the trajectories of as many numbers.
If the Collatz conjecture is false, it will most likely fail because of the existence of a long loop.
a(n) never ends with 0 or 5. a(n+4) - a(n) ends with 0 or 5. - Paul Curtz, Dec 29 2021

Examples

			A181762(187) = 3*(187) + 5 = 566; then A181762(566) = 566/2 = 283.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 187; a[n_] := a[n] = If[OddQ[a[n - 1]], 3*a[n - 1] + 5, a[n - 1]/2]; Array[a, 50] (* Amiram Eldar, Dec 25 2021 *)
  • Python
    N, alst, f = 48, [187], lambda x: x//2 if x%2 == 0 else 3*x + 5
    [alst.append(f(alst[-1])) for _ in range(N)]
    print(alst) # Michael S. Branicky, Dec 28 2021

Formula

a(n) = A181762(a(n-1)) for n > 1, with a(1) = 187.
Showing 1-3 of 3 results.