login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers that are congruent to {1, 2, 3, 6, 7} mod 8.
1

%I #17 Mar 29 2023 17:36:26

%S 1,2,3,6,7,9,10,11,14,15,17,18,19,22,23,25,26,27,30,31,33,34,35,38,39,

%T 41,42,43,46,47,49,50,51,54,55,57,58,59,62,63,65,66,67,70,71,73,74,75,

%U 78,79,81,82,83,86,87,89

%N Numbers that are congruent to {1, 2, 3, 6, 7} mod 8.

%H G. C. Greubel, <a href="/A047561/b047561.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,1,-1).

%F From _Chai Wah Wu_, May 29 2016: (Start)

%F a(n) = a(n-1) + a(n-5) - a(n-6) for n>6.

%F G.f.: x*(x^5 + x^4 + 3*x^3 + x^2 + x + 1)/(x^6 - x^5 - x + 1). (End)

%t LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 2, 3, 6, 7, 9}, 50] (* _G. C. Greubel_, May 29 2016 *)

%t #+{1,2,3,6,7}&/@(8*Range[0,20])//Flatten (* _Harvey P. Dale_, Mar 29 2023 *)

%o (Magma) [n : n in [0..150] | n mod 8 in [1, 2, 3, 6, 7]]; // _Wesley Ivan Hurt_, May 29 2016

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_