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.
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
Offset: 1
Keywords
Examples
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.
Links
- Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..10^4, showing records in red, local minima in blue, and fixed points in gold.
Programs
-
Mathematica
Clear[c, a]; nn = 66; 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}]; Array[a, nn] (* _Michael De Vlieger, May 24 2022 *)
Comments