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.

A316823 Balanced nonary enumeration (or balanced nonary representation) of integers; write n in nonary (base 9) and then replace 5's with (-4)'s, 6's with (-3)'s, 7's with (-2)'s, and 8's with (-1)'s.

This page as a plain text file.
%I A316823 #26 Aug 29 2019 20:26:55
%S A316823 0,1,2,3,4,-4,-3,-2,-1,9,10,11,12,13,5,6,7,8,18,19,20,21,22,14,15,16,
%T A316823 17,27,28,29,30,31,23,24,25,26,36,37,38,39,40,32,33,34,35,-36,-35,-34,
%U A316823 -33,-32,-40,-39,-38,-37,-27,-26,-25,-24,-23,-31,-30,-29,-28
%N A316823 Balanced nonary enumeration (or balanced nonary representation) of integers; write n in nonary (base 9) and then replace 5's with (-4)'s, 6's with (-3)'s, 7's with (-2)'s, and 8's with (-1)'s.
%H A316823 Alois P. Heinz, <a href="/A316823/b316823.txt">Table of n, a(n) for n = 0..6560</a>
%e A316823 Since 35_10=38_9, the digits of 35 in base 9 are 3 and 8. 8>4, so it is replaced with (-1). The digits are then 3 and -1, so a(35)=3*9^1+(-1)*9^0=27-1=26.
%p A316823 a:= proc(n) option remember; `if`(n=0, 0,
%p A316823       9*a(iquo(n, 9))+mods(n, 9))
%p A316823     end:
%p A316823 seq(a(n), n=0..100);  # _Alois P. Heinz_, Aug 26 2019
%o A316823 (PARI) f(x) = if (x > 9/2, -(9-x), x);
%o A316823 a(n) = subst(Pol(apply(x->f(x), digits(n, 9)), 'x), 'x, 9); \\ _Michel Marcus_, Aug 27 2019
%Y A316823 Cf. A007095, A117966, A309991, A309995.
%Y A316823 Column k=4 of A319047.
%K A316823 sign,base
%O A316823 0,3
%A A316823 _Jackson Haselhorst_, Aug 26 2019