Largest Geometric Series - MATLAB Cody - MATLAB Central

Problem 2672. Largest Geometric Series

Difficulty:Rate
Extension of Ned Gulley's wonderful Problem 317.
In a geometric series, ratio of adjacent elements is always a constant value. For example, [2 6 18 54] is a geometric series with a constant adjacent-element ratio of 3.
A vector will be given. Find the largest geometric series that can be formed from the vector.
Example:
input = [2 4 8 16 1000 2000];
output = [2 4 8 16];
Update - Test case added on 21/8/22

Solution Stats

11.65% Correct | 88.35% Incorrect
Last Solution submitted on May 06, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Number Manipulation II Image
Number Manipulation II
  • 15 Problems
  • 47 Finishers

Problem Recent Solvers105

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page