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.

A047573 Numbers that are congruent to {0, 1, 2, 4, 5, 6, 7} mod 8.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Keywords

Comments

Complement of A017101. - Michel Marcus, Sep 13 2015

Crossrefs

Cf. A017101 (8n+3).

Programs

  • Magma
    [n+Floor((n-4)/7) : n in [1..100]]; // Wesley Ivan Hurt, Sep 12 2015
    
  • Magma
    I:=[0,1,2,4,5,6,7,8]; [n le 8 select I[n] else Self(n-1) + Self(n-7) - Self(n-8): n in [1..80]]; // Vincenzo Librandi, Sep 13 2015
    
  • Maple
    for n from 0 to 200 do if n mod 8 <> 3 then printf(`%d,`,n) fi: od:
  • Mathematica
    Table[n+Floor[(n-4)/7], {n, 100}] (* Wesley Ivan Hurt, Sep 12 2015 *)
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 4, 5, 6, 7, 8}, 80] (* Vincenzo Librandi, Sep 13 2015 *)
    DeleteCases[Range[0,100],?(Mod[#,8]==3&)] (* _Harvey P. Dale, Oct 05 2020 *)
  • Python
    def A047573(n):
        a, b = divmod(n-1,7)
        return (0,1,2,4,5,6,7)[b]+(a<<3) # Chai Wah Wu, Jan 27 2023

Formula

G.f.: x^2*(x^6+x^5+x^4+x^3+2*x^2+x+1)/((x-1)^2*(x^6+x^5+x^4+x^3+x^2+x+1)). [Colin Barker, Jun 22 2012]
From Wesley Ivan Hurt, Sep 12 2015: (Start)
a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.
a(n) = n + floor((n-4)/7). (End)
From Wesley Ivan Hurt, Jul 21 2016: (Start)
a(n) = a(n-7) + 8 for n>7.
a(n) = (56*n - 49 + (n mod 7) + ((n+1) mod 7) + ((n+2) mod 7) - 6*((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) + ((n+6) mod 7))/49.
a(7*k) = 8*k-1, a(7*k-1) = 8*k-2, a(7*k-2) = 8*k-3, a(7*k-3) = 8*k-4, a(7*k-4) = 8*k-6, a(7*k-5) = 8*k-7, a(7*k-6) = 8*k-8. (End)

Extensions

More terms from James Sellers, Feb 19 2001