Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Nov 06 2017 04:33:41
%S 0,2,2,2,2,2,1,4,0,1,2,4,4,4,4,4,3,6,2,3,2,4,4,4,4,4,3,6,2,3,2,4,4,4,
%T 4,4,3,6,2,3,2,4,4,4,4,4,3,6,2,3,2,4,4,4,4,4,3,6,2,3,1,3,3,3,3,3,2,5,
%U 1,2,4,6,6,6,6,6,5,8,4,5,0
%N Write digits for n, count endpoints (version 3).
%C Number of endpoints: 0,8 - zero, 6,9 - one, 1,2,3,4,5 - two, 7 - four. - _Michael B. Porter_, Oct 28 2017
%F a(10*n + d) = a(n) + e where e is the number of endpoints of single digit d. - _David A. Corneth_, Oct 28 2017
%e The digit 1 has two endpoints, and the digit 8 has no endpoints, so a(18) = 2. - _Michael B. Porter_, Oct 28 2017
%o (PARI) a(n)=vecsum(apply(d->[0, 2, 2, 2, 2, 2, 1, 4, 0, 1][d+1], digits(n))); \\ based on program for A027386 by _Andrew Howroyd_, _Michael B. Porter_, Oct 28 2017
%Y Cf. A027386, A027387, A027389, A055642, A100910, A102683, A268643.
%K nonn,base
%O 0,2
%A _N. J. A. Sloane_
%E a(6) corrected by _Michael B. Porter_, Oct 28 2017 (per _Andrew Howroyd_)
%E a(27) to a(80) by _Michael B. Porter_, Oct 28 2017