OFFSET
0,2
COMMENTS
First prime is a(15) = 7681, see A076339.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
G.f.: (1+511*x)/(1-x)^2. - Vincenzo Librandi, Feb 23 2012
a(n) = 2*a(n-1)-a(n-2). - Vincenzo Librandi, Feb 23 2012
MATHEMATICA
LinearRecurrence[{2, -1}, {1, 513}, 50] (* Vincenzo Librandi, Feb 23 2012 *)
PROG
(Magma) I:=[1, 513]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Feb 23 2012
(PARI) for(n=0, 50, print1(512*n+1", ")); \\ Vincenzo Librandi, Feb 23 2012
(Haskell)
a076338 n = (+ 1) . (* 512)
a076338_list = [1, 513..] -- Reinhard Zumkeller, Mar 08 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Oct 07 2002
STATUS
approved