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.

A364144 Number of distinct representations for n in base 2, using digits -1,0,1, whose sum of digits is 0.

This page as a plain text file.
%I A364144 #19 Jul 13 2023 12:59:44
%S A364144 1,1,1,2,1,2,2,3,1,3,2,4,2,4,3,4,1,3,3,5,2,6,4,6,2,5,4,7,3,6,4,5,1,3,
%T A364144 3,6,3,7,5,8,2,7,6,10,4,10,6,8,2,6,5,9,4,10,7,10,3,8,6,10,4,8,5,6,1,3,
%U A364144 3,6,3,8,6,9,3,8,7,13,5,12,8,11,2,8,7,13,6
%N A364144 Number of distinct representations for n in base 2, using digits -1,0,1, whose sum of digits is 0.
%F A364144 a(2^n) = 1.
%F A364144 a(2^n-1) = A028310(n).
%e A364144 a(12) = 2, because 12 = 16-4 = 32-16-8+4.
%o A364144 (PARI) a364144(upto) = {my (a=vector(upto)); for (k=1, 3^floor(3*log(upto)), my (w=digits(k,3), n); w=apply(x->x-1, w); if (w[1] && vecsum(w)==0, my (n=fromdigits(w,b=2)); if (n>0 && n<=#a, a[n]++))); concat(1,a)};
%o A364144 a364144(70) \\ _Hugo Pfoertner_, Jul 11 2023
%Y A364144 Cf. A028310, A052955.
%K A364144 nonn,base
%O A364144 0,4
%A A364144 _Jeffrey Shallit_, Jul 10 2023
%E A364144 a(0)=1 prepended by _Alois P. Heinz_, Jul 10 2023