cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A076338 a(n) = 512*n + 1.

Original entry on oeis.org

1, 513, 1025, 1537, 2049, 2561, 3073, 3585, 4097, 4609, 5121, 5633, 6145, 6657, 7169, 7681, 8193, 8705, 9217, 9729, 10241, 10753, 11265, 11777, 12289, 12801, 13313, 13825, 14337, 14849, 15361, 15873, 16385, 16897, 17409, 17921, 18433
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 07 2002

Keywords

Comments

First prime is a(15) = 7681, see A076339.

Crossrefs

Cf. A076339.

Programs

  • Haskell
    a076338 n = (+ 1) . (* 512)
    a076338_list = [1,513..]  -- Reinhard Zumkeller, Mar 08 2012
  • 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
    
  • Mathematica
    LinearRecurrence[{2, -1}, {1, 513}, 50] (* Vincenzo Librandi, Feb 23 2012 *)
  • PARI
    for(n=0, 50, print1(512*n+1", ")); \\ Vincenzo Librandi, Feb 23 2012
    

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