This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A360790 #76 Mar 11 2023 06:22:13 %S A360790 8,13,41,53,137,173,305,397,533,877,977,1373,1697,1885,2245,2813,3517, %T A360790 3737,4493,5077,5345,6277,6953,7937,9413,10217,10613,11465,12077, %U A360790 12785,16165,17165,18869,19325,22237,22837,24665,26605,27925,29933,32141,32765,36497,37253,38953,39745 %N A360790 Squared length of diagonal of right trapezoid with three consecutive prime length sides. %C A360790 The value d is the square of the length of the diagonal of a trapezoid with a height and bases that are consecutive primes, respectively. The diagonal length is calculated using the Pythagorean theorem, but this distance is squared so that the value is an integer. %H A360790 Aaron T Cowan, <a href="/A360790/b360790.txt">Table of n, a(n) for n = 1..500</a> %F A360790 a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2. %F A360790 a(n) = A001248(n) + A076821(n+1). - _Michel Marcus_, Feb 23 2023 %e A360790 p(2)=3 %e A360790 _ _ _ _ %e A360790 a(1): | \ d^2=2^2+(5-3)^2=8 %e A360790 p(1)=2 |_ _ _ _ _\ %e A360790 p(3)=5 %e A360790 p(3)=5 %e A360790 _ _ _ _ _ _ %e A360790 a(2): | \ d^2=3^2 + (7-5)^2 = 9+4 = 13 %e A360790 p(2)=3 | \ %e A360790 |_ _ _ _ _ _ _\ %e A360790 p(4)=7 %e A360790 a(3)= 5^2+(11-7)^2 = 25+16 = 41 %e A360790 a(7)= 17^2+(23-19)^2=305 = 5*61 %t A360790 Map[(#[[1]]^2 + (#[[3]] - #[[2]])^2) &, Partition[Prime[Range[50]], 3, 1]] (* _Amiram Eldar_, Feb 24 2023 *) %o A360790 (MATLAB) %shorter 1 line version %o A360790 arrayfun(@(p) p^2+(nextprime(nextprime(p+1)+1)-nextprime(p+1))^2,[primes(10^6)]) %o A360790 (PARI) a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2; \\ _Michel Marcus_, Feb 23 2023 %Y A360790 Cf. A001248, A076821. %Y A360790 Cf. A131019, A106171. %K A360790 nonn %O A360790 1,1 %A A360790 _Aaron T Cowan_, Feb 20 2023