OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
FORMULA
Find b^2 in Pythagorean formula c^2=a^2+b^2. Subtract product of successive prime pair at same a(n) beginning at 2*2.
EXAMPLE
a(3)=10. Product of 3rd prime pair 3*5=15 (after 2*2=4 and 2*3=6). b^2=25 (in c^2=a^2+b^2) where c^2=34 and a^2=9. Then 25-15=10.
MATHEMATICA
With[{P=Prime}, Table[If[n==0, 0, P[n+1]*(P[n+1]-P[n])], {n, 0, 60}]] (* G. C. Greubel, Feb 22 2024 *)
PROG
(Magma) [0] cat [NthPrime(n+1)*(NthPrime(n+1)-NthPrime(n)): n in [1..60]]; // G. C. Greubel, Feb 22 2024
(SageMath) p=nth_prime; [0]+[p(n+1)*(p(n+1)-p(n)) for n in range(1, 61)] # G. C. Greubel, Feb 22 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved