# Finding the nth term in a repeating number sequence

I'm trying to figure out how to solve these types of repeating number sequence problems. Here is one I made up:

Consider the following repeating number sequence: {4, 8, 15, 16, 23, 42, 4, 8, 15, 16, 23, 42, 4, 8, 15, 16, 23, 42,…} in which the first 6 numbers keep repeating. What is the 108th term of the sequence?

I was told that when a group of k numbers repeats itself, to find the *n*th number, divide n by k and take the remainder r. The *r*th term and the *n*th term are always the same. 108 / 6 = 18, r = 0 So the 108th term is equal to the 0th term? Undefined?

I'm confused at how this works.

Thanks!

-

3
Think of your sequence as doubly infinite, $\dots,4,8,15,\dots$, and the zeroth term is the term just before the first term. PS: I just noticed what sequence you are using. Are you sure you're confused, not lost? – Gerry Myerson Jul 22 '11 at 1:52
Yes, hahaha :) Thanks though, I understand now. – stoicfury Jul 22 '11 at 1:57

## 3 Answers

You are looking for modular arithmetic. The procedure you described of dividing and taking the remainder is encapsulated in modular arithmetic.

-

HINT:

In such cases, look at more manageable sample problems. So what would the 5th, 10th, 12th, 17th element (etc.) be? All these can be found by hand, and you can see how the remainder matters.

-

HINT: write the numbers in six columns, and work out how the row number and column number relate to the position in the sequence.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.955629825592041, "perplexity_flag": "head"}