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.

A187322 a(n) = floor(n/2) + floor(3*n/4).

Original entry on oeis.org

0, 0, 2, 3, 5, 5, 7, 8, 10, 10, 12, 13, 15, 15, 17, 18, 20, 20, 22, 23, 25, 25, 27, 28, 30, 30, 32, 33, 35, 35, 37, 38, 40, 40, 42, 43, 45, 45, 47, 48, 50, 50, 52, 53, 55, 55, 57, 58, 60, 60, 62, 63, 65, 65, 67, 68, 70, 70, 72, 73, 75, 75, 77, 78, 80, 80, 82, 83, 85, 85, 87, 88, 90, 90, 92, 93, 95, 95, 97
Offset: 0

Views

Author

Clark Kimberling, Mar 08 2011

Keywords

Comments

List of quadruples [5*k, 5*k, 5*k+2, 5*k+3]. - Luce ETIENNE, Aug 14 2017

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/2]+Floor[3n/4], {n,0,120}]
    LinearRecurrence[{1,0,0,1,-1},{0,0,2,3,5},80] (* Harvey P. Dale, Dec 05 2018 *)
  • PARI
    a(n) = n\2 + 3*n\4; \\ Altug Alkan, Aug 14 2017
    
  • PARI
    concat(vector(2), Vec(x^2*(2 + x + 2*x^2) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100))) \\ Colin Barker, Aug 14 2017
    
  • Python
    def A187322(n): return (n>>1)+(3*n>>2) # Chai Wah Wu, Jan 31 2023

Formula

a(n) = A004526(n) + A057353(n). - Michel Marcus, Aug 14 2017
a(n) = (10*n-5+3*cos(n*Pi)+2*(cos(n*Pi/2)-sin(n*Pi/2)))/8. - Luce ETIENNE, Aug 14 2017
From Colin Barker, Aug 14 2017: (Start)
G.f.: x^2*(2 + x + 2*x^2) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>4.
(End)