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.

Showing 1-4 of 4 results.

A004773 Numbers congruent to {0, 1, 2} mod 4: a(n) = floor(4*n/3).

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 64, 65, 66, 68, 69, 70, 72, 73, 74, 76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 89, 90
Offset: 0

Views

Author

Keywords

Comments

The sequence b(n) = floor((4/3)*(n+2)) appears as an upper bound in Fijavz and Wood.
Binary expansion does not end in 11.
From Guenther Schrack, May 04 2023: (Start)
The sequence is the interleaving of the sequences A008586, A016813, A016825, in that order.
Let S(n) = a(n) + a(n+1) + a(n+2). Then floor(S(n)/3) = A042968(n+1), round(S(n)/3) = a(n+1), ceiling(S(n)/3) = A042965(n+2). (End)

Crossrefs

Cf. A177702 (first differences), A000969 (partial sums).
Cf. A032766, this sequence, A001068, A047226, A047368, A004777.
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    [n: n in [0..100] | n mod 4 in [0..2]]; // Vincenzo Librandi, Dec 23 2010
    
  • Maple
    seq(floor(n/3)+n,n=0..68); # Gary Detlefs, Mar 20 2010
  • Mathematica
    f[n_] := Floor[4 n/3]; Array[f, 69, 0] (* Robert G. Wilson v, Dec 24 2010 *)
    fQ[n_] := Mod[n, 4] != 3; Select[ Range[0, 90], fQ] (* Robert G. Wilson v, Dec 24 2010 *)
    a[0] = 0; a[n_] := a[n] = a[n - 1] + 2 - If[ Mod[a[n - 1], 4] < 2, 1, 0]; Array[a, 69, 0] (* Robert G. Wilson v, Dec 24 2010 *)
    CoefficientList[ Series[x (1 + x + 2 x^2)/((1 - x) (1 - x^3)), {x, 0, 68}], x] (* Robert G. Wilson v, Dec 24 2010 *)
  • PARI
    a(n)=4*n\3 \\ Charles R Greathouse IV, Sep 27 2012

Formula

G.f.: x*(1+x+2*x^2)/((1-x)*(1-x^3)).
a(0) = 0, a(n+1) = a(n) + a(n) mod 4 + 0^(a(n) mod 4). - Reinhard Zumkeller, Mar 23 2003
a(n) = A004396(n) + A004523(n); complement of A004767. - Reinhard Zumkeller, Aug 29 2005
a(n) = floor(n/3) + n. - Gary Detlefs, Mar 20 2010
a(n) = (12*n-3+3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
E.g.f.: (3*exp(x)*(4*x - 1) + exp(-x/2)*(3*cos((sqrt(3)*x)/2) + sqrt(3)*sin((sqrt(3)*x)/2)))/9. - Stefano Spezia, Jun 09 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)-1)*Pi/8 + sqrt(2)*log(sqrt(2)+2)/4 + (2-sqrt(2))*log(2)/8. - Amiram Eldar, Dec 05 2021
From Guenther Schrack, May 04 2023: (Start)
a(n) = (12*n - 3 + w^(2*n)*(w + 2) - w^n*(w - 1))/9 where w = (-1 + sqrt(-3))/2.
a(n) = 2*floor(n/3) + floor((n+1)/3) + floor((n+2)/3).
a(n) = (4*n - n mod 3)/3.
a(n) = a(n-3) + 4.
a(n) = a(n-1) + a(n-3) - a(n-4).
a(n) = 4*A002264(n) + A010872(n).
a(n) = A042968(n+1) - 1.
(End)

A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 3, 6, 3, 1, 2, 5, 8, 12, 8, 5, 2, 1, 4, 9, 16, 22, 28, 22, 16, 9, 4, 1, 1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1, 2, 7, 15, 31, 53, 82, 114, 147, 171, 186, 171, 147, 114, 82, 53, 31, 15, 7, 2, 1, 5, 13, 30, 56, 95, 150, 216, 293, 371, 445, 495, 522, 495, 445, 371, 293, 216, 150, 95, 56, 30, 13, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			               /\
T(3,-1) = 1:  /  \/\
.
                /\
               /  \     /\/\
T(3,0) = 3:   /    \   /    \   /\/\/\
.
                 /\
T(3,1) = 1:   /\/  \
.
Triangle T(n,k) begins:
:                             1                            ;
:                             1                            ;
:                             2                            ;
:                         1,  3,  1                        ;
:                     1,  3,  6,  3,  1                    ;
:                 2,  5,  8, 12,  8,  5,  2                ;
:         1,  4,  9, 16, 22, 28, 22, 16,  9,  4,  1        ;
:  1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1  ;
		

Crossrefs

Row sums give A000108.
Column k=0 gives A300323.

Programs

  • Maple
    b:= proc(x, y, v) option remember; expand(
         `if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
          b(x-1, y+i, v+j)*z^((y-v)/2+(i-j)/4), i=l), j=l))([-1, 1]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=ldegree(p)..degree(p)))(
                 add(b(n, (n-2*j)$2), j=0..n/2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[b[x - 1, y + i, v + j] z^((y - v)/2 + (i - j)/4), {i, l}], {j, l}]][{-1, 1}]]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Range[Exponent[p, z, Reverse @@ # &], Exponent[p, z]]}]][Sum[b[n, n-2j, n-2j], {j, 0, n/2}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

T(n,k) = T(n,-k).
T(n,A130518(n)) = A177702(n).

A245477 Period 6: repeat [1, 1, 1, 1, 1, 2].

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 0

Views

Author

Hailey R. Olafson, Jul 23 2014

Keywords

Comments

First differences of A047368. The first differences of this sequence are in A131533. - Wesley Ivan Hurt, Jul 24 2014
Binomial Transform of a(n) gives: 1, 2, 4, 8, 16, 33, 70, 149, 312, 638, 1276, 2511, ... - Wesley Ivan Hurt, Aug 13 2014

Crossrefs

Programs

  • Magma
    [Floor((n+1)*7/6) - Floor((n)*7/6) : n in [0..100]]; // Wesley Ivan Hurt, Aug 06 2014
  • Maple
    A:= n -> piecewise(n mod 6 = 5, 2, 1);
    seq(A(n), n=0..100); # Robert Israel, Jul 23 2014
  • Mathematica
    Table[2 - Sign[Mod[n + 1, 6]], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)
    PadRight[{},120,{1,1,1,1,1,2}] (* Harvey P. Dale, Jun 02 2016 *)
  • PARI
    a(n) = 7*(n+1)\6 - 7*n\6; \\ Michel Marcus, Jul 23 2014
    
  • Sage
    [floor((n+1)*7/6) - floor((n)*7/6) for n in [0..200]]
    

Formula

a(n) = floor((n+1)*7/6) - floor((n)*7/6).
G.f.: 1/(1-x) + x^5/(1-x^6). - Robert Israel, Jul 23 2014
From Wesley Ivan Hurt, Jul 24 2014, Aug 06-29 2014: (Start)
a(n) = 2 - sign((n+1) mod 6).
a(n) = 3 - 2^sign((n+1) mod 6).
a(n) = A172051(n) + 1.
a(2n) = 1, a(2n+1) = A177702(n).
Sum_{i=0..n-2} a(i) = A047368(n), n>0.
a(n) = 1 + mod(n, 1 + mod(n-1, 3)).
a(n) = 1 + binomial(mod(5n + 10, 6), 5). (End)
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = (7 - cos(n*Pi) + cos(n*Pi/3) - cos(2*n*Pi/3) - sqrt(3)*sin(n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/6. (End)

A177703 Decimal expansion of (2+sqrt(10))/3.

Original entry on oeis.org

1, 7, 2, 0, 7, 5, 9, 2, 2, 0, 0, 5, 6, 1, 2, 6, 4, 4, 3, 9, 9, 9, 6, 3, 1, 1, 8, 1, 4, 7, 7, 5, 7, 2, 8, 4, 4, 5, 7, 3, 1, 8, 5, 0, 4, 6, 4, 4, 1, 7, 3, 8, 9, 4, 2, 2, 8, 5, 8, 3, 4, 9, 5, 0, 9, 3, 0, 8, 6, 4, 8, 1, 2, 8, 7, 9, 7, 4, 6, 0, 7, 3, 7, 8, 1, 4, 1, 6, 0, 3, 6, 1, 2, 6, 4, 3, 3, 4, 3, 1, 7, 2, 9, 1, 1
Offset: 1

Views

Author

Klaus Brockhaus, May 11 2010

Keywords

Comments

Continued fraction expansion of (2+sqrt(10))/3 is A177702.

Examples

			(2+sqrt(10))/3 = 1.72075922005612644399...
		

Crossrefs

Cf. A010467 (decimal expansion of sqrt(10)), A177702 (repeat 1, 1, 2).

Programs

  • Mathematica
    RealDigits[(2+Sqrt[10])/3,10,120][[1]] (* Harvey P. Dale, Jun 21 2011 *)
Showing 1-4 of 4 results.