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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060109 Numbers in Morse code, with 1 for a dot, 2 for a dash and 0 between digits/letters. 3
22222, 12222, 11222, 11122, 11112, 11111, 21111, 22111, 22211, 22221, 12222022222, 12222012222, 12222011222, 12222011122, 12222011112, 12222011111, 12222021111, 12222022111, 12222022211, 12222022221 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Wikipedia, Morse_code

EXAMPLE

a(10)=12222022222 since 1 is .---- and 0 is -----

PROG

(Haskell)

import Data.List (inits, tails)

a060109 n = if n == 0 then 22222 else read (conv n) :: Integer where

   conv 0 = []

   conv x = conv x' ++ mCode !! d where (x', d) = divMod x 10

   mCode = map ('0' :) (mc ++ (reverse $ init $ tail $ map reverse mc))

   mc = zipWith (++) (inits "111111") (tails "22222")

-- Reinhard Zumkeller, Feb 20 2015

CROSSREFS

Cf. A008777, A059852, A060110.

Sequence in context: A225998 A209396 A210295 * A217875 A253737 A185608

Adjacent sequences:  A060106 A060107 A060108 * A060110 A060111 A060112

KEYWORD

base,nonn

AUTHOR

Henry Bottomley, Feb 28 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 February 20 20:55 EST 2019. Contains 320345 sequences. (Running on oeis4.)