OFFSET
1,1
COMMENTS
Generated by n: 1, 2, 4, 5, 6, 9, 11, 12, 18, 19, 20, 22, 25, 27, 33, 34, 90, 110, 111, 287, 424, 767, 1091, 2134,...
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..26
EXAMPLE
a(1) = 2^(1 - 1)*(1 + 1)^2 - (-1)^1 = 5.
a(2) = 2^(2 - 1)*(2 + 1)^2 - (-1)^2 = 17.
a(3) = 2^(4 - 1)*(4 + 1)^2 - (-1)^4 = 199.
a(4) = 2^(5 - 1)*(5 + 1)^2 - (-1)^5 = 577.
MATHEMATICA
Select[Table[2^(n - 1) (n + 1)^2 - (-1)^n, {n, 300}], PrimeQ] (* Vincenzo Librandi, Sep 10 2012 *)
PROG
(Magma) [a: n in [1..100] | IsPrime(a) where a is 2^(n-1)*(n+1)^2 - (-1)^n]; // Vincenzo Librandi, Sep 10 2012
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Juri-Stepan Gerasimov, Sep 07 2012
STATUS
approved