login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004777 Numbers not congruent to 7 mod 8. 8
0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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

Numbers n such that binary expansion does not end 111.

Complement of A004771. - Michel Marcus, Sep 11 2015

LINKS

Daniel Starodubtsev, Table of n, a(n) for n = 1..10000

Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).

FORMULA

G.f.: x^2*(1+x+x^2+x^3+x^4+x^5+2*x^6) / ((x^6+x^5+x^4+x^3+x^2+x+1)*(x-1)^2). - R. J. Mathar, Oct 08 2011

a(n) = floor((n-1)*8/7). - M. F. Hasler, Nov 02 2013

From Wesley Ivan Hurt, Sep 11 2015: (Start)

a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.

a(n) = n - 1 + A132270(n). (End)

From Wesley Ivan Hurt, Jul 20 2016: (Start)

a(n) = (56*n - 77 + (n mod 7) + ((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) - 6*((n+6) mod 7))/49.

a(7k) = 8k-2, a(7k-1) = 8k-3, a(7k-2) = 8k-4, a(7k-3) = 8k-5, a(7k-4) = 8k-6, a(7k-5) = 8k-7, a(7k-6) = 8k-8. (End)

MAPLE

A004777:=n->n-1+floor((n-1)/7): seq(A004777(n), n=1..100); # Wesley Ivan Hurt, Sep 11 2015

MATHEMATICA

DeleteCases[Range[0, 100], _?(Mod[#, 8]==7&)] (* Harvey P. Dale, Apr 01 2011 *)

Select[Range[0, 100], ! MemberQ[{7}, Mod[#, 8]] &] (* Vincenzo Librandi, Sep 12 2015 *)

PROG

(PARI) A004777=n->(n-1)*8\7 \\ M. F. Hasler, Nov 02 2013

(MAGMA) [n-1+Floor((n-1)/7) : n in [1..100]]; // Wesley Ivan Hurt, Sep 11 2015

(MAGMA) [n: n in [0..100] | not n mod 8 in [7]]; // Vincenzo Librandi, Sep 11 2015

CROSSREFS

Cf. A004771, A059561, A132270.

Sequence in context: A257458 A179439 A047421 * A059561 A037474 A292638

Adjacent sequences:  A004774 A004775 A004776 * A004778 A004779 A004780

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

Edited by N. J. A. Sloane Aug 31 2009 at the suggestion of R. J. Mathar.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 8 17:40 EDT 2020. Contains 335524 sequences. (Running on oeis4.)