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

A004050 Numbers of the form 2^j + 3^k, for j and k >= 0.

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 10, 11, 13, 17, 19, 25, 28, 29, 31, 33, 35, 41, 43, 59, 65, 67, 73, 82, 83, 85, 89, 91, 97, 113, 129, 131, 137, 145, 155, 209, 244, 245, 247, 251, 257, 259, 265, 275, 283, 307, 337, 371, 499, 513, 515, 521, 539, 593, 730, 731, 733, 737, 745, 755
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A226806-A226832 (cases to 8^j + 9^k).
Cf. A004051 (primes), A000079, A000243.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a004050 n = a004050_list !! (n-1)
    a004050_list = f 1 $ singleton (2, 1, 1) where
       f x s = if y /= x then y : f y s'' else f x s''
               where s'' = insert (u * 2 + v, u * 2, v) $
                           insert (u + 3 * v, u, 3 * v) s'
                     ((y, u, v), s') = deleteFindMin s
    -- Reinhard Zumkeller, May 20 2015
    
  • Maple
    lincom:=proc(a,b,n) local i,j,s,m; s:={}; for i from 0 to n do for j from 0 to n do m:=a^i+b^j; if m<=n then s:={op(s),m} fi od; od; lprint(sort([op(s)])); end: lincom(2,3,760); # Zerinvary Lajos, Feb 24 2007
  • Mathematica
    mx = 760; s = Union@ Flatten@ Table[2^i + 3^j, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx - 2^i]}] (* Robert G. Wilson v, Sep 19 2012 *)
  • PARI
    ispow2(n)=n>>valuation(N,2)==1
    is(n)=my(k); if(n%2, if(n<3, return(0)); for(k=0,logint(n-2,3), if(ispow2(n-3^k), return(1))); 0, ispower(n-1,,&k); k==3 || n==2 || n==4) \\ Charles R Greathouse IV, Aug 29 2016
    
  • Python
    def aupto(lim):
        s, pow3 = set(), 1
        while pow3 < lim:
            for j in range((lim-pow3).bit_length()):
                s.add(2**j + pow3)
            pow3 *= 3
        return sorted(set(s))
    print(aupto(756)) # Michael S. Branicky, Jul 29 2021

Formula

There are log^2 x/(log 2 log 3) + O(log x) terms up to x. Bounds on the error term can be made explicit. - Charles R Greathouse IV, Oct 28 2022

Extensions

More terms from Sascha Kurz, Jan 02 2003

A034799 Triangle read by rows: T(n,k) is the number of partially labeled trees with n nodes, k of which are labeled, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 4, 9, 16, 16, 3, 9, 26, 67, 125, 125, 6, 20, 75, 251, 680, 1296, 1296, 11, 48, 214, 888, 3135, 8716, 16807, 16807, 23, 115, 612, 3023, 13155, 47787, 134960, 262144, 262144, 47, 286, 1747, 10038, 51873, 232154, 858578, 2450309, 4782969, 4782969
Offset: 0

Views

Author

Keywords

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1, 1;
  1, 2, 3, 3;
  2, 4, 9, 16, 16;
  ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, p. 138.

Crossrefs

Formula

Reference gives generating function.
E.g.f.: r(x,y) - (1/2)*r(x,y)^2 + (1/2)*r(x^2) where r(x,y) is the e.g.f. for A008295 and r(x) is the o.g.f. for A000081. - Sean A. Irvine, Sep 04 2020

Extensions

More terms from Sean A. Irvine, Sep 04 2020
Name edited by Andrew Howroyd, Mar 23 2023

A303833 Birooted trees: number of unlabeled trees with n nodes rooted at 2 indistinguishable roots.

Original entry on oeis.org

0, 1, 2, 6, 15, 43, 116, 329, 918, 2609, 7391, 21099, 60248, 172683, 495509, 1424937, 4102693, 11830006, 34148859, 98686001, 285459772, 826473782, 2394774727, 6944343654, 20151175658, 58513084011, 170007600051, 494230862633
Offset: 1

Views

Author

R. J. Mathar, Brendan McKay, May 01 2018

Keywords

Crossrefs

Subsets of graphs in A303831. Cf. A000243 (distinguishable roots), A000055 (not rooted).
Third column of A294783.

Programs

  • Maple
    a000081 := [1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, 12486, 32973, 87811, 235381, 634847, 1721159, 4688676, 12826228, 35221832, 97055181, 268282855, 743724984, 2067174645, 5759636510, 16083734329, 45007066269, 126186554308, 354426847597] ;
    g81 := add( op(i,a000081)*x^i,i=1..nops(a000081) ) ;
    g := 0 ;
    nmax := nops(a000081) ;
    for m from 0 to nmax do
        mhalf := floor(m/2) ;
        ghalf := g81^(mhalf+1) ;
        gcyc := (ghalf^2+subs(x=x^2,ghalf))/2 ;
        if type(m,odd) then
            gcyc := gcyc*g81 ;
        end if;
        g := g+gcyc ;
    end do:
    taylor(g,x=0,nmax) ;
    gfun[seriestolist](%) ; # R. J. Mathar, May 01 2018
  • PARI
    TreeGf is A000081 as g.f.
    TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(t=TreeGf(n), t2=subst(t,x,x^2)+O(x*x^n)); Vec((2*t^2-1)/(1-t) + (1+t)/(1-t2), -n)/2} \\ Andrew Howroyd, Dec 04 2020

Formula

G.f.: [g81(x)^2/{1-g81(x)} +(1+g81(x))*g81(x^2)/{1-g81(x^2)}] /2 = [ g243(x) +(1+g81(x))*g107(x^2)]/2, where g81 is the g.f. of A000081, g243 the g.f. of A000243 and g107 the g.f. of A000107. - R. J. Mathar, May 02 2018
a(n) = A027852(n) + A304067(n). - Brendan McKay, May 05 2018
a(n) = A303840(n+2) - A000081(n). - Andrew Howroyd, Dec 04 2020

A255884 Expansion of exp( Sum_{n >= 1} A002438(n)*x^n/n ).

Original entry on oeis.org

1, 5, 115, 7955, 1179715, 304888655, 121350927565, 68751844662605, 52528700295424915, 52031089992310711055, 64835758857480094584265, 99249388572274155967996505, 183075972804988649078529524365, 400493686169423616676960341062705, 1025151296160300228944197705742007715
Offset: 0

Views

Author

Peter Bala, Mar 09 2015

Keywords

Comments

A002438(n+1) =(-1)^n*6^(2*n)*E(2*n,1/6), where E(n,x) denotes the n-th Euler polynomial. In general it appears that when k is a nonzero integer, the expansion of exp( Sum_{n >= 1} k^(2*n)*E(2*n,1/k)*(-x)^n/n ) has (positive) integer coefficients. See A255881 (k = 2), A255882(k = 3) and A255883 (k = 4).

Crossrefs

Programs

  • Maple
    #A255884
    k := 6:
    exp(add(k^(2*n)*euler(2*n, 1/k)*(-x)^n/n, n = 1 .. 14)): seq(coeftayl(%, x = 0, n), n = 0 .. 14);
  • Mathematica
    A000243[n_]:= (1 + 9^(n - 1))*Abs[EulerE[2*(n - 1)]]/2; a:= With[{nmax = 75}, CoefficientList[Series[Exp[Sum[A000243[k + 1]*x^(k)/(k), {k, 1, 85}]], {x, 0, nmax}], x]]; Table[a[[n]], {n, 1, 50}] (* G. C. Greubel, Aug 26 2018 *)

Formula

O.g.f.: exp( 5*x + 205*x^2/2 + 22265*x^3/3 + 4544185 *x^4/4 + ... ) = 1 + 5*x + 115*x^2 + 7955*x^3 + 1179715*x^4 + ....
a(0) = 1 and for n >= 1, n*a(n) = Sum_{k = 1..n} (-1)^k*6^(2*k)*E(2*k,1/6)*a(n-k).
a(n) ~ 2^(4*n + 2) * 3^(2*n) * n^(2*n - 1/2) / (exp(2*n) * Pi^(2*n + 1/2)). - Vaclav Kotesovec, Jun 08 2019

A304489 Triangle read by rows: T(n,k) = number of rooted signed trees with n nodes and k positive edges (0 <= k < n).

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 9, 9, 4, 9, 26, 37, 26, 9, 20, 75, 134, 134, 75, 20, 48, 214, 469, 596, 469, 214, 48, 115, 612, 1577, 2445, 2445, 1577, 612, 115, 286, 1747, 5204, 9480, 11513, 9480, 5204, 1747, 286, 719, 4995, 16865, 35357, 50363, 50363, 35357, 16865, 4995, 719
Offset: 1

Views

Author

Andrew Howroyd, May 13 2018

Keywords

Comments

Equivalently, the number of rooted trees with 2-colored non-root nodes, n nodes and k nodes of the first color.

Examples

			Triangle begins:
    1;
    1,    1;
    2,    3,    2;
    4,    9,    9,    4;
    9,   26,   37,   26,     9;
   20,   75,  134,  134,    75,   20;
   48,  214,  469,  596,   469,  214,   48;
  115,  612, 1577, 2445,  2445, 1577,  612,  115;
  286, 1747, 5204, 9480, 11513, 9480, 5204, 1747, 286;
  ...
		

Crossrefs

Row sums are A000151.
Columns k=0..1 are A000081, A000243.

Programs

  • PARI
    R(n, y)={my(v=vector(n)); v[1]=1; for(k=1, n-1, my(p=(1+y)*v[k]); my(q=Vec(prod(j=0, poldegree(p, y), (1/(1-x*y^j) + O(x*x^(n\k)))^polcoeff(p, j)))); v=vector(n, j, v[j] + sum(i=1, (j-1)\k, v[j-i*k] * q[i+1]))); v; }
    { my(A=R(10,y)); for(n=1, #A, print(Vecrev(A[n]))) }
    
  • PARI
    EulerMT(u)={my(n=#u, p=x*Ser(u), vars=variables(p)); Vec(exp( sum(i=1, n, substvec(p + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i ))-1)}
    R(n, y)={my(v=[1]); for(k=2,n,v=concat([1], EulerMT(v*(1+y)))); v}
    { my(A=R(10,y)); for(n=1, #A, print(Vecrev(A[n]))) }

A000269 Number of trees with n nodes, 3 of which are labeled.

Original entry on oeis.org

3, 16, 67, 251, 888, 3023, 10038, 32722, 105228, 334836, 1056611, 3311784, 10322791, 32026810, 98974177, 304835956, 936147219, 2867586542, 8764280567, 26733395986, 81399821915, 247459136331, 751211286356, 2277496842016
Offset: 3

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=3 of A034799.

Programs

  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[ b[k]*x^k, {k, 1, n}]; a[n_] := SeriesCoefficient[ B[n-1]^3 * (2*B[n-1]-3) / (B[n-1]-1)^3, {x, 0, n}]; Table[a[n], {n, 3, 30}] (* Jean-François Alcover, Jan 27 2015 *)

Formula

G.f.: A(x) = B(x)^3*(3-2*B(x))/(1-B(x))^3, where B(x) is g.f. for rooted trees with n nodes, cf. A000081. - Vladeta Jovovic, Oct 19 2001
a(n) = A000524(n) - 2*A000243(n).

Extensions

More terms, new description and formula from Christian G. Bower, Nov 15 1999

A304068 Number of trees on n vertices rooted at an oriented non-edge.

Original entry on oeis.org

0, 0, 1, 4, 14, 45, 140, 424, 1269, 3760, 11080, 32517, 95190, 278154, 811887, 2367973, 6903453, 20120905, 58639016, 170894228, 498084608, 1451899005, 4232957241, 12343454790, 36001675800, 105028397290, 306472665459, 894497511566
Offset: 1

Views

Author

Brendan McKay, May 05 2018

Keywords

Examples

			a(4)=4 is based on the same examples as in A304067, but the oriented edge that spans a leaf with the node at distance 2 in the linear graph may have 2 orientations, so a(4) is one larger than A304067(4).
		

Crossrefs

Cf. A000055 (not rooted), A000106 (rooted at oriented edge)

Formula

A000106(n) + a(n) = A000243(n).

A280784 Triangle read by rows: numbers of nonintersecting circles with one of them marked.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 13, 9, 3, 1, 35, 26, 10, 3, 1, 95, 75, 30, 10, 3, 1, 262, 214, 91, 31, 10, 3, 1, 727, 612, 268, 95, 31, 10, 3, 1, 2033, 1747, 790, 284, 96, 31, 10, 3, 1, 5714, 4995, 2308, 848, 288, 96, 31, 10, 3, 1, 16136, 14294, 6737, 2506, 864, 289, 96, 31, 10, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jan 20 2017

Keywords

Examples

			Triangle begins:
1,
2,1,
5,3,1,
13,9,3,1,
35,26,10,3,1,
95,75,30,10,3,1,
262,214,91,31,10,3,1,
727,612,268,95,31,10,3,1,
2033,1747,790,284,96,31,10,3,1,
...
		

Crossrefs

Rows sums are A000243.
Showing 1-8 of 8 results.