A047351 Numbers that are congruent to {0, 1, 2, 4} mod 7.
0, 1, 2, 4, 7, 8, 9, 11, 14, 15, 16, 18, 21, 22, 23, 25, 28, 29, 30, 32, 35, 36, 37, 39, 42, 43, 44, 46, 49, 50, 51, 53, 56, 57, 58, 60, 63, 64, 65, 67, 70, 71, 72, 74, 77, 78, 79, 81, 84, 85, 86, 88, 91, 92, 93, 95, 98, 99, 100, 102, 105, 106, 107, 109, 112
Offset: 1
Links
- Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
Programs
-
Magma
[n : n in [0..150] | n mod 7 in [0, 1, 2, 4]]; // Wesley Ivan Hurt, Jun 01 2016
-
Maple
for i from 1 to 56 do if(i mod 4=0) then print(floor(7*i-3)/4)+1) else print(floor(7*i-3)/4)) fi od; # Gary Detlefs, Mar 07 2010 A047351:=n->n-3+(6*n+(2-I^(2*n))*(1-2*I^(n*(n+1)))+1)/8: seq(A047351(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
-
Mathematica
Select[Range[0,100], MemberQ[{0,1,2,4}, Mod[#,7]]&] (* or *) LinearRecurrence[{1,0,0,1,-1}, {0,1,2,4,7}, 60] (* Harvey P. Dale, Jun 04 2013 *)
-
PARI
x='x+O('x^100); concat(0, Vec(x^2*(1+x+2*x^2+3*x^3)/((1+x)*(1+x^2)*(x-1)^2))) \\ Altug Alkan, Jun 02 2016
Formula
If n mod 4 = 0 then a(n) = floor((7*n-3)/4)+1, else a(n) = floor((7*n-3)/4). - Gary Detlefs, Mar 07 2010
G.f.: x^2*(1+x+2*x^2+3*x^3) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Dec 04 2011
a(n) = n-3+(6*n+(2-(-1)^n)(1-2*i^(n(n+1)))+1)/8, where i=sqrt(-1). - Bruno Berselli, Dec 03 2012
a(0)=0, a(1)=1, a(2)=2, a(3)=4, a(4)=7, a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - Harvey P. Dale, Jun 04 2013
E.g.f.: (12 + 3*sin(x) - cos(x) + (7*x - 10)*sinh(x) + (7*x - 11)*cosh(x))/4. - Ilya Gutkovskiy, Jun 02 2016
Comments