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.

A280913 Number of dots in International Morse numeral representation of n.

Original entry on oeis.org

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

Views

Author

Indranil Ghosh, Jan 10 2017

Keywords

Comments

The Morse Code is written in current ITU standard.
For the number of dashes see A280916.

Examples

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

Crossrefs

Cf. A060109 (Morse code for n), A280916 (number of dashes), A268643 (number of '1's in n).

Programs

  • Mathematica
    Table[Total[IntegerDigits[n]/.{6->4,7->3,8->2,9->1}],{n,0,120}] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    apply( {A280913(n)=if(n>9,self()(n\10)+self()(n%10), 5-abs(n-5))}, [0..88]) \\ M. F. Hasler, Jun 22 2020
  • Python
    M={"1":".----","2":"..---","3":"...--","4":"....-","5":".....","6":"-....","7":"--...","8":"---..","9":"----.","0":"-----"}
    def A280913(n):
        z="".join(M[i] for i in str(n))
        return z.count(".")
    print([A280913(n) for n in range(101)])
    

Formula

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

A281017 Numbers with a prime number of dashes in their International Morse numeral representation.

Original entry on oeis.org

0, 2, 3, 7, 8, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 35, 36, 38, 41, 43, 44, 46, 47, 49, 50, 52, 53, 57, 58, 61, 63, 64, 66, 67, 69, 70, 72, 74, 75, 76, 78, 81, 83, 85, 87, 89, 92, 94, 96, 98, 101, 103, 107, 109, 110, 112, 118, 121, 125, 129, 130, 134, 136, 143
Offset: 1

Views

Author

Indranil Ghosh, Jan 13 2017

Keywords

Comments

The Morse code is written in current ITU standard.
Indices of primes in A280916. - 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 dashes and 5 is prime.
		

Crossrefs

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

Programs

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

Formula

This A281017 = { n | A280916(n) is prime }. - M. F. Hasler, Jun 22 2020

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.