login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
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.
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
Cf. A354367, A354369, A354370 (same idea).
Sequence in context: A256448 A056756 A120861 * A236542 A279357 A099130
KEYWORD
nonn
AUTHOR
Eric Angelini and Carole Dubois, May 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)