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.

A134025 Numbers for which the balanced ternary representation is the same length as the ternary representation.

This page as a plain text file.
%I A134025 #16 Dec 15 2015 19:05:32
%S A134025 0,1,3,4,9,10,11,12,13,27,28,29,30,31,32,33,34,35,36,37,38,39,40,81,
%T A134025 82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,
%U A134025 103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121
%N A134025 Numbers for which the balanced ternary representation is the same length as the ternary representation.
%C A134025 A003462 is a subsequence; A171960(a(n)) >= a(n). - _Reinhard Zumkeller_, Jan 20 2010
%H A134025 Robert Israel, <a href="/A134025/b134025.txt">Table of n, a(n) for n = 0..10000</a>
%F A134025 a(n) = f(n,0,0) with f(n,m,k) = if n=0 then k else if k<(3^(m+1)-1)/2 then f(n-1,m,k+1) else f(n-1,m+1,3^(m+1)).
%F A134025 A134021(a(n)) = A081604(a(n)).
%F A134025 G.f.: x/(1-x)^2 + (1-x)^(-1)*Sum_{j>=1} ((3^j-1)/2) * x^(3/4 + 3^j/2 + j/2). - _Robert Israel_, Dec 14 2015
%p A134025 0,seq($3^(d-1)..floor(3^d/2), d=0..5); # _Robert Israel_, Dec 14 2015
%t A134025 f[n_, m_, k_] := If[n == 0, k, If[k < (3^(m + 1) - 1)/2, f[n - 1, m, k + 1], f[n - 1, m + 1, 3^(m + 1)]]]; Table[f[n, 0, 0], {n, 0, 63}] (* _L. Edson Jeffery_, Dec 10 2015 *)
%Y A134025 Complement of A134026.
%K A134025 nonn,base
%O A134025 0,3
%A A134025 _Reinhard Zumkeller_, Oct 19 2007