# Bode's Law (Titius-Bode Law)

 N:

Output: `Press calculate`

Formula:`B(n) = 0.4 + 0.3 * 2^n`

## Introduction to Bode's Law

Bode's Law, also known as Titius-Bode Law, is an empirical rule that approximates the distances of the planets from the Sun. The law states that there is a simple arithmetic progression in the semi-major axes of the planets. The formula for Bode's Law is defined as B(n) = 0.4 + 0.3 * 2^n, where n represents the position of a planet in the sequence (Mercury = 0, Venus = 1, Earth = 2, etc.). The formula provides a rough estimate of the distance of a planet from the Sun in astronomical units (AU).

## Parameter usage:

• `n`= position of the planet in the sequence (0 to 7 for planets in the solar system)

## Output:

• `B(n)` = estimated distance of the planet from the Sun in astronomical units

## Data validation

The input must be an integer value between 0 and 7 representing the position of a planet in the solar system.

## Summary

Bode's Law provides a simple and intriguing rule for estimating the relative distances of planets from the Sun in our solar system.