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.

A257143 a(2*n) = 3*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1.

Original entry on oeis.org

1, 1, 3, 3, 6, 5, 9, 7, 12, 9, 15, 11, 18, 13, 21, 15, 24, 17, 27, 19, 30, 21, 33, 23, 36, 25, 39, 27, 42, 29, 45, 31, 48, 33, 51, 35, 54, 37, 57, 39, 60, 41, 63, 43, 66, 45, 69, 47, 72, 49, 75, 51, 78, 53, 81, 55, 84, 57, 87, 59, 90, 61, 93, 63, 96, 65, 99
Offset: 0

Views

Author

Michael Somos, Apr 16 2015

Keywords

Examples

			G.f. = 1 + x + 3*x^2 + 3*x^3 + 6*x^4 + 5*x^5 + 9*x^6 + 7*x^7 + 12*x^8 + ...
		

Crossrefs

Cf. A080512, A111711 (partial sums), A188626.

Programs

  • Haskell
    import Data.List (transpose)
    a257143 n = a257143_list !! n
    a257143_list = concat $ transpose [a008486_list, a005408_list]
    -- Reinhard Zumkeller, Apr 17 2015
  • Mathematica
    a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 3 n/2];
    a[ n_] := SeriesCoefficient[ (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
  • PARI
    {a(n) = if( n<1, n==0, n%2, n, 3*n/2)};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x^5) / ((1 - x) * (1 - x^2)^2) + x * O(x^n), n))};
    

Formula

a(n) is multiplicative with a(2^e) = 3 * 2^(e-1) if e>0, a(p^e) = p^e otherwise and a(0) = 1.
Euler transform of length 5 sequence [ 1, 2, 0, 0, -1].
G.f.: (1 - x^5) / ((1 - x) * (1 - x^2)^2).
G.f.: (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4).
a(n) = A080512(n) if n>0.
First difference of A111711.
A188626(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n.
From Amiram Eldar, Jan 03 2023: (Start)
Dirichlet g.f.: zeta(s-1)*(1+1/2^s).
Sum_{k=1..n} a(k) ~ (5/8) * n^2. (End)

A340228 a(n) is the sum of the lengths of all the segments used to draw a rectangle of height 2^(n-1) and width n divided into 2^(n-1) rectangles of unit height, in turn, divided into rectangles of unit height and lengths corresponding to the parts of the compositions of n.

Original entry on oeis.org

4, 11, 27, 64, 149, 342, 775, 1736, 3849, 8458, 18443, 39948, 86029, 184334, 393231, 835600, 1769489, 3735570, 7864339, 16515092, 34603029, 72351766, 150994967, 314572824, 654311449, 1358954522, 2818572315, 5838471196, 12079595549, 24964497438, 51539607583, 106300440608
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2021

Keywords

Examples

			Illustrations for n = 1..4:
      _           _ _
     |_|         |_ _|
                 |_|_|
  a(1) = 4     a(2) = 11
    _ _ _       _ _ _ _
   |_ _ _|     |_ _ _ _|
   |_ _|_|     |_ _ _|_|
   |_|_ _|     |_|_ _ _|
   |_|_|_|     |_ _|_ _|
               |_ _|_|_|
               |_|_ _|_|
               |_|_|_ _|
               |_|_|_|_|
  a(3) = 27    a(4) = 64
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6,-13,12,-4},{4,11,27,64},32]

Formula

O.g.f.: x*(4 - 13*x + 13*x^2 - 3*x^3)/(1 - 3*x + 2*x^2)^2.
E.g.f.: (exp(2*x)*(3 + 6*x) + 4*x*exp(x) - 3)/4.
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4) for n > 4.
a(n) = n + 3*(n + 1)*2^(n-2).
a(n) = A001792(n) + A188626(n).
a(n) = A045623(n) + A215149(n).
a(n) = A006127(n) + A053220(n).
Showing 1-2 of 2 results.