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

A212342 Sequence of coefficients of x^0 in marked mesh pattern generating function Q_{n,132}^(0,3,0,0)(x).

Original entry on oeis.org

1, 1, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119, 135, 152, 170, 189, 209, 230, 252, 275, 299, 324, 350, 377, 405, 434, 464, 495, 527, 560, 594, 629, 665, 702, 740, 779, 819, 860, 902, 945, 989, 1034, 1080, 1127, 1175, 1224, 1274, 1325, 1377, 1430, 1484, 1539, 1595, 1652, 1710, 1769, 1829, 1890, 1952, 2015, 2079
Offset: 0

Views

Author

N. J. A. Sloane, May 09 2012

Keywords

Crossrefs

A201163 is similar. - Robert Price, Jun 02 2012

Programs

  • Mathematica
    QQ0[t, x] = (1 - (1-4*x*t)^(1/2)) / (2*x*t); QQ1[t, x] = 1/(1 - t*QQ0[t, x]); QQ2[t, x] = (1 + t*(QQ1[t, x] - QQ0[t, x]))/(1 - t*QQ0[t, x]); QQ3[t, x] = (1 + t*(QQ2[t, x] - QQ0[t, x] + t*(QQ1[t, x] - QQ0[t,  x])))/(1 - t*QQ0[t, x]); q=Simplify[Series[QQ3[t, x], {t, 0, 35}]]; CoefficientList[q /. x -> 0, t] (* Robert Price, Jun 04 2012 *)

Formula

For n>=2, a(n)=(n^2+n-2)/2. - Robert Price, Jun 02 2012
For n>=5, a(n)=3*a(n-1)-3*a(n-2)+a(n-3). G.f.: (1-2*x+2*x^2+x^3-x^4)/(1-x)^3. - Colin Barker, Jul 06 2012

Extensions

a(10)-a(35) from Robert Price, Jun 02 2012
Added a(0) to correspond to given offset and to be consistent with A212346, Robert Price, Jun 02 2012

A132336 Sum of the integers from 1 to n, excluding perfect fifth powers.

Original entry on oeis.org

0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119, 135, 152, 170, 189, 209, 230, 252, 275, 299, 324, 350, 377, 405, 434, 464, 495, 495, 528, 562, 597, 633, 670, 708, 747, 787, 828, 870, 913, 957, 1002, 1048, 1095, 1143, 1192, 1242, 1293, 1345, 1398, 1452
Offset: 1

Views

Author

Cino Hilliard, Nov 07 2007

Keywords

Examples

			a(1)=0+1, excluding 0 and 1, so a(1)=0.
a(2)=0+1+2, excluding 0 and 1, so a(2)=2.
a(3)=0+1+2+3, excluding 0 and 1, so a(3)=2+3=5.
		

Crossrefs

Different from A000096.
Cf. A132337.

Programs

  • Maple
    A000217 := proc(n) n*(n+1)/2 ; end proc:
    A000539 := proc(n) (2*n^6+6*n^5+5*n^4-n^2)/12 ; end proc:
    A132336 := proc(n) r := floor(n^(1/5)) ; A000217(n)-A000539(r); end proc: seq(A132336(n),n=1..40) ;
  • PARI
    g5(n)=for(x=1, n, r=floor(x^(1/5)); sum5=(2*r^6+6*r^5+5*r^4-r^2)/12; sn=x* (x+1)/2; print1(sn-sum5, ", "))
    
  • PARI
    a(n) = my(r=sqrtnint(n,5)); n*(n+1)/2 - (2*r^6+6*r^5+5*r^4-r^2)/12; \\ Ruud H.G. van Tol, Nov 02 2023
    
  • Python
    from sympy import integer_nthroot
    def A132336(n): return n*(n+1)-(m:=integer_nthroot(n,5)[0])**2*(m**2*(m*(m+3<<1)+5)-1)//6>>1 # Chai Wah Wu, Jun 06 2025

Formula

a(n) = A000217(n) - A000539(r) where r = floor(n^(1/5)).
a(n) = n(n+1)/2 - (2r^6 + 6r^5 + 5r^4 - r^2)/12.
a(n) = A000217(n) - A000539(r) where r= A178487(n). - R. J. Mathar, Oct 12 2010

Extensions

Edited by the Assoc. Editors of the OEIS, Oct 12 2010. Thanks to Daniel Mondot for pointing out that the sequence needed editing.

A265282 Number of triangles in a certain geometric structure: see "Illustration of initial terms" link for precise definition.

Original entry on oeis.org

0, 1, 3, 5, 10, 13, 22, 26, 41, 46, 68, 74, 105, 112, 153, 161, 214, 223, 289, 299, 380, 391, 488, 500, 615, 628, 762, 776, 931, 946, 1123, 1139, 1340, 1357, 1583, 1601, 1854, 1873, 2154, 2174, 2485, 2506, 2848, 2870, 3245, 3268, 3677, 3701, 4146, 4171, 4653
Offset: 0

Views

Author

Luce ETIENNE, Dec 06 2015

Keywords

Comments

In words: This sequence gives the number of triangles of all sizes in a (2*n^2+8*n-1+(-1)^n)/8-polyiamond with a (7*n-2-(n-2)*(-1)^n)/4-gon: we have (2*n^3+9*n^2+31*n+21+3*(n^2-5*n-7)*(-1)^n)/96 triangles in a direction and (2*n^3+27*n^2+109*n-66+3*(n^2+9*n+18)*(-1)^n+12*(-1)^((2*n-1+(-1)^n)/4))/192 triangles in the other direction. (But the Illustration link is far more informative. - N. J. A. Sloane, Jan 23 2016)
At stage n, we count (2*n^2 + 6*n + 3 - (2*n+3)*(-1)^n)/16 triangles of size 1 in one direction and (2*n^2 + 10*n - 5 + (2*n+5)*(-1)^n)/16 triangles of size 1 in the opposite direction. The total number of triangles of size 1 in both directions is A024206(n+1).
We observe that a(4)=10 strengthens the Pythagorean relation between 4 and 10 (Tetraktys): cf. triangular numbers, A000217; and that it is from n = 4 we can see and count hexagonal and dodecagonal forms, for example, in a reticular system (incomplete with hexagonal holes) by opposition to the compact shape obtained from A002717.
We can obtain this reticular system from A248851.

Crossrefs

Programs

  • Magma
    [(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n) div 4)) / 64: n in [0..50]]; // Vincenzo Librandi, Dec 07 2015
    
  • Mathematica
    Table[(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n +
        4*(-1)^((2*n - 1 + (-1)^n)/4))/64, {n, 0, 100}] (* G. C. Greubel, Dec 20 2015 *)
    LinearRecurrence[{1,2,-2,0,0,-2,2,1,-1},{0,1,3,5,10,13,22,26,41},60] (* Harvey P. Dale, Aug 07 2019 *)
  • PARI
    vector(100, n, n--; (2*n^3+15*n^2+57*n-8+(3*n^2-n+4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64) \\ Altug Alkan, Dec 06 2015
    
  • PARI
    concat(0, Vec(x*(1+2*x+x^3-x^4-x^5+x^7)/((1-x)^4*(1+x)^3*(1+x^2)) + O(x^100))) \\ Colin Barker, Dec 07 2015

Formula

a(n) = A045947(floor(n/2)) + A024206(n+1). Note that A045947(floor(n/2)) = (2*n^3-n^2-7*n+(3*n^2-n-4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64.
a(n) = (2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n)/4))/64.
G.f.: x*(1+2*x+x^3-x^4-x^5+x^7) / ((1-x)^4*(1+x)^3*(1+x^2)). - Colin Barker, Dec 07 2015

Extensions

a(26) corrected by Altug Alkan, Dec 06 2015
Showing 1-3 of 3 results.