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

 


A047610
Positive integers that are congruent to {1, 4, 5} mod 8.
2
1, 4, 5, 9, 12, 13, 17, 20, 21, 25, 28, 29, 33, 36, 37, 41, 44, 45, 49, 52, 53, 57, 60, 61, 65, 68, 69, 73, 76, 77, 81, 84, 85, 89, 92, 93, 97, 100, 101, 105, 108, 109, 113, 116, 117, 121, 124, 125, 129, 132, 133, 137, 140, 141, 145, 148, 149, 153, 156, 157
OFFSET
1,2
FORMULA
a(n) = a(n-3) + 8, n > 3, with initial conditions a(1) = 1, a(2) = 4, a(3) = 5. - L. Edson Jeffery, May 04 2015
G.f.: x*(1+3*x)*(1+x^2)/(1-x-x^3+x^4). - Robert Israel, May 04 2015
A047610 = A016813 union A017113\{0}. - L. Edson Jeffery, May 06 2015
MAPLE
seq(op([8*i+1, 8*i+4, 8*i+5]), i=0..100); # Robert Israel, May 04 2015
MATHEMATICA
a[1] := 1; a[2] := 4; a[3] := 5; a[n_] := a[n - 3] + 8; Table[a[n], {n, 10}] (* L. Edson Jeffery, May 04 2015 *)
Select[Range[0, 200], MemberQ[{1, 4, 5}, Mod[#, 8]] &] (* Vincenzo Librandi, May 07 2015 *)
LinearRecurrence[{1, 0, 1, -1}, {1, 4, 5, 9}, 60] (* Harvey P. Dale, Nov 21 2015 *)
PROG
(PARI) is(n)=n%8==1||n%8>>1==2 \\ Charles R Greathouse IV, May 04 2015
(Magma) [n : n in [0..160] | n mod 8 in [1, 4, 5]]; // Vincenzo Librandi, May 07 2015
CROSSREFS
Sequence in context: A194154 A297291 A269741 * A126004 A258251 A331086
KEYWORD
nonn,easy
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 19 21:59 EDT 2024. Contains 376015 sequences. (Running on oeis4.)