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-2 of 2 results.

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

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 24, 25, 26, 28, 30, 31, 32, 34, 36, 37, 38, 40, 42, 43, 44, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 61, 62, 64, 66, 67, 68, 70, 72, 73, 74, 76, 78, 79, 80, 82, 84, 85, 86, 88, 90, 91, 92, 94, 96, 97
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047238(n) with A016777(n-1). - Guenther Schrack, Feb 11 2019

Crossrefs

Programs

  • GAP
    Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 4); # Muniru A Asiru, Feb 19 2019
  • Magma
    [n : n in [0..110] | n mod 6 in [0, 1, 2, 4]]; // G. C. Greubel, Feb 16 2019
    
  • Maple
    A047237:=n->(6*n-8+I^(1-n)-I^(1+n))/4: seq(A047237(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-8+I^(1-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
    LinearRecurrence[{2,-2,2,-1},{0,1,2,4},120] (* Harvey P. Dale, Jan 21 2018 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
    

Formula

Starting (1, 2, 4, 6, ...) = partial sums of (1, 1, 2, 2, 1, 1, 2, 2, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x^2) / ((1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (6*n - 8 + i^(1-n) - i^(1+n))/4 where i=sqrt(-1).
a(2*n) = A016777(n-1), a(2*n-1) = A047238(n). (End)
From Guenther Schrack, Feb 11 2019: (Start)
a(n) = (6*n - 8 + (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=4, for n > 4.
a(-n) = -A047262(n+2).
a(n) = A118286(n-1)/2 for n > 1.
a(n) = A047255(n) - 1. (End)
Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(2)/3 + log(3)/4. - Amiram Eldar, Dec 16 2021

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A231559 a(n) = floor( A000326(n)/2 ).

Original entry on oeis.org

0, 0, 2, 6, 11, 17, 25, 35, 46, 58, 72, 88, 105, 123, 143, 165, 188, 212, 238, 266, 295, 325, 357, 391, 426, 462, 500, 540, 581, 623, 667, 713, 760, 808, 858, 910, 963, 1017, 1073, 1131, 1190, 1250, 1312, 1376, 1441, 1507, 1575, 1645, 1716, 1788, 1862, 1938
Offset: 0

Views

Author

Bruno Berselli, Nov 11 2013

Keywords

Comments

First trisection of A011865.

Crossrefs

Cf. pentagonal numbers: A000326.
Cf. A011848 for the triangular numbers: floor(A000217/2); A007590 for the squares: floor(A000290/2); A156859 for the hexagonal numbers: floor(A000384/2).
First differences: A047262.

Programs

  • Magma
    [Floor(n*(3*n-1)/4): n in [0..60]];
  • Mathematica
    Table[Floor[n (3 n - 1)/4], {n, 0, 60}]
    CoefficientList[Series[x^2(2+x^2)/((1+x^2)(1-x)^3),{x,0,70}],x] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,0,2,6,11},70] (* Harvey P. Dale, Jan 28 2022 *)

Formula

G.f.: x^2*(2 + x^2)/((1 + x^2)*(1 - x)^3).
a(n) = ( n*(3*n-1) + i^(n*(n+1)) - 1 )/4, where i=sqrt(-1).
Showing 1-2 of 2 results.