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.

A048506 a(n) = T(0,n), array T given by A048505.

Original entry on oeis.org

1, 2, 7, 25, 81, 241, 673, 1793, 4609, 11521, 28161, 67585, 159745, 372737, 860161, 1966081, 4456449, 10027009, 22413313, 49807361, 110100481, 242221057, 530579457, 1157627905, 2516582401, 5452595201, 11777605633, 25367150593, 54492397569, 116769423361
Offset: 0

Views

Author

Keywords

Comments

n-th difference of a(n), a(n-1), ..., a(0) is (1, 4, 9, 16, 25, ...).
Similar to A000697 in so far as it can be seen as the transform of 1, 1, 4, 9, 16, ... by a variant of the boustrophedon algorithm (see the Sage implementation). - Peter Luschny, Oct 30 2014

Crossrefs

Programs

  • Magma
    [n*(n+1)*2^(n-2) + 1: n in [0..30]]; // Vincenzo Librandi, Sep 26 2011
    
  • Mathematica
    LinearRecurrence[{7,-18,20,-8}, {1,2,7,25}, 30] (* Jean-François Alcover, Jun 11 2019 *)
  • PARI
    Vec(-(8*x^3-11*x^2+5*x-1)/((x-1)*(2*x-1)^3) + O(x^100)) \\ Colin Barker, Nov 26 2014
  • Sage
    def sq():
        yield 1
        for n in PositiveIntegers():
            yield n*n
    def bous_variant(f):
        k = 0
        am = next(f)
        a = [am]
        while True:
            yield am
            am = next(f)
            a.append(am)
            for j in range(k,-1,-1):
                am += a[j]
                a[j] = am
            k += 1
    b = bous_variant(sq())
    print([next(b) for  in range(26)]) # _Peter Luschny, Oct 30 2014
    

Formula

a(n) = n*(n+1)*2^(n-2) + 1 = A001788(n) + 1. - Ralf Stephan, Jan 16 2004
a(n) = 7*a(n-1)-18*a(n-2)+20*a(n-3)-8*a(n-4). - Colin Barker, Nov 26 2014
G.f.: -(8*x^3-11*x^2+5*x-1) / ((x-1)*(2*x-1)^3). - Colin Barker, Nov 26 2014