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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 Vincenzo Librandi, Table of n, a(n) for n = 1..10000 Vladimir Pletser, Congruence conditions on the number of terms in sums of consecutive squared integers equal to squared integers, arXiv:1409.7969 [math.NT], 2014. Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1). FORMULA From Paul Barry, Feb 19 2007: (Start) 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) = n-1 + 3*floor((n-1)/3). - Philippe Deléham, Apr 21 2009 a(n) = 6*floor(n/3) + (n mod 3). - Gary Detlefs, Mar 09 2010 a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=2*3^k for k>0. - Philippe Deléham, Oct 22 2011. a(n) = 2*n - 2 - A010872(n-1). - Wesley Ivan Hurt, Jul 07 2013 From Wesley Ivan Hurt, Jun 14 2016: (Start) 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 MAPLE A047240:=n->2*n-3-cos(2*n*Pi/3)+sin(2*n*Pi/3)/sqrt(3): seq(A047240(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016 select(k -> modp(iquo(k, 3), 2) = 0, [\$0..122]); # Peter Luschny, Oct 05 2017 MATHEMATICA Select[Range[0, 200], Mod[#, 6] == 0 || Mod[#, 6] == 1 || Mod[#, 6] == 2 &] (* Vladimir Joseph Stephan Orlovsky, Jul 07 2011 *) 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 (PARI) a(n)=n\3*6 + n%3 \\ Charles R Greathouse IV, Oct 07 2015 (Python 3) [k for k in range(123) if (k//3) % 2 == 0] # Peter Luschny, Oct 05 2017 CROSSREFS Cf. A010872, A030341, A047234, A047242. Cf. similar sequences with formula n+i*floor(n/3) listed in A281899. Sequence in context: A201819 A275523 A327258 * A080333 A194369 A039592 Adjacent sequences: A047237 A047238 A047239 * A047241 A047242 A047243 KEYWORD nonn,easy AUTHOR EXTENSIONS Paul Barry formula adapted for offset 1 by Wesley Ivan Hurt, Jun 14 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 27 19:48 EST 2022. Contains 358406 sequences. (Running on oeis4.)