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.

A360096 To get a(n), replace 0's in the binary expansion of n with (-1) and interpret the result in base n.

This page as a plain text file.
%I A360096 #12 Jan 30 2023 18:38:41
%S A360096 0,1,1,4,11,21,41,57,439,640,909,1222,1859,2354,2953,3616,61167,78303,
%T A360096 98837,123121,152379,185641,224113,268227,344999,405601,473901,550423,
%U A360096 637363,732483,837929,954305,32472031,37912414,44058661,50977186,58741163,67420476
%N A360096 To get a(n), replace 0's in the binary expansion of n with (-1) and interpret the result in base n.
%C A360096 The empty bit string is used as binary expansion of 0, so a(0) = 0.
%H A360096 Alois P. Heinz, <a href="/A360096/b360096.txt">Table of n, a(n) for n = 0..16383</a>
%F A360096 a(n) = [x^n] g_n(x) where g_k(x) satisfies g_k(x) = k*(x+1)*g_k(x^2) + x/(1+x).
%F A360096 a(n) = A(n,n) where A(n,k) = k*A(floor(n/2),k)+2*(n mod 2)-1 for n>0, A(0,k)=0.
%F A360096 a(n) = A360099(n,n).
%F A360096 a(n) mod 2 = A057427(n) if n is even; a(n) mod 2 = A030300(n) if n is odd.
%p A360096 b:= proc(n, k) option remember; local m;
%p A360096       `if`(n=0, 0, k*b(iquo(n, 2, 'm'), k)+2*m-1)
%p A360096     end:
%p A360096 a:= n-> b(n$2):
%p A360096 seq(a(n), n=0..44);
%p A360096 # second Maple program:
%p A360096 a:= n-> (l-> add((2*l[i]-1)*n^(i-1), i=1..nops(l)))(Bits[Split](n)):
%p A360096 seq(a(n), n=0..44);
%Y A360096 Main diagonal of A360099.
%Y A360096 Cf. A030300, A057427.
%K A360096 nonn,base
%O A360096 0,4
%A A360096 _Alois P. Heinz_, Jan 25 2023