OFFSET
0,3
COMMENTS
The sequence of n such that n is prime and (2*n+1) is prime is the sequence of Sophie Germain primes A005384 and the subsequence of those for which in addition (3*n+2) is prime is A067256. - Jonathan Vos Post, Dec 15 2004
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), with a(0)=-1, a(1)=0, a(2)=15, a(3)=80. - Harvey P. Dale, Aug 23 2012
G.f.: (-1 +4*x +9*x^2 +24*x^3)/(1-x)^4. - R. J. Mathar, Feb 06 2017
E.g.f.: (-1 + x + 7*x^2 + 6*x^3)*exp(x). - G. C. Greubel, Mar 05 2020
From Amiram Eldar, Jan 03 2021: (Start)
Sum_{n>=2} 1/a(n) = (7 - sqrt(3)*Pi - 16*log(2) + 9*log(3))/4.
Sum_{n>=2} (-1)^n/a(n) = Pi - 7/4 - sqrt(3)*Pi/2 + 2*log(2). (End)
MAPLE
MATHEMATICA
Table[(n-1)*(2*n-1)*(3*n-1), {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Apr 28 2010 *)
LinearRecurrence[{4, -6, 4, -1}, {-1, 0, 15, 80}, 40] (* Harvey P. Dale, Aug 23 2012 *)
PROG
(Magma) [(n-1)*(2*n-1)*(3*n-1): n in [0..40]]; // Vincenzo Librandi, May 24 2011
(PARI) vector(41, n, my(m=n-1); (m-1)*(2*m-1)*(3*m-1) ) \\ G. C. Greubel, Mar 05 2020
(Sage) [-1]+[n^3*rising_factorial((n-1)/n, 3) for n in (1..40)] # G. C. Greubel, Mar 05 2020
(GAP) List([0..40], n-> (n-1)*(2*n-1)*(3*n-1) ); # G. C. Greubel, Mar 05 2020
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved