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.

A107681 Repeat(first 2^k numbers with no 2 in ternary representation) for k>0.

Original entry on oeis.org

0, 1, 0, 1, 3, 4, 0, 1, 3, 4, 9, 10, 12, 13, 0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37
Offset: 1

Views

Author

Reinhard Zumkeller, May 20 2005

Keywords

Comments

let A032924(n) = Sum(d(i)*3^i: 0
then .... a(n) = Sum((d(i)-1)*3^i: 0<=i
A032924(n) = A107680(n) + a(n);
A081604 (a(n)) <= A081604(A107680(n)) = A081604(A032924(n)) = A000523(n+1).

Examples

			A032924(177) = A107680(177) + a(177),
....... 1420 = ....... 1093 + 327,
.. '1221121' = ... '1111111'+ '110010',
............ = . A003462(7) + A005836(51).
		

Programs

  • PARI
    a(n)= fromdigits(binary(n+1-1<Ruud H.G. van Tol, Nov 18 2024
    
  • Python
    def A107681(n): return int(bin(n+1)[3:],3) # Chai Wah Wu, May 06 2025

Formula

a(n) = A005836(A062050(n+1)).

Extensions

Data corrected by Ruud H.G. van Tol, Nov 18 2024.