login
A047600
Numbers that are congruent to {1, 3, 4, 5} mod 8.
1
1, 3, 4, 5, 9, 11, 12, 13, 17, 19, 20, 21, 25, 27, 28, 29, 33, 35, 36, 37, 41, 43, 44, 45, 49, 51, 52, 53, 57, 59, 60, 61, 65, 67, 68, 69, 73, 75, 76, 77, 81, 83, 84, 85, 89, 91, 92, 93, 97, 99, 100, 101, 105, 107, 108, 109, 113, 115, 116, 117, 121, 123, 124
OFFSET
1,2
FORMULA
From Bruno Berselli, Jul 17 2012: (Start)
G.f.: x*(1+2*x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)).
a(n) = 2*n-1 -(3+(-1)^n)*(1+i^(n*(n+1)))/4, where i=sqrt(-1). (End)
From Wesley Ivan Hurt, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = A047621(k), a(2k-1) = A047461(k). (End)
E.g.f.: (6 + sin(x) - 2*cos(x) + (4*x - 3)*sinh(x) + 4*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 03 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 - (4+3*sqrt(2))*log(2)/16 + 3*sqrt(2)*log(sqrt(2)+2)/8. - Amiram Eldar, Dec 24 2021
MAPLE
A047600:=n->2*n-1-(3+I^(2*n))*(1+I^(n*(n+1)))/4: seq(A047600(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
MATHEMATICA
Select[Range[120], MemberQ[{1, 3, 4, 5}, Mod[#, 8]]&] (* Harvey P. Dale, Mar 09 2011 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {1, 3, 4, 5, 9}, 60] (* Bruno Berselli, Jul 17 2012 *)
PROG
From Bruno Berselli, Jul 17 2012: (Start)
(Magma) [n: n in [1..120] | n mod 8 in [1, 3, 4, 5]];
(Maxima) makelist(2*n-1-(3+(-1)^n)*(1+%i^(n*(n+1)))/4, n, 1, 60);
(PARI) Vec((1+2*x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) (End)
CROSSREFS
Sequence in context: A217040 A295718 A035236 * A325464 A010384 A028954
KEYWORD
nonn,easy
STATUS
approved