%I #30 Sep 08 2022 08:44:33
%S 0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,28,
%T 29,30,31,32,33,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,52,53,54,
%U 55,56,57,58,60,61,62,63,64,65,66,68,69,70,71,72,73,74,76,77
%N Numbers k such that the binary expansion of k does not end in 011.
%C Numbers less than 8 or not congruent to 3 (mod 8). - _M. F. Hasler_, Nov 02 2013
%C Numbers that are congruent to {0, 1, 2, 4, 5, 6, 7} mod 8 including the number "3". - _Wesley Ivan Hurt_, Jul 22 2016
%H Daniel Starodubtsev, <a href="/A004775/b004775.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,1,-1).
%F For all n>4, a(n) = n + floor((n-12)/7); for n<12, a(n) = n-1. - _M. F. Hasler_, Nov 02 2013
%F From _Wesley Ivan Hurt_, Jul 22 2016: (Start)
%F G.f.: x^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^10)/(1 - x - x^7 + x^8).
%F a(n) = a(n-1) + a(n-7) - a(n-8) for n>12; a(n) = a(n-7) + 8 for n>11.
%F a(n) = (56*n - 105 + (n mod 7) + ((n+1) mod 7) - 6*((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) + ((n+6) mod 7))/49 for n>4. (End)
%F a(1) = 0, a(2) = 1, a(3) = 2, a(4) = 3, a(7*n + k + 4) = 8*n + k + 3, n >= 0, 1 <= k < 8. - _Yosu Yurramendi_, Aug 09 2016
%e 9 is 1001 in binary, which ends 001, not 011, so 9 is in the sequence. 19 is 10011 in binary, which ends 011, so 19 is not in the sequence. - _Michael B. Porter_, Jul 22 2016
%p A004775:=n->8*floor(n/7)+[0, 1, 2, 4, 5, 6, 7][(n mod 7)+1]: 0, 1, 2, 3, seq(A004775(n), n=3..100); # _Wesley Ivan Hurt_, Jul 22 2016
%t Join[{0, 1, 2, 3}, Select[Range[3, 150], MemberQ[{0, 1, 2, 4, 5, 6, 7}, Mod[#, 8]] &]] (* _Wesley Ivan Hurt_, Jul 22 2016 *)
%o (PARI) is(n)=n%8!=3 || n==3 \\ _Charles R Greathouse IV_, Mar 29 2013
%o (PARI) A004775(n)=n+(n-5)\7-(n>4) \\ _M. F. Hasler_, Nov 02 2013
%o (Magma) [0..3] cat [n : n in [3..100] | n mod 8 in [0, 1, 2, 4, 5, 6, 7]]; // _Wesley Ivan Hurt_, Jul 22 2016
%K nonn,easy
%O 1,3
%A _N. J. A. Sloane_
|