Generating Arithmetic and Geometric Sequences in Java: A Mathematical Approach

Session

Computer Science and Communication Engineering

Description

This paper demonstrates how mathematical sequences, particularly arithmetic and geometric sequences, can be implemented in programming using Java arrays. In mathematics, sequences are ordered sets of numbers following a specific pattern, whereas in computer science, these sequences can be implemented as arrays. The main goal is to show the similarities between mathematics and programming. A simple Java program generates arithmetic and geometric arrays automatically, allowing students to visualize patterns and understand how to apply mathematical principles in code. This paper explains the process of writing the Java program and provides examples of output arrays. This approach solidifies the understanding of sequences while providing concrete programming experience. By combining theory and practical implementation, students can see the direct application of mathematics in computer science. The method used is simple and suitable for educational purposes or further exploration in computational contexts.

Keywords:

Arithmetic sequence, Geometric sequence, Mathematical sequences, Arrays, Java, Programming

Proceedings Editor

Edmond Hajrizi

ISBN

978-9951-982-41-2

Location

UBT Kampus, Lipjan

Start Date

25-10-2025 9:00 AM

End Date

26-10-2025 6:00 PM

DOI

10.33107/ubt-ic.2025.72

This document is currently not available here.

Share

COinS
 
Oct 25th, 9:00 AM Oct 26th, 6:00 PM

Generating Arithmetic and Geometric Sequences in Java: A Mathematical Approach

UBT Kampus, Lipjan

This paper demonstrates how mathematical sequences, particularly arithmetic and geometric sequences, can be implemented in programming using Java arrays. In mathematics, sequences are ordered sets of numbers following a specific pattern, whereas in computer science, these sequences can be implemented as arrays. The main goal is to show the similarities between mathematics and programming. A simple Java program generates arithmetic and geometric arrays automatically, allowing students to visualize patterns and understand how to apply mathematical principles in code. This paper explains the process of writing the Java program and provides examples of output arrays. This approach solidifies the understanding of sequences while providing concrete programming experience. By combining theory and practical implementation, students can see the direct application of mathematics in computer science. The method used is simple and suitable for educational purposes or further exploration in computational contexts.