OFFSET
1,3
COMMENTS
Asymptotically p(T(n)) ~ (n^2 + n)*(log n) and T(p(n)) ~ (1/2)(n log n)^2, hence asymptotically a(n) ~ (1/2)(n log n)^2 - (n^2 + n)*(log n) = O((n^2)(log n)^2). a(4) = -1 should be the only negative value.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(1) = T(p(1)) - p(T(1)) = T(2) - p(1) = 3 - 2 = 1.
a(2) = T(p(2)) - p(T(2)) = T(2) - p(1) = 6 - 5 = 1.
a(3) = T(p(3)) - p(T(3)) = T(2) - p(1) = 15 - 13 = 1.
a(4) = T(p(4)) - p(T(4)) = T(2) - p(1) = 28 - 29 = -1.
a(5) = T(p(5)) - p(T(5)) = T(2) - p(1) = 66 - 47 = 19.
MAPLE
MATHEMATICA
With[{B=Binomial, P=Prime}, Table[B[P[n]+1, 2] -P[B[n+1, 2]], {n, 60}]] (* G. C. Greubel, Aug 06 2019 *)
PROG
(PARI) vector(60, n, p=prime; b=binomial; b(p(n)+1, 2) - p(b(n+1, 2)) ) \\ G. C. Greubel, Aug 06 2019
(Magma) P:=NthPrime; B:=Binomial; [B(P(n)+1, 2) - P(B(n+1, 2)): n in [1..60]]; // G. C. Greubel, Aug 06 2019
(Sage) p=nth_prime; b=binomial; [b(p(n)+1, 2) - p(b(n+1, 2)) for n in (1..60)] # G. C. Greubel, Aug 06 2019
CROSSREFS
KEYWORD
easy,sign,less
AUTHOR
Jonathan Vos Post, Oct 28 2006
EXTENSIONS
More terms from R. J. Mathar, Jan 13 2007
STATUS
approved