Fiddling around with my calculator today I found a notable trend in addition of sequential squares:
4+1=5…prime
9+4=13…prime
16+9=25…5^2
25+16=41…prime
36+25=61…prime
49+36=85…517
64+49=113…prime
81+64=145…529
100+81=181…prime
121+100=221…1317
144+121=265…553
169+144=313…prime
196+169=365…573
225+196=421…prime
256+225=481…1337
289+256=545…5109
324+289=613…prime
361+324=685…5137
400+361=761…prime
441+400=841…29^2
Half are prime, and the majority of composites are divisible by 5.
What you are noticing is that (2n^2 + 2n + 1) mod 5 = 0 has the solutions n = 5m+1 and n = 5m +3, where m is a whole number.
.
Or in other words 2/5 of the time the answer is going to be divisible by 5
And while we’re at it, it has no solutions mod 2 or 3. If something’s not a multiple of 2 or 3, then the most common way for it to fail to be a prime is going to be for it to be a multiple of 5.
The trend that “half are prime” doesn’t persist as you take more such numbers. I ran a quick program to test the primality of the first million such numbers (i.e., up to 1000000[sup]2[/sup] + 1000001[sup]2[/sup]), and found that a little over 10% of them (104,894 of them, to be exact) are prime.
No solutions mod 7, 11, 19, or 23 either; but 2/13 of the time, the answer will be divisible by 13; 2/17 of the time, it’ll be divisible by 17; 2/29 of the time, it’ll be divisible by 29.