close
login
A396066
a(1) = 1; a(n) is the smallest positive integer not already in the sequence so that a(n)^4+a(n-1)^4 is prime.
0
1, 2, 3, 4, 5, 8, 9, 10, 7, 6, 11, 16, 17, 14, 13, 12, 19, 24, 41, 18, 23, 26, 25, 36, 37, 20, 29, 22, 15, 62, 27, 28, 33, 34, 35, 52, 21, 38, 39, 32, 31, 42, 53, 40, 43, 44, 47, 50, 61, 58, 45, 76, 49, 48, 55, 46, 77, 54, 65, 56, 59, 66, 71, 30, 67, 64, 63
OFFSET
1,2
COMMENTS
A third-power counterpart (sum of cubes) does not exist as a^3 + b^3 = (a + b)*(a^2 - ab + b^2). For the product to be prime, either factor must be 1, but the only nonnegative solution where a < b is a = 0 and b = 1, which gives the nonprime 1. This also applies to any higher odd powers.
The list alternates between odd and even, as there would be an even sum otherwise.
It is conjectured that this list is a permutation of the natural numbers.
LINKS
EXAMPLE
a(2) = 2 as 1^4 + 2^4 = 17 which is prime.
a(6) = 8 as 5^4 + 6^4 = 1921 = 17 * 113, 5^4 + 7^4 is even, and 5^4 + 8^4 = 4721 which is prime.
a(9) = 7 as 10^4 + 7^4 = 12401 which is prime, and 7 is not already on the list.
MATHEMATICA
a[n_] := a[n] = Module[{k = 2}, While[MemberQ[Array[a, n-1], k] || ! PrimeQ[k^4 + a[n-1]^4], k++]; k]; a[1] = 1; Array[a, 70] (* Amiram Eldar, May 16 2026 *)
PROG
(Julia)
function a(n)
used = []
num = 1
for _ in 2:n
push!(used, num)
prime = false
next = num % 2 - 1
while !prime
next += 2
if next in used
continue
end
check = num^4 + next^4
for i in 3:2:floor(Int, sqrt(check))
prime = true
if check % i == 0
prime = false
break
end
end
end
num = next
end
return num
end
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Hoang Nguyen, May 15 2026
STATUS
approved