[go: up one dir, main page]

login
A047357
Numbers that are congruent to {0, 1, 3} mod 7.
1
0, 1, 3, 7, 8, 10, 14, 15, 17, 21, 22, 24, 28, 29, 31, 35, 36, 38, 42, 43, 45, 49, 50, 52, 56, 57, 59, 63, 64, 66, 70, 71, 73, 77, 78, 80, 84, 85, 87, 91, 92, 94, 98, 99, 101, 105, 106, 108, 112, 113, 115, 119, 120, 122, 126, 127, 129, 133, 134, 136, 140
OFFSET
1,3
FORMULA
Partial sums of (0, 1, 2, 4, 1, 2, 4, 1, 2, 4, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x+4*x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Dec 04 2011
From Wesley Ivan Hurt, Jun 08 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (21*n-30-6*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 7k-4, a(3k-1) = 7k-6, a(3k-2) = 7k-7. (End)
MAPLE
A047357:=n->(21*n-30-6*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047357(n), n=1..100); # Wesley Ivan Hurt, Jun 08 2016
MATHEMATICA
Select[Range[0, 200], Mod[#, 7] == 0 || Mod[#, 7] == 1 || Mod[#, 7] == 3 &] (* Vladimir Joseph Stephan Orlovsky, Jul 10 2011 *)
Select[Range[0, 200], MemberQ[{0, 1, 3}, Mod[#, 7]]&] (* Harvey P. Dale, Nov 30 2012 *)
Accumulate[PadRight[{0}, 70, {4, 1, 2}]] (* Harvey P. Dale, Aug 16 2021 *)
PROG
(Magma) [n : n in [0..150] | n mod 7 in [0, 1, 3]]; // Wesley Ivan Hurt, Jun 08 2016
CROSSREFS
Cf. A047360.
Sequence in context: A276002 A089970 A019270 * A003607 A087859 A300082
KEYWORD
nonn,easy
STATUS
approved