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.

A037883 a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*6^i} is the base 6 representation of n and e(i) are the digits d(i) in nondecreasing order.

This page as a plain text file.
%I A037883 #14 Aug 05 2025 14:01:37
%S A037883 0,0,0,0,0,0,0,1,2,3,4,0,0,0,1,2,3,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,
%T A037883 0,0,1,2,3,4,5,0,0,1,2,3,4,1,1,1,2,3,4,2,2,2,2,3,4,3,3,3,3,3,4,4,4,4,
%U A037883 4,4,4,0,1,2,3,4,5,0,0,1,2,3,4,0,0,0,1,2,3,1
%N A037883 a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*6^i} is the base 6 representation of n and e(i) are the digits d(i) in nondecreasing order.
%C A037883 Starts to differ from A037847 at n=230 = 1022_6. - _R. J. Mathar_, Aug 05 2025
%p A037883 A037883 := proc(n)
%p A037883     local a,dgs,dgsE ;
%p A037883     a := 0 ;
%p A037883     dgs := convert(n,base,6);
%p A037883     dgsE := sort(dgs) ;
%p A037883     for i from 1 to nops(dgs) do
%p A037883         a := a+ abs(op(i,dgs)-op(i,dgsE)) ;
%p A037883     end do:
%p A037883     a/2 ;
%p A037883 end proc: # _R. J. Mathar_, Oct 19 2015
%K A037883 nonn,base
%O A037883 1,9
%A A037883 _Clark Kimberling_
%E A037883 Definition swapped with A037874. - _R. J. Mathar_, Oct 19 2015