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.

A135276 a(0)=0, a(1)=1; for n>1, a(n) = a(n-1) + n^0 if n odd, a(n) = a(n-1) + n^1 if n is even.

Original entry on oeis.org

0, 1, 3, 4, 8, 9, 15, 16, 24, 25, 35, 36, 48, 49, 63, 64, 80, 81, 99, 100, 120, 121, 143, 144, 168, 169, 195, 196, 224, 225, 255, 256, 288, 289, 323, 324, 360, 361, 399, 400, 440, 441, 483, 484, 528, 529, 575, 576, 624, 625, 675, 676, 728, 729, 783, 784, 840, 841, 899, 900, 960, 961
Offset: 0

Views

Author

Artur Jasinski, May 12 2008, corrected May 17 2008

Keywords

Comments

Index to family of sequences of the form a(n) = a(n-1) + n^r if n odd, a(n) = a(n-1)+ n^s if n is even, for n > 1 and a(1)=1:
s=0, s=1, s=2, s=3, s=4, s=5
r=0, A000027, this seq, A135301, A135332, A140142, A140143;
Equals triangle A070909 * [1,2,3,...]. - Gary W. Adamson, May 16 2010
Right edge of the triangle in A199332: a(n) = A199332(n,n), for n > 0. - Reinhard Zumkeller, Nov 23 2011

Crossrefs

Programs

  • Magma
    [(2*n^2+6*n+1+(2*n-1)*(-1)^n)/8 : n in [0..100]]; // Wesley Ivan Hurt, Mar 22 2016
  • Maple
    A135276:=n->( 2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n )/8: seq(A135276(n), n=0..100); # Wesley Ivan Hurt, Mar 22 2016
  • Mathematica
    a = {}; r = 0; s = 1; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m^r + (Cos[Pi m/2]^2) m^s, {m, 1, n}]; AppendTo[a, k], {n, 0, 100}]; a (* Artur Jasinski *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 3, 4, 8}, 50] (* G. C. Greubel, Oct 08 2016 *)
  • PARI
    A135276(n)=if(n%2,((n+1)/2)^2,(n/2+1)^2-1) \\ M. F. Hasler, May 17 2008
    
  • PARI
    my(x='x+O('x^200)); concat(0, Vec(x*(1+2*x-x^2)/((1+x)^2*(1-x)^3))) \\ Altug Alkan, Mar 23 2016
    

Formula

a(n) = (n/2 + 1)^2 - 1 if n is even, ((n+1)/2)^2 if n is odd. - M. F. Hasler, May 17 2008
From R. J. Mathar, Feb 22 2009: (Start)
G.f.: x*(1+2*x-x^2)/((1+x)^2*(1-x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End)
a(n) = (2*n^2 + 6*n + 1 + (2*n-1)*(-1)^n)/8. - Luce ETIENNE, Jul 08 2014
a(n) = (floor(n/2)+1)^2 + (n mod 2) - 1. - Wesley Ivan Hurt, Mar 22 2016
a(n) = A004526((n+1)^2) - A004526(n+1)^2. - Bruno Berselli, Oct 21 2016
Sum_{n>=1} 1/a(n) = 3/4 + Pi^2/6. - Amiram Eldar, Sep 08 2022

Extensions

Offset corrected by R. J. Mathar, Feb 22 2009
Edited by Michel Marcus, Apr 07 2023

A137352 Number of labeled graphs with at least one cycle in which every connected component has at most one cycle.

Original entry on oeis.org

1, 19, 317, 5592, 108839, 2356175, 56590729, 1499304898, 43532688017, 1376491137807, 47122376352941, 1737338689842008, 68657874376063231, 2896049933653455241, 129892644397271578571, 6173717934189145195530, 309998781844881257871161, 16399060640250318161199785
Offset: 3

Views

Author

Washington Bomfim, May 17 2008

Keywords

Examples

			a(6)=5592 because we have several cases of one unicyclic graph or two. Namely,
-One triangle and a forest of order 3. The unique triangle can be relabeled in C(6,3)=20 ways, we have 20*7= 140 graphs.
-One unicyclic graph with 4 nodes and a forest of order 2. The 15 distinct unicyclic graphs of 4 nodes can be relabeled in C(6,4) ways, so we have 2*15C(6,2), or 450 graphs.
-One unicyclic graph with 5 nodes and an isolated vertex. There are 222 different graphs that can be relabeled in C(6,5) ways, so 6 * 222 = 1332 graphs.
-One unicyclic graph with 6 nodes, so 3660 graphs.
-Two triangles. The triangles can be relabeled in C(6,3)/2 ways. So 10 graphs.
The total of all cases is 5592.
		

Crossrefs

Programs

  • Maple
    cy:= proc(n) option remember; local t; binomial(n-1, 2) *add ((n-3)! /(n-2-t)! *n^(n-2-t), t=1..n-2) end: T:= proc(n,k) option remember; local j; if k=0 then 1 elif k<0 or n add (T(n,k), k=0..n): a2:= proc(n) option remember; if n=0 then 1 else add (binomial (n-1, j) *(j+1)^(j-1) *a2(n-1-j), j=0..n-1) fi end: a:= n-> a1(n)-a2(n): seq (a(n), n=3..25); # Alois P. Heinz, Sep 15 2008
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Drop[Range[0,nn]!CoefficientList[Series[ Exp[Log[1/(1-t)]/2+t/2-3t^2/4]-Exp[t-t^2/2],{x,0,nn}],x],3]  (* Geoffrey Critzer, Mar 23 2013 *)

Formula

a(n) = A133686(n) - A001858(n).

Extensions

Corrected and extended by Alois P. Heinz, Sep 15 2008

A276031 Number of edges in the graded poset of the partitions of n taken modulo 3, where a partition into k parts is joined to a partition into k+1 parts if the latter is a refinement of the former.

Original entry on oeis.org

0, 1, 2, 5, 9, 14, 21, 30, 41, 54, 70, 89, 110, 135, 164, 195, 231, 272, 315, 364, 419, 476, 540, 611, 684, 765, 854, 945, 1045, 1154, 1265, 1386, 1517, 1650, 1794, 1949, 2106, 2275, 2456, 2639, 2835, 3044, 3255, 3480, 3719, 3960, 4216, 4487, 4760, 5049, 5354
Offset: 1

Views

Author

Caleb Ji, Aug 17 2016

Keywords

Examples

			a(6) = 14, the 14 edges are:  (111111) - (21111), (21111) - (1110), (21111) - (2211), (1110) - (111), (1110) - (210), (2211) - (111), (2211) - (210), (2211) - (222), (210) - (00), (210) - (21), (111) - (21), (222) - (21), (00) - (0), (21) - (0).
		

Crossrefs

Formula

G.f.: (x^6-2*x^5+x^4-x^3+2*x^2+1)*x^2/((x^2+x+1)^2*(x-1)^4). - Alois P. Heinz, Aug 27 2016

Extensions

More terms from Alois P. Heinz, Aug 27 2016
Showing 1-3 of 3 results.