The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A360790 Squared length of diagonal of right trapezoid with three consecutive prime length sides. 1
8, 13, 41, 53, 137, 173, 305, 397, 533, 877, 977, 1373, 1697, 1885, 2245, 2813, 3517, 3737, 4493, 5077, 5345, 6277, 6953, 7937, 9413, 10217, 10613, 11465, 12077, 12785, 16165, 17165, 18869, 19325, 22237, 22837, 24665, 26605, 27925, 29933, 32141, 32765, 36497, 37253, 38953, 39745 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.
LINKS
FORMULA
a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2.
a(n) = A001248(n) + A076821(n+1). - Michel Marcus, Feb 23 2023
EXAMPLE
p(2)=3
_ _ _ _
a(1): | \ d^2=2^2+(5-3)^2=8
p(1)=2 |_ _ _ _ _\
p(3)=5
p(3)=5
_ _ _ _ _ _
a(2): | \ d^2=3^2 + (7-5)^2 = 9+4 = 13
p(2)=3 | \
|_ _ _ _ _ _ _\
p(4)=7
a(3)= 5^2+(11-7)^2 = 25+16 = 41
a(7)= 17^2+(23-19)^2=305 = 5*61
MATHEMATICA
Map[(#[[1]]^2 + (#[[3]] - #[[2]])^2) &, Partition[Prime[Range[50]], 3, 1]] (* Amiram Eldar, Feb 24 2023 *)
PROG
(MATLAB) %shorter 1 line version
arrayfun(@(p) p^2+(nextprime(nextprime(p+1)+1)-nextprime(p+1))^2, [primes(10^6)])
(PARI) a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2; \\ Michel Marcus, Feb 23 2023
CROSSREFS
Sequence in context: A258768 A048851 A039298 * A218627 A279711 A043121
KEYWORD
nonn
AUTHOR
Aaron T Cowan, Feb 20 2023
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 June 5 11:51 EDT 2024. Contains 373105 sequences. (Running on oeis4.)