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.

A027386 Write digits for n, count endpoints (version 1).

This page as a plain text file.
%I A027386 #21 Jul 08 2025 17:51:37
%S A027386 0,2,2,2,2,2,1,2,0,1,2,4,4,4,4,4,3,4,2,3,2,4,4,4,4,4,3,4,2,3,2,4,4,4,
%T A027386 4,4,3,4,2,3,2,4,4,4,4,4,3,4,2,3,2,4,4,4,4,4,3,4,2,3,1,3,3,3,3,3,2,3,
%U A027386 1,2,2,4,4,4,4,4,3,4,2,3,0
%N A027386 Write digits for n, count endpoints (version 1).
%C A027386 Number of endpoints: 0,8 - zero, 6,9 - one, 1,2,3,4,5,7 - two. - _Michael B. Porter_, Oct 28 2017
%F A027386 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 A027386 The digit 1 has two endpoints, and the digit 8 has no endpoints, so a(18) = 2. - _Michael B. Porter_, Oct 28 2017
%t A027386 Table[Total[IntegerDigits[n]/.{0->0,1->2,2->2,3->2,4->2,5->2,6->1,7->2,8->0,9->1}],{n,0,80}] (* _Harvey P. Dale_, Apr 28 2018 *)
%o A027386 (PARI) a(n)=vecsum(apply(d->[0, 2, 2, 2, 2, 2, 1, 2, 0, 1][d+1], digits(n))); \\ _Andrew Howroyd_, Oct 26 2017
%Y A027386 Cf. A027387, A027388, A027389, A055642, A100910, A102683, A268643.
%K A027386 nonn,base
%O A027386 0,2
%A A027386 _N. J. A. Sloane_
%E A027386 a(6) corrected and a(27)-a(80) from _Andrew Howroyd_, Oct 26 2017