cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A047240 Numbers that are congruent to {0, 1, 2} mod 6.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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

Crossrefs

Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

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
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

Extensions

Paul Barry formula adapted for offset 1 by Wesley Ivan Hurt, Jun 14 2016