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.

A352544 a(n) = n/2 if n is even, otherwise n + A004186(n), where A004186 = arrange digits in decreasing order.

Original entry on oeis.org

0, 2, 1, 6, 2, 10, 3, 14, 4, 18, 5, 22, 6, 44, 7, 66, 8, 88, 9, 110, 10, 42, 11, 55, 12, 77, 13, 99, 14, 121, 15, 62, 16, 66, 17, 88, 18, 110, 19, 132, 20, 82, 21, 86, 22, 99, 23, 121, 24, 143, 25, 102, 26, 106, 27, 110, 28, 132, 29, 154, 30, 122, 31, 126, 32, 130, 33, 143, 34, 165, 35, 142, 36, 146, 37, 150, 38, 154, 39, 176, 40, 162, 41, 166, 42, 170, 43, 174, 44, 187, 45
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Mar 20 2022

Keywords

Comments

A variant of the Collatz (3x+1) map A006370. See A352540 - A352543 for more about iterations of this map.

Crossrefs

Cf. A004186.
Coincides with A064680 (half if even, double if odd) for n < 13.
Cf. A352540 (initial values with infinite orbit under A352544), A352541 (number of iterations of A352544 to reach a value for the second time), A352542 (orbit of 89 under A352544), A352543 (numbers that end in a loop of length > 3 under A352544), A352545 (representatives of loops of length > 3).

Programs

  • PARI
    apply( {A352544(n)=if(n%2,n+A004186(n),n\2)}, [0..90]) \\ with A004186(n)=fromdigits(vecsort(digits(n),,4))