Paste
Copy
Cut
Options

¡Tu solución está lista!

Nuestra ayuda de expertos desglosó tu problema en una solución confiable y fácil de entender.

Mira la respuesta
  • Pregunta: La sucesión de Kuromi Wanmi (1905) es la siguiente sucesión finita: 1, 2, 3, 4, 9, 6, 1, 16... Los primeros 3 términos están predeterminados: el primer término es 1, el segundo es 2 y tercero es 3. Los siguientes términos se calculan como se explica a continuación. Si el término actual es múltiplo de 3, el termino siguiente es la parte entera del

    La sucesión de Kuromi Wanmi (1905) es la siguiente sucesión finita: 1, 2, 3, 4, 9, 6, 1, 16... Los
    primeros 3 términos están predeterminados: el primer término es 1, el segundo es 2 y tercero es 3. Los
    siguientes términos se calculan como se explica a continuación. Si el término actual es múltiplo de 3, el
    termino siguiente es la parte entera del cociente entre el cuadrado del término actual y el producto de
    los 2 términos anteriores al actual. Si el termino actual no es múltiplo de 3, el termino siguiente es la
    suma de los 3 términos más recientes. Por ejemplo, el cuarto termino seria la parte entera de (3^2)/(1*2) = 4 (ya que el tercer termino, 3, es múltiplo de 3). El quinto termino seria 4+3+2 = 9 (ya que el cuarto termino, 4, no es múltiplo de 3). El sexto termino seria la parte entera de (9^2)/(3*4) = 6 (ya que el quinto termino, 9, es múltiplo de 3). Y así sucesivamente...

    a. Diseñe un algoritmo y preséntelo en forma de diagrama de flujo, que reciba un numero entero y devuelva el número de la sucesión en esa posición. Por ejemplo, si el input es 2 el output debe ser 2, si el input es 8 el output debe ser 16. Presente pruebas de escritorio para inputs: 1, 2 y 9.

    The sequence of Kuromi Wanmi (1905) is the following finite sequence: 1, 2, 3, 4, 9, 6, 1, 16...
    The first 3 terms are default: the first term is 1, the second is 2, and the third is 3. The
    following terms are calculated as explained below. If the current term is a multiple of 3, the
    next term is the integer part of the quotient between the square of the current term and the product of
    the 2 terms prior to the current one. If the current term is not a multiple of 3, the next term is the
    sum of the 3 most recent terms. For example, the fourth term would be the integer part of (3^2)/(1*2) = 4 (since the third term, 3, is a multiple of 3). The fifth term would be 4+3+2 = 9 (since the fourth term, 4, is not a multiple of 3). The sixth term would be the integer part of (9^2)/(3*4) = 6 (since the fifth term, 9, is a multiple of 3). And so on...
    a. Design an algorithm and present it in the form of a flowchart, which takes an integer and returns the number of the sequence in that position. For example, if the input is 2 the output should be 2, if the input is 8 the output should be 16. Present desktop tests for inputs: 1, 2 and 9.

  • Chegg Logo
    Hay 3 pasos para resolver este problema.
    Solución
    Paso 1

    Algorithm for the Kuromi sequence program:

    1 Define the function printKuromiTerm(n) that takes an int...

    Mira la respuesta completa
    answer image blur
    Paso 2
    Desbloquea
    Paso 3
    Desbloquea
    Respuesta
    Desbloquea