login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047573 Numbers that are congruent to {0, 1, 2, 4, 5, 6, 7} mod 8. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Complement of A017101. - Michel Marcus, Sep 13 2015
LINKS
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)
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 *)
PROG
(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
(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
CROSSREFS
Cf. A017101 (8n+3).
Sequence in context: A039212 A039221 A183297 * A039246 A201997 A358225
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Feb 19 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)