login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027386 Write digits for n, count endpoints (version 1). 3
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, 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, 1, 2, 2, 4, 4, 4, 4, 4, 3, 4, 2, 3, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Number of endpoints: 0,8 - zero, 6,9 - one, 1,2,3,4,5,7 - two. - Michael B. Porter, Oct 28 2017

LINKS

Table of n, a(n) for n=0..80.

FORMULA

a(10*n + d) = a(n) + e where e is the number of endpoints of single digit d. - David A. Corneth, Oct 28 2017

EXAMPLE

The digit 1 has two endpoints, and the digit 8 has no endpoints, so a(18) = 2. - Michael B. Porter, Oct 28 2017

MATHEMATICA

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 *)

PROG

(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

CROSSREFS

Cf. A027387, A027388, A027389, A055642, A100910, A102683, A268643.

Sequence in context: A159700 A083534 A174664 * A102300 A202146 A087010

Adjacent sequences:  A027383 A027384 A027385 * A027387 A027388 A027389

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane.

EXTENSIONS

a(6) corrected and a(27)-a(80) from Andrew Howroyd, Oct 26 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. . Note: Contributor's License Agreement was changed Aug 14 2018.

Last modified August 15 01:13 EDT 2018. Contains 313756 sequences. (Running on oeis4.)