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-10 of 10 results.

A332155 Numbers with palindromic Morse code A060109.

Original entry on oeis.org

0, 5, 19, 28, 37, 46, 55, 64, 73, 82, 91, 109, 159, 208, 258, 307, 357, 406, 456, 505, 555, 604, 654, 703, 753, 802, 852, 901, 951, 1009, 1199, 1289, 1379, 1469, 1559, 1649, 1739, 1829, 1919, 2008, 2198, 2288, 2378, 2468, 2558, 2648, 2738, 2828, 2918, 3007
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2020

Keywords

Comments

Also, numbers whose decimal digits (d[0], ..., d[n]) are such that for all k = 0..n, d[k] + d[n-k] = 0 (mod 10). In particular, if the number of digits n+1 is odd, the middle digit must be either 5 or 0.
The variant A299539 is obtained by excluding terms with a digit 0, i.e., removing all terms that are in A011540, or taking intersection with zeroless numbers A052382. - M. F. Hasler, Nov 25 2020

Examples

			The Morse code for digits is "-----" for 0, ".----" for 1, "..---" for 2, ..., "....." for 5, "-...." for 6, ..., "----." for 9. (In A060109 a dot is coded with a digit 1 and a dash with a digit 2.)
We see that 0 and 5 are the only digits with palindromic Morse code, this yields a(1) and a(2).
Two digit numbers must be of the form 10*a + (10-a), with a = 1, ..., 9, in order to have palindromic Morse code. This yields the 9 terms a(3), ..., a(11).
Three-digit terms must have 0 or 5 as middle digit and yield a two-digit term when that middle digit is deleted: this yields the next 18 terms a(12 .. 29).
		

Crossrefs

Cf. A060109 (Morse code of n), A002113 (palindromes), A004086 (reverse n), A299539 (variant without the terms with digit 0).

Programs

  • Mathematica
    With[{a = Association@ Array[# -> If[# < 6, PadRight[ConstantArray[1, #], 5, 2], PadRight[ConstantArray[2, # - 5], 5, 1]] &, 10, 0]}, Select[Range[0, 3007], PalindromeQ[Flatten@ Riffle[Map[Lookup[a, #] &, IntegerDigits[#]], 0]] &]] (* Michael De Vlieger, Nov 02 2020 *)
  • PARI
    select( is(n)=(Vecrev(n=digits(n))+n)%10==0, [0..3333])

Formula

Sequence is { N | A060109(N) is in A002113 }.

A059852 Consider the English alphabet in Morse code (the International Morse radio telegraph code). Map a 'dit' to the digit one and a 'dah' to the digit 2, then express that ternary number in decimal.

Original entry on oeis.org

5, 67, 70, 22, 1, 43, 25, 40, 4, 53, 23, 49, 8, 7, 26, 52, 77, 16, 13, 2, 14, 41, 17, 68, 71, 76
Offset: 1

Views

Author

Robert G. Wilson v, Feb 27 2001

Keywords

Comments

Written in base 3, the terms read (12, 2111, 2121, 211, 1, 1121, 221, 1111, 11, 1222, 212, 1211, 22, 21, 222, 1221, 2212, 121, 111, 2, 112, 1112, 122, 2112, 2122, 2211). This contains all words over {1,2} with 1 to 4 letters except for 1122, 1212, 2221 and 2222, which correspond to the codes for Ü, Ä, Ö and CH. - M. F. Hasler, Jun 22 2020

Examples

			The sixth letter, F, is ".._." in Morse. This becomes 1121 in ternary and 43 in decimal, so a(6) = 43.
		

References

  • "Learning the Radiotelegraph Code," Seventh Edition, published by American Radio Relay League, West Hartford 7, Connecticut, 1955.
  • "Morse Code Course," Jeppesen and Company, Denver, Colorado, 1962.
  • "International Morse Code," prepared by Lt. Commander F.R.L. Tuthill, USNR and Lt. (J.G.) E.L. Battey, USNR, published by Insuline Corporation of America, Long Island City, NY.

Crossrefs

Cf. A060110, the same for numbers, and A060109, written in base 3.
Cf. A008777 (number of base 3 digits = dots and dashes in the n-th letter), A281015, A281017, A281018.
Cf. A105386, A105387 (ambiguous variants using digits 0 and 1).

Programs

  • PARI
    A059852=digits(3008707498660932665486381130661318784490079420090,81) \\ or vecextract(apply(A032924,[1..28]), i) with i=numtoperm(26, 58849338891424664724588744) or i=vecsort(Vec("ETIANMSURWDKGOHVFuLaPJBXCYZQ"),,1)[1..26]. - M. F. Hasler, Jun 22 2020

Extensions

Edited, links and crossrefs added by M. F. Hasler, Jun 22 2020

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

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
    

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

A060110 Numbers in Morse code, with 1 for a dot, 2 for a dash and 0 between digits/letters and then converted from base 3 to base 10.

Original entry on oeis.org

242, 161, 134, 125, 122, 121, 202, 229, 238, 241, 117611, 117530, 117503, 117494, 117491, 117490, 117571, 117598, 117607, 117610, 97928, 97847, 97820, 97811, 97808, 97807, 97888, 97915, 97924, 97927, 91367, 91286, 91259, 91250, 91247
Offset: 0

Views

Author

Henry Bottomley, Feb 28 2001

Keywords

Comments

The mentioned base 3 representation of the terms (digits 0, 1 and 2) is given in A060109. - M. F. Hasler, Jun 22 2020

Examples

			a(10) = 12222022222[base 3] = 117611[base 10] since 1 is ".----" and 0 is "-----".
		

Crossrefs

Programs

  • Haskell
    a060110 = t . a060109 where
       t 0 = 0
       t n = if n == 0 then 0 else 3 * t n' + d  where (n', d) = divMod n 10
    -- Reinhard Zumkeller, Feb 20 2015
    
  • PARI
    apply( {A060110(n)=if(n>9, self()(n\10)*3^6)+fromdigits([1+(abs(k-n%10)>2)|k<-[3..7]],3)}, [0..39]) \\ M. F. Hasler, Jun 23 2020

Formula

A007089(a(n)) = A060109(n). - Reinhard Zumkeller, Feb 20 2015

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.

A299539 Numbers n = d_1 d_2 ... d_k (in base 10) such that d_i + d_{k+1-i} = 10 for i = 1..k.

Original entry on oeis.org

5, 19, 28, 37, 46, 55, 64, 73, 82, 91, 159, 258, 357, 456, 555, 654, 753, 852, 951, 1199, 1289, 1379, 1469, 1559, 1649, 1739, 1829, 1919, 2198, 2288, 2378, 2468, 2558, 2648, 2738, 2828, 2918, 3197, 3287, 3377, 3467, 3557, 3647, 3737, 3827, 3917, 4196, 4286
Offset: 1

Views

Author

Rémy Sigrist, Mar 05 2018

Keywords

Comments

These numbers are also called upside-down numbers.
All terms belong to A052382 (zeroless numbers).
The central digit of the terms with an odd number of digits is always 5.
This sequence can be partitioned into three sets: { 5 }, A083678 and A093472.
This sequence has similarities with A284811: here d_i + d_{k+1-i} = 10, there d_i + d_{k+1-i} = 9.
These numbers have a palindromic Morse code representation (see A060109). To get all numbers with this property one has to include 0 and terms with corresponding "interior" digits 5 replaced by digits 0, e.g., 5 -> 0, 159 -> 109, 555 -> 505, 1559 -> 1009, 15559 -> {10009, 10509, 15059}. - M. F. Hasler, Nov 02 2020

Examples

			1 + 9 = 10 and 5 + 5 = 10 and 9 + 1 = 10, hence 159 belongs to this sequence.
4 + 2 = 6, hence 42 does not belong to this sequence.
		

Crossrefs

Cf. also A060109 (Morse code of numbers).

Programs

  • Maple
    Res:= NULL;
    for d from 1 to 3 do
      for x from 0 to 9^(d-1)-1 do
        L:= convert(9^(d-1)+x,base,9)[1..d-1];
        Res:= Res, 5*10^(d-1)+add((1+L[-i])*10^(2*d-1-i)+(9-L[-i])*10^(i-1),i=1..d-1)
      od;
      for x from 0 to 9^d-1 do
        L:= convert(9^d+x,base,9)[1..d];
        Res:= Res, add((1+L[-i])*10^(2*d-i)+(9-L[-i])*10^(i-1),i=1..d)
      od
    od:
    Res; # Robert Israel, Mar 06 2018
  • Mathematica
    Select[Range[4300], AllTrue[#1[[1 ;; #2]] + Reverse@ #1[[-#2 ;; -1]], # == 10 &] & @@ {#, Ceiling[Length[#]/2]} &@ IntegerDigits[#] &] (* Michael De Vlieger, Nov 04 2020 *)
  • PARI
    is(n) = my (d=digits(n)); Set(d+Vecrev(d))==Set(10)
Showing 1-10 of 10 results.