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.

A061392 a(n) = a(floor(n/3)) + a(ceiling(n/3)) with a(0) = 0 and a(1) = 1.

This page as a plain text file.
%I A061392 #37 Sep 02 2025 21:56:55
%S A061392 0,1,1,2,2,2,2,3,3,4,4,4,4,4,4,4,4,4,4,5,5,6,6,6,6,7,7,8,8,8,8,8,8,8,
%T A061392 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,10,10,10,10,11,11,12,
%U A061392 12,12,12,12,12,12,12,12,12,13,13,14,14,14,14,15,15,16,16,16,16,16,16,16
%N A061392 a(n) = a(floor(n/3)) + a(ceiling(n/3)) with a(0) = 0 and a(1) = 1.
%C A061392 Number of nonnegative integers < n having no 1 in their ternary representation. - _Reinhard Zumkeller_, Mar 23 2003; corrected by _Henry Bottomley_, Mar 24 2003
%H A061392 Rémy Sigrist, <a href="/A061392/b061392.txt">Table of n, a(n) for n = 0..6561</a>
%H A061392 Sam Northshield, <a href="https://doi.org/20.500.12648/1110">Sums across Pascal's triangle modulo 2</a>, Congressus Numerantium, 200, pp. 35-52, 2010.
%H A061392 Wikipedia, <a href="https://en.wikipedia.org/wiki/Cantor_function">Cantor function</a>.
%F A061392 a(n+1) + A081609(n) = n+1. - _Reinhard Zumkeller_, Mar 23 2003; corrected by _Henry Bottomley_, Mar 24 2003
%F A061392 From _Johannes W. Meijer_, Jun 05 2011: (Start)
%F A061392 a(3*n+1) = a(n+1) + a(n), a(3*n+2) = a(n+1) + a(n) and a(3*n+3) = 2*a(n+1), for n>=1, with a(0)=0, a(1)=1, a(2)=1 and a(3)=2. [Northshield]
%F A061392 G.f.: x*Product_{n>=0} (1 + x^(3^n) + 2*x^(2*3^n) + x^(3*3^n) + x^(4*3^n)). [Northshield] (End)
%F A061392 Apparently, for any n >= 0 and k such that n < 3^k, a(n) = 2^k * c(n / 3^k) where c is the Cantor function. - _Rémy Sigrist_, Jul 12 2019
%p A061392 A061392 := proc(n) option remember; local a : if n <=1 then n else A061392(floor(n/3)) + A061392(ceil(n/3)) fi: end: seq(A061392(n), n=0..87); # _Johannes W. Meijer_, Jun 05 2011
%Y A061392 k appears A061393(k) times.
%Y A061392 Cf. A007089, A062756, A081608, A081609, A081611.
%Y A061392 Essentially the partial sums of A088917.
%K A061392 nonn,look,changed
%O A061392 0,4
%A A061392 _Henry Bottomley_, Apr 30 2001