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.

A130497 Repetition of odd numbers five times.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 29, 29, 29, 29, 29, 31, 31, 31
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1,1,1,1,3];; for n in [7..80] do a[n]:=a[n-1]+a[n-5]-a[n-6]; od; a; # G. C. Greubel, Sep 12 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x^5)/((1-x)*(1-x^5)) )); // G. C. Greubel, Sep 12 2019
    
  • Maple
    P:=proc(q) local k,n; k:=[]; for n from 0 to q do k:=[op(k),2*floor(n/5)+1]; od; op(k); end: P(77);
  • Mathematica
    Flatten[Table[#,{5}]&/@Range[1,31,2]] (* Harvey P. Dale, Mar 27 2013~ *)
  • PARI
    my(x='x+O('x^80)); Vec((1+x^5)/((1-x)*(1-x^5))) \\ G. C. Greubel, Sep 12 2019
    
  • Sage
    def A130497_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^5)/((1-x)*(1-x^5))).list()
    A130497_list(80) # G. C. Greubel, Sep 12 2019
    

Formula

From R. J. Mathar, Mar 17 2010: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6).
G.f.: (1+x)*(1-x+x^2-x^3+x^4)/((1+x+x^2+x^3+x^4) * (1-x)^2 ). (End)
a(n) = 2*floor(n/5)+1 = A130496(n)+1. - Tani Akinari, Jul 24 2013