|
|
A354368
|
|
Successive pairs of terms (a, b) such that (a + b) is a square and at least one of a and b is a prime number. This is the lexicographically earliest infinite sequence of distinct terms > 0 with this property.
|
|
4
|
|
|
2, 7, 3, 13, 5, 11, 17, 19, 23, 41, 29, 71, 31, 113, 37, 107, 43, 101, 47, 53, 59, 137, 61, 83, 67, 257, 73, 251, 79, 821, 89, 167, 97, 227, 103, 797, 109, 467, 127, 197, 131, 193, 139, 761, 149, 751, 151, 173, 157, 419, 163, 1601, 179, 397, 181, 719, 191, 293, 199, 701, 211, 1553, 223, 353, 229, 347
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This sequence is a permutation of the prime numbers.
|
|
LINKS
|
|
|
EXAMPLE
|
The earliest pairs with their square sum: (2, 7) = 9, (3, 13) = 16, (5, 11) = 16, (17, 19) = 36, (23, 41) = 64, (29, 71) = 100, (31, 113) = 144, (37, 107) = 144, etc.
|
|
MATHEMATICA
|
nn = 120; c[_] = 0; a[1] = 2; c[2] = 1; u = 3; Do[k = u; If[EvenQ@ i, While[Nand[c[k] == 0, IntegerQ@ Sqrt[# + k]] &[a[i - 1]], k = NextPrime[k]]]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u = NextPrime[u]]], {i, 2, nn}], i]; Array[a, nn] (* Michael De Vlieger, May 24 2022 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|