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.
%I A037864 #12 Jan 27 2025 07:32:23 %S A037864 1,1,-1,-1,2,2,2,0,0,2,2,2,0,0,0,0,0,-2,-2,0,0,0,-2,-2,3,3,3,1,1,3,3, %T A037864 3,1,1,3,3,3,1,1,1,1,1,-1,-1,1,1,1,-1,-1,3,3,3,1,1,3,3,3,1,1,3,3,3,1, %U A037864 1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1 %N A037864 a(n)=(number of digits <=2)-(number of digits >2) in base 5 representation of n. %p A037864 A037864 := proc(n) %p A037864 a := 0 ; %p A037864 dgs := convert(n,base,5); %p A037864 for i from 1 to nops(dgs) do %p A037864 if op(i,dgs)<=2 then %p A037864 a := a+1 ; %p A037864 else %p A037864 a := a-1 ; %p A037864 end if; %p A037864 end do: %p A037864 a ; %p A037864 end proc: # _R. J. Mathar_, Oct 16 2015 %t A037864 nd5[n_]:=Module[{idn5=IntegerDigits[n,5],a},a=Count[idn5,_?(#<=2&)];2a-Length[idn5]]; Array[nd5,90] (* _Harvey P. Dale_, Oct 13 2011 *) %Y A037864 Cf. A110592. %K A037864 base,sign %O A037864 1,5 %A A037864 _Clark Kimberling_