# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a027389 Showing 1-1 of 1 %I A027389 #24 May 08 2022 12:34:57 %S A027389 0,2,2,2,4,2,1,4,0,1,2,4,4,4,6,4,3,6,2,3,2,4,4,4,6,4,3,6,2,3,2,4,4,4, %T A027389 6,4,3,6,2,3,4,6,6,6,8,6,5,8,4,5,2,4,4,4,6,4,3,6,2,3,1,3,3,3,5,3,2,5, %U A027389 1,2,4,6,6,6,8,6,5,8,4,5,0 %N A027389 Write decimal digits for n, count endpoints (version 4). %C A027389 Number of endpoints: 0,8 - zero, 6,9 - one, 1,2,3,5 - two, 4,7 - four. - _Michael B. Porter_, Oct 28 2017 %H A027389 Harvey P. Dale, Table of n, a(n) for n = 0..1000 %H A027389 David A. Corneth, Image of digits with their endpoints. %F A027389 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 A027389 The digit 1 has two endpoints, and the digit 8 has no endpoints, so a(18) = 2. - _Michael B. Porter_, Oct 28 2017 %t A027389 Table[Total[IntegerDigits[n]/.{1->2,3->2,5->2,6->1,7->4,8->0,9->1}],{n,0,100}] (* _Harvey P. Dale_, May 08 2022 *) %o A027389 (PARI) a(n)=vecsum(apply(d->[0, 2, 2, 2, 4, 2, 1, 4, 0, 1][d+1], digits(n))); \\ based on program for A027386 by _Andrew Howroyd_, _Michael B. Porter_, Oct 28 2017 %Y A027389 Cf. A027386, A027387, A027388, A055642, A100910, A102683, A268643. %K A027389 nonn,base %O A027389 0,2 %A A027389 _N. J. A. Sloane_ %E A027389 a(6) corrected by _Michael B. Porter_, Oct 28 2017 (per _Andrew Howroyd_) %E A027389 a(27) to a(80) by _Michael B. Porter_, Oct 28 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE