OFFSET
1,2
COMMENTS
a(1) = 1; for n>1, a(n) = smallest integer > a(n-1) such that a(n)*a(i)+1 is a prime power for all 1 <= i <= n-1.
EXAMPLE
After a(1)=1, a(2)=2, a(3)=3, we want m, the smallest number > 3 such that m+1, 2m+1 and 3m+1 are all prime powers: this is m = 4 = a(4).
PROG
(Sage)
seq = [1]
prev_element = 1
max_n = 8
for n in range(2, max_n+1):
next_element = prev_element + 1
while True:
all_match = True
for element in seq:
x = element * next_element + 1
if not x.is_prime_power():
all_match = False
break
if all_match:
seq.append( next_element )
break
next_element += 1
prev_element = next_element
print(seq)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert C. Lyons, Jul 02 2016
STATUS
approved