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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064532 Total number of holes in decimal expansion of the number n, assuming 4 has no hole. 5
1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

COMMENTS

Assumes that 4 is represented without a hole.

LINKS

Indranil Ghosh, Table of n, a(n) for n = 0..50000

FORMULA

a(10i+j) = a(i) + a(j), etc.

EXAMPLE

8 has two holes so a(8) = 2.

MATHEMATICA

a[n_ /; 0 <= n <= 9] := a[n] = {1, 0, 0, 0, 0, 0, 1, 0, 2, 1}[[n + 1]]; a[n_] := Total[a[#] + 1 &  /@ (id = IntegerDigits[n])] - Length[id];  Table[a[n], {n, 0, 104}] (* Jean-Fran├žois Alcover, Nov 22 2013 *)

Table[DigitCount[x].{0, 0, 0, 0, 0, 1, 0, 2, 1, 1}, {x, 0, 104}] (* Michael De Vlieger, Feb 02 2017, after Zak Seidov at A064692 *)

PROG

(Python)

def A064532(n):

....x=str(n)

....return x.count("0")+x.count("6")+x.count("8")*2+x.count("9") # Indranil Ghosh, Feb 02 2017

CROSSREFS

Cf. A064529, A064530. Equals A064531 - 1.

Sequence in context: A106822 A203905 A309142 * A321922 A287146 A025926

Adjacent sequences:  A064529 A064530 A064531 * A064533 A064534 A064535

KEYWORD

nonn,easy,base

AUTHOR

N. J. A. Sloane, Oct 07 2001

EXTENSIONS

More terms from Matthew Conroy, Oct 09 2001

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 19 08:44 EST 2019. Contains 329318 sequences. (Running on oeis4.)