# 1, 4, 8, 9, 16, 25, 27, 32

Find the largest positive integer $n<100,$ such that there exists an arithmetic progression of positive integers $a_1,a_2,...,a_n$ with the following properties.

1) All numbers $a_2,a_3,...,a_{n-1}$ are powers of positive integers, that is numbers of the form $j^k,$ where $j\geq 1$ and $k\geq 2$ are integers.

2) The numbers $a_1$ and $a_{n}$ are not powers of positive integers.

×