|
|
A047240
|
|
Numbers that are congruent to {0, 1, 2} mod 6.
|
|
13
|
|
|
0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32, 36, 37, 38, 42, 43, 44, 48, 49, 50, 54, 55, 56, 60, 61, 62, 66, 67, 68, 72, 73, 74, 78, 79, 80, 84, 85, 86, 90, 91, 92, 96, 97, 98, 102, 103, 104, 108, 109, 110, 114, 115, 116, 120, 121, 122
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Partial sums of 0,1,1,4,1,1,4,... - Paul Barry, Feb 19 2007
Numbers k such that floor(k/3) = 2*floor(k/6). - Bruno Berselli, Oct 05 2017
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1 + x + 4*x^2)/((1 - x)*(1 - x^3)).
a(n) = 2*n - 3 - cos(2*n*Pi/3) + sin(2*n*Pi/3)/sqrt(3). (End)
a(n) = 6*floor(n/3) + (n mod 3). - Gary Detlefs, Mar 09 2010
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(3*k) = 6*k-4, a(3*k-1) = 6*k-5, a(3*k-2) = 6*k-6. (End)
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(3))*Pi/18 + log(2+sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 14 2021
E.g.f.: 4 + exp(x)*(2*x - 3) - exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Jul 26 2024
|
|
MAPLE
|
select(k -> modp(iquo(k, 3), 2) = 0, [$0..122]); # Peter Luschny, Oct 05 2017
|
|
MATHEMATICA
|
a047240[n_] := Flatten[Map[6 # + {0, 1, 2} &, Range[0, n]]]; a047240[20] (* data *) (* Hartmut F. W. Hoft, Mar 06 2017 *)
|
|
PROG
|
(Magma) [0], [6*Floor(n/3) + (n mod 3): n in [1..65]]; // Vincenzo Librandi, Oct 23 2011
(Python 3)
[k for k in range(123) if (k//3) % 2 == 0] # Peter Luschny, Oct 05 2017
|
|
CROSSREFS
|
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|