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.

A001859 Triangular numbers plus quarter-squares: n*(n+1)/2 + floor((n+1)^2/4) (i.e., A000217(n) + A002620(n+1)).

Original entry on oeis.org

0, 2, 5, 10, 16, 24, 33, 44, 56, 70, 85, 102, 120, 140, 161, 184, 208, 234, 261, 290, 320, 352, 385, 420, 456, 494, 533, 574, 616, 660, 705, 752, 800, 850, 901, 954, 1008, 1064, 1121, 1180, 1240, 1302, 1365, 1430, 1496, 1564, 1633, 1704, 1776, 1850, 1925
Offset: 0

Views

Author

Keywords

Comments

Number of series-reduced planted trees with n+7 nodes and 3 internal nodes.
The trees enumerated with 3 internal nodes are of two types. Those with all internal nodes at different heights are enumerated by the triangular numbers. Those with two internal nodes at the same height are enumerated by the quarter squares. - Michael Somos, May 19 2000
Number of pairs (x,y) with x in {0,...,n}, y even in {0,...,2n}, and x < y. - Clark Kimberling, Jul 02 2012

Examples

			For n=1 we find 2 planted trees with 8 nodes, 3 of which are internal (i) and 5 are endpoints (e):
.e...e...e...e....e...e....
...i.......i........i...e..
.......i..............i...e
.......e................i..
........................e..
G.f. = 2*x + 5*x^2 + 10*x^3 + 16*x^4 + 24*x^5 + 33*x^6 + 44*x^7 + 56*x^8 + ...
		

References

  • John Riordan, personal communication.
  • 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

First differences of A045947.
Antidiagonal sums of array A003984.
Cf. A185212 (odd terms).

Programs

  • Haskell
    a001859 n = a000217 n + a002620 (n + 1)  -- Reinhard Zumkeller, Dec 20 2012
  • Maple
    A001859:=(-1-z^2-2*z^3+z^4)/(z+1)/(z-1)^3; # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence with an additional leading 1
    with (combinat):seq(count(Partition((3*n+2)), size=3), n=0..50); # Zerinvary Lajos, Mar 28 2008
  • Mathematica
    With[{nn=60},Total/@Thread[{Accumulate[Range[0,nn]],Floor[Range[ nn+1]^2/4]}]] (* or *) LinearRecurrence[{2,0,-2,1},{0,2,5,10},60] (* Harvey P. Dale, Apr 01 2012 *)
  • PARI
    {a(n) = n + (3*n^2 + 1) \ 4};
    

Formula

a(n) = A000217(n)+A002620(n+1).
a(n) = n + floor( (3n^2+1)/4 ).
G.f.: (2*x+x^2)/((1-x)^2*(1-x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + 3 = A002378(n) - A002620(n) = A006578(n-1) + A004526(n+1) - Henry Bottomley, Mar 08 2000
a(n) = A006578(-1-n) for all n in Z. - Michael Somos, May 10 2006
From Mitch Harris, Aug 22 2006: (Start)
a(n) = (6n^2 + 8n + 1 - (-1)^n)/8;
a(n) = Sum_{k=0..n} max(k, n-k). (End)
Starting (2, 5, 10, 16, 24, ...), = binomial transform of [2, 3, 2, -1, 2, -4, 8, -16, 32, ...]. - Gary W. Adamson, Nov 30 2007
a(0)=0, a(1)=2, a(2)=5, a(3)=10, a(n) = 2*a(n-1) + 0*a(n-2) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Apr 01 2012
a(n) = 3*n*(n+1)/2 - A006578(n). - Clark Kimberling, Jul 02 2012
a(2*n) = A045944(n), a(2*n - 1) = A049450(n) for all n in Z. - Michael Somos, Nov 03 2014
0 = -6 + a(n) - 2*a(n+2) + a(n+4) for all n in Z. - Michael Somos, Nov 03 2014
0 = a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(-3 - a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Nov 03 2014
a(n) = Sum_{k=1..n} floor((n+k+2)/2). - Wesley Ivan Hurt, Mar 31 2017
Sum_{n>=1} 1/a(n) = 3/4 - Pi/(4*sqrt(3)) + 3*log(3)/4. - Amiram Eldar, May 28 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x))/4. - Stefano Spezia, Aug 22 2023

Extensions

Entry improved by Michael Somos

A057670 a(n) = Sum_{k|n} lcm(k, n/k).

Original entry on oeis.org

1, 4, 6, 10, 10, 24, 14, 24, 21, 40, 22, 60, 26, 56, 60, 52, 34, 84, 38, 100, 84, 88, 46, 144, 55, 104, 72, 140, 58, 240, 62, 112, 132, 136, 140, 210, 74, 152, 156, 240, 82, 336, 86, 220, 210, 184, 94, 312, 105, 220, 204, 260, 106, 288, 220, 336, 228, 232, 118, 600
Offset: 1

Views

Author

Leroy Quet, Oct 18 2000

Keywords

Examples

			a(8) = lcm(1,8) + lcm(2,4) + lcm(4,2) + lcm(8,1) = 8 + 4 + 4 + 8 = 24.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, LCM[#, n/#] &], {n, 59}] (* Michael De Vlieger, Dec 11 2017 *)
    f[p_, e_] := (2*p^(e + 1) - p^Ceiling[(e + 1)/2] - p^Floor[(e + 1)/2])/(p - 1); f[p_, 1] := 2*p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    a(n) = sumdiv(n, d, lcm(d, n/d)); \\ Michel Marcus, May 19 2014

Formula

Multiplicative with a(p) = 2*p, a(p^k) = (2*p^(k+1) - p^ceiling((k+1)/2) - p^floor((k+1)/2)) / (p-1). a(n) is odd iff n is an odd square. - Henry Bottomley, May 16 2005
Multiplicative with a(p^e) = Sum_{k=0..e} p^max(k, e-k), (cf. A107661). - Mitch Harris, May 18 2005
Dirichlet g.f.: (zeta(s-1))^2*zeta(2s-1)/zeta(2s-2). - R. J. Mathar, Feb 11 2011
Sum_{k=1..n} a(k) ~ 3*zeta(3)*n^2 / (2*Pi^2) * (2*log(n) - 24*zeta'(2)/Pi^2 - 1 + 4*gamma + 4*zeta'(3)/zeta(3)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 01 2019

A107660 Sum 3^max(k,n-k),k=0..n.

Original entry on oeis.org

1, 6, 21, 72, 225, 702, 2133, 6480, 19521, 58806, 176661, 530712, 1592865, 4780782, 14344533, 43040160, 129127041, 387400806, 1162222101, 3486725352, 10460235105, 31380882462, 94142824533, 282429005040, 847287546561
Offset: 0

Views

Author

Keywords

Comments

Third column of A107661.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 3 x) / ((1 - 3 x) (1 - 3 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 17 2013 *)

Formula

G.f.: (1+3*x)/((1-3*x)*(1-3*x^2)).
a(2n) = 3^(2n+1) - 2*3^n; a(2n+1) = 9^(n+1) - 3^(n+1).
a(n) = A167993(n+2) + 3*A167993(n+1). - R. J. Mathar, Aug 16 2013
Showing 1-3 of 3 results.