OFFSET
1,1
COMMENTS
Every term in this sequence is a multiple of 3. - Nathaniel Johnston, May 04 2011
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
FORMULA
From Carl R. White, Jul 27 2010: (Start)
a(n) = sum(p+1 .. 2p-1) = 3p(p-1)/2 where p is the n-th prime. (End)
EXAMPLE
2 (3) = 3 (jumps 3), 3 (4,5) = 9 (jumps 4 and 5), 5 (6,7,8,9) = 30 (jumps 6 through 9), 7 (8,... 13) = 63 (jumps 8 through 13), and so on.
MAPLE
A179545 := proc(n)local k: k:=ithprime(n+1): return 3*k*(k-1)/2: end:
seq(A179545(n), n=0..39); # Nathaniel Johnston, Apr 2011
MATHEMATICA
Table[3 Binomial[Prime[n], 2], {n, 1, 60}] (* Vincenzo Librandi, Feb 13 2015 *)
PROG
(PARI) a(n)=3*binomial(prime(n), 2) \\ Charles R Greathouse IV, May 19 2011
(PARI) apply(n->3*n*(n-1)/2, primes(1000)) \\ Charles R Greathouse IV, May 19 2011
(Magma) [3*Binomial(NthPrime(n), 2): n in [1..40]]; // Vincenzo Librandi, Feb 13 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Odimar Fabeny, Jul 19 2010
EXTENSIONS
More terms from Carl R. White and Odimar Fabeny, Jul 27 2010
STATUS
approved