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.

A037875 (1/2)*Sum{|d(i)-e(i)|}, where Sum{d(i)*7^i} is base 7 representation of n and e(i) are digits d(i) in nonincreasing order, for i=0,1,...,m.

This page as a plain text file.
%I A037875 #10 Aug 05 2025 13:54:43
%S A037875 0,0,0,0,0,0,1,0,0,0,0,0,0,2,1,0,0,0,0,0,3,2,1,0,0,0,0,4,3,2,1,0,0,0,
%T A037875 5,4,3,2,1,0,0,6,5,4,3,2,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,2,1,0,0,0,0,
%U A037875 0,3,2,1,0,0,0,0,4,3,2,1,0,0,0,5,4,3,2,1,0,0
%N A037875 (1/2)*Sum{|d(i)-e(i)|}, where Sum{d(i)*7^i} is base 7 representation of n and e(i) are digits d(i) in nonincreasing order, for i=0,1,...,m.
%C A037875 Starts to differ from A037857 at n=350 = 1010_7. - _R. J. Mathar_, Aug 05 2025
%p A037875 A037875 := proc(n)
%p A037875     local a,dgs,dgsE ;
%p A037875     a := 0 ;
%p A037875     dgs := convert(n,base,7);
%p A037875     dgsE := sort(dgs,`>`) ;
%p A037875     for i from 1 to nops(dgs) do
%p A037875         a := a+ abs(op(i,dgs)-op(i,dgsE)) ;
%p A037875     end do:
%p A037875     a/2 ;
%p A037875 end proc: # _R. J. Mathar_, Oct 19 2015
%K A037875 nonn,base
%O A037875 1,14
%A A037875 _Clark Kimberling_
%E A037875 Definition swapped with A037884. - _R. J. Mathar_, Oct 19 2015