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.

This page as a plain text file.
%I A107681 #25 May 06 2025 09:25:14
%S A107681 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,
%T A107681 39,40,0,1,3,4,9,10,12,13,27,28,30,31,36,37,39,40,81,82,84,85,90,91,
%U A107681 93,94,108,109,111,112,117,118,120,121,0,1,3,4,9,10,12,13,27,28,30,31,36,37
%N A107681 Repeat(first 2^k numbers with no 2 in ternary representation) for k>0.
%C A107681 let A032924(n) = Sum(d(i)*3^i: 0<d(i)<3, 0<=i<L)
%C A107681 then .... a(n) = Sum((d(i)-1)*3^i: 0<=i<L);
%C A107681 A032924(n) = A107680(n) + a(n);
%C A107681 A081604 (a(n)) <= A081604(A107680(n)) = A081604(A032924(n)) = A000523(n+1).
%H A107681 Ruud H.G. van Tol, <a href="/A107681/b107681.txt">Table of n, a(n) for n = 1..8190</a> (12 rows).
%F A107681 a(n) = A005836(A062050(n+1)).
%e A107681 A032924(177) = A107680(177) + a(177),
%e A107681 ....... 1420 = ....... 1093 + 327,
%e A107681 .. '1221121' = ... '1111111'+ '110010',
%e A107681 ............ = . A003462(7) + A005836(51).
%o A107681 (PARI) a(n)= fromdigits(binary(n+1-1<<logint(n+1, 2)), 3); \\ _Ruud H.G. van Tol_, Nov 18 2024
%o A107681 (Python)
%o A107681 def A107681(n): return int(bin(n+1)[3:],3) # _Chai Wah Wu_, May 06 2025
%Y A107681 Cf. A000523, A005836, A003462, A007089, A032924, A062050, A081604, A107680.
%K A107681 nonn,easy,look
%O A107681 1,5
%A A107681 _Reinhard Zumkeller_, May 20 2005
%E A107681 Data corrected by _Ruud H.G. van Tol_, Nov 18 2024.