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.

A085062 a(n) = A085060(n)/9 - 1/3.

Original entry on oeis.org

0, 1, 1, 4, 2, 4, 3, 13, 4, 7, 5, 13, 6, 10, 7, 40, 8, 13, 9, 22, 10, 16, 11, 40, 12, 19, 13, 31, 14, 22, 15, 121, 16, 25, 17, 40, 18, 28, 19, 67, 20, 31, 21, 49, 22, 34, 23, 121, 24, 37, 25, 58, 26, 40, 27, 94, 28, 43, 29, 67, 30, 46, 31, 364, 32, 49, 33, 76, 34, 52, 35, 121, 36, 55
Offset: 0

Views

Author

N. J. A. Sloane, Aug 11 2003

Keywords

Comments

Interlacing of A001477 and A085060 / 3. - Ruud H.G. van Tol, Aug 30 2024

Crossrefs

Bisection gives: A001477 (even part).

Programs

  • Maple
    a:= n-> `if`(n::odd, a((3*n+1)/2), n/2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jul 01 2023
  • PARI
    a(n) = ((3/2)^valuation(n++, 2)*n-1)/2; \\ Ruud H.G. van Tol, Aug 30 2024
    
  • Python
    def A085062(n): return ((k:=n+1)*3**((m:=(-k&k).bit_length())-1)>>m) # Chai Wah Wu, Feb 26 2025

Formula

a(n) mod 2 = A292077(n+1). - Alois P. Heinz, Jul 01 2023
a(2*n) = n; a(2*n+1) = 3 * a(n) + 1. - Ruud H.G. van Tol, Aug 31 2024