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.

Showing 1-4 of 4 results.

A280916 Number of dashes in International Morse numeral representation of n.

Original entry on oeis.org

5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 14
Offset: 0

Views

Author

Indranil Ghosh, Jan 10 2017

Keywords

Comments

The Morse Code is written in current ITU standard.

Examples

			For n = 4, the Morse numeral representation of 4 is "....-" i.e., 1 dash. So, a(4) = 1.
For n = 26, the Morse numeral representation of 26 is "..--- -...." i.e, 4 dashes. So, a(26) = 4.
		

Crossrefs

Cf. A060109 (Morse code of n), A280913 (number of dots).
Cf. A006968, A278182 (for Roman resp. Maya representation of n).

Programs

  • Mathematica
    Array[Total@ Map[Abs[# - 5] &, IntegerDigits[#]] &, 101, 0] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    apply( {A280916(n)=if(n>9, self()(n\10)+self()(n%10), abs(n-5))}, [0..88]) \\ M. F. Hasler, Jun 22 2020
  • Python
    M={"1":".----","2":"..---","3":"...--","4":"....-","5":".....","6":"-....","7":"--...","8":"---..","9":"----.","0":"-----"}
    def A280916(n):
        z="".join(M[i] for i in str(n))
        return z.count("-")
    print([A280916(n) for n in range(100)])
    

Formula

a(n) = A316863(A060109(n)) = floor(1+n/10)*5 - A280913(n) = a(floor(n/10)) + a(n%10) if n > 9 or |5 - n| otherwise, where % is the modulo (remainder) operator. - M. F. Hasler, Jun 22 2020

A281015 Numbers with a prime number of dots in their International Morse numeral representation.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 47, 49, 50, 52, 58, 61, 63, 67, 69, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 92, 94, 96, 98, 99, 101, 102, 104, 106, 108, 109, 110, 111, 113, 115, 117, 119, 120, 122, 124, 126
Offset: 1

Views

Author

Indranil Ghosh, Jan 13 2017

Keywords

Comments

The Morse code is written in current ITU standard.
Indices of primes in A280913. - M. F. Hasler, Jun 22 2020

Examples

			27 is in the sequence because 27 in its Morse numeral representation is written as '..--- --...' which has 5 dots and 5 is prime.
		

Crossrefs

Cf. A060109 (Morse code for n), A280913 (number of dots in Morse code for n).
Cf. A281017 (same for dashes), A281018 (intersection of the two).

Programs

  • PARI
    select( {is_A281015(n)=isprime(A280913(n))}, [0..150]) \\ M. F. Hasler, Jun 22 2020
  • Python
    # uses[A280913]
    from sympy import isprime
    i=0
    j=1
    while j<=100:
        if isprime(A280913(i)):
            print(str(j)+" "+str(i))
            j+=1
        i+=1
    

A281018 Numbers with a prime number of dots and a prime number of dashes in their International Morse numeral representation.

Original entry on oeis.org

2, 3, 7, 8, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 47, 49, 50, 52, 58, 61, 63, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 92, 94, 96, 98, 101, 109, 110, 190, 200, 355, 445, 454, 456, 465, 535, 544, 546, 553, 557, 564, 566, 575, 645
Offset: 1

Views

Author

Indranil Ghosh, Jan 13 2017

Keywords

Comments

This uses the current ITU standard Morse code.
This sequence is the intersection of A281015 and A281017.

Examples

			27 is in the sequence because it is both in A281015 and A281017.
		

Crossrefs

Cf. A060109 (Morse code for n).

Programs

A321332 Duration of Morse code representation of n.

Original entry on oeis.org

19, 17, 15, 13, 11, 9, 11, 13, 15, 17, 39, 37, 35, 33, 31, 29, 31, 33, 35, 37, 37, 35, 33, 31, 29, 27, 29, 31, 33, 35, 35, 33, 31, 29, 27, 25, 27, 29, 31, 33, 33, 31, 29, 27, 25, 23, 25, 27, 29, 31, 31, 29, 27, 25, 23, 21, 23, 25, 27, 29, 33, 31, 29, 27, 25, 23, 25, 27, 29, 31, 35, 33, 31, 29, 27, 25, 27
Offset: 0

Views

Author

Wolfdieter Lang, Dec 03 2018

Keywords

Comments

In the Morse Code (ITU) the time unit is the duration of a dot. A dash has duration of 3 dots. The space (s) between dots (d) and dashes (D) within a Morse code of a letter (here digit of a number) has duration of 1 dot. The separation (S) between two letter codes has duration of 3 dots. (The duration between two words (numbers) is 7 dots.)
Only odd numbers >= 9 appear.
There are duration twins for pairs (n-1, n) with n ending with digits 10, 20, 30, 40 or 50, except for n = 10. The digits 1 and 9, 2 and 8, and 3 and 7 are pairs with identical duration (of 17, 15, and 13, respectively).

Examples

			n = 10:  dsDsDsDsDSDsDsDsDsD, with a(10) = 3*(2-1) + 4*2 + ((1*1 + 3*4) + (1*0 + 3*5)) = 3 + 8 + (1*1 + 3*9)  = 39.
		

Crossrefs

Programs

  • Mathematica
    nd[n_] := 15 - 2 * If[n<5, n, 10-n]; a[n_] := Module[{d = IntegerDigits[n]}, 7 * Length[d] - 3 + Total[nd/@ d]]; Array[a, 100, 0] (* Amiram Eldar, Dec 04 2018 *)

Formula

a(n) = S(n) + s(n) + dD(n), where S(n) = 3*(nrdigits(n) - 1), with nrdigits(n) the number of digits of n, s(n) = 4*nrdigits(n), and dD(n) = Sum_{j=1.. nrdigits(n)} 1*nrd(d_j) + 3*nrD(dj) = 1*A280913(n) + 3*A280916(n), with nrd(dj) the number of dots of the code of the j-th digits of n, and nrD(dj) the number of dashes of the code of the j-th digits of n.
Showing 1-4 of 4 results.