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.

A004116 a(n) = floor((n^2 + 6n - 3)/4).

Original entry on oeis.org

1, 3, 6, 9, 13, 17, 22, 27, 33, 39, 46, 53, 61, 69, 78, 87, 97, 107, 118, 129, 141, 153, 166, 179, 193, 207, 222, 237, 253, 269, 286, 303, 321, 339, 358, 377, 397, 417, 438, 459
Offset: 1

Views

Author

Keywords

Comments

a(n)-3 is the maximal size of a regular triangulation of a prism over a regular n-gon.
Solution to a postage stamp problem with 2 denominations.
This sequence is half the degree of the denominator of a certain sequence of rational polynomials defined in the referenced paper by G. Alkauskas. Although this fact is not documented in the paper it can be verified by running the author's code and evaluating degree(denom(...)). - Stephen Crowley, Sep 18 2011
From Griffin N. Macris, Jul 19 2016: (Start)
Consider quadratic functions x^2+ax+b. Then a(n) is the number of these functions with 0 <= a+b < n, modulo changing x to x+c for a constant c.
For a(6)=17, four functions are excluded, because:
x^2 + 2x + 1 = (x+1)^2 + 0(x+1) + 0
x^2 + 2x + 2 = (x+1)^2 + 0(x+1) + 1
x^2 + 2x + 3 = (x+1)^2 + 0(x+1) + 2
x^2 + 3x + 2 = (x+1)^2 + 1(x+1) + 0 (End)

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Magma
    [Floor( (n^2 + 6*n - 3)/4 ) : n in [1..50]]; // Vincenzo Librandi, Sep 19 2011
  • Maple
    A004116:=(-1-z+z**3)/(z+1)/(z-1)**3; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[Floor[(n^2 + 6 n - 3)/4], {n, 40}] (* or *)
    LinearRecurrence[{2, 0, -2, 1}, {1, 3, 6, 9}, 40] (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    a(n)=(n^2+6*n-3)>>2
    

Formula

a(n) = floor((1/4)*n^2 + (3/2)*n + 1/4) - 1.
a(n) = (1/8)*(-1)^(n+1) - 7/8 + (3/2)*n + (1/4)*n^2.
From Ilya Gutkovskiy, Jul 20 2016: (Start)
O.g.f.: x*(1 + x - x^3)/((1 - x)^3*(1 + x)).
E.g.f.: (8 + sinh(x) - cosh(x) + (2*x^2 + 14*x - 7)*exp(x))/8.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = Sum_{k=0..n-1} A266977(k). (End)
Sum_{n>=1} 1/a(n) = 2 + tan(sqrt(13)*Pi/2)*Pi/sqrt(13) - cot(sqrt(3)*Pi)*Pi/(2*sqrt(3)). - Amiram Eldar, Aug 13 2022

A333416 Irregular triangle T read by rows: each row represents a finite (increasing) oscillation contained in the infinite (increasing) oscillation O.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 4, 2, 2, 4, 1, 3, 3, 1, 5, 2, 4, 2, 4, 1, 5, 3, 3, 1, 5, 2, 6, 4, 2, 4, 1, 6, 3, 5
Offset: 1

Views

Author

Stefano Spezia, Mar 24 2020

Keywords

Comments

The oscillations are bounded affine permutations. For the definition of a bounded affine permutation, see Definitions 1 and 2 in Madras and Troyka.
The infinite (increasing) oscillation O is described by the function f defined as f(s) = s - 4*(-1)^s - 2 with s in the set of integers, while the finite (increasing) oscillations are indecomposable permutations, i.e., that are not the sum of two permutations of nonzero size, and that are contained in O.
For each m >= 3, there are exactly two oscillations of size m: 312 and 231, 3142 and 2413, and so on (see p. 22 of Madras and Troyka).

Examples

			1
2  1
3  1  2
2  3  1
3  1  4  2
2  4  1  3
3  1  5  2  4
2  4  1  5  3
3  1  5  2  6  4
2  4  1  6  3  5
		

Crossrefs

Cf. A000142, A266977, A158478, A333616 (row sums).

Formula

T(n, 1) = A158478(n).

A270059 Number of distinct digits needed to write n in all bases >= 2.

Original entry on oeis.org

1, 1, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34
Offset: 0

Views

Author

Gionata Neri, Mar 09 2016

Keywords

Examples

			4 written in all bases 2,3,4,5,6,7,... is 100,11,10,4,4,4,... and the distinct digits needed are 0, 1 and 4, so a(4) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union@ Flatten@ Map[IntegerDigits[n, #] &, Range[2, n + 1]] /. {} -> {0}], {n, 0, 120}] (* or *)
    Table[Length[Union@ Flatten@ Map[IntegerDigits[n, #] &, Range[2, n + 1]] /. {} -> {0}], {n, 0, 2}]~Join~Table[Floor[(n + 3)/2], {n, 3, 120}] (* or *)
    CoefficientList[Series[1 + (x (1 + 2 x - x^2 - 2 x^3 + x^4))/((-1 + x)^2 (1 + x)), {x, 0, 120}], x] (* Michael De Vlieger, Mar 09 2016 *)
  • PARI
    a(n) = {if (n <= 1, 1, v = []; for (b=2, n+1, v = vecsort(concat(v, digits(n, b)),,8)); #v;);} \\ Michel Marcus, Mar 09 2016

Formula

For n >= 3, a(n) = floor((n + 3)/2).
G.f.: 1 + (x*(1 + 2*x - x^2 - 2*x^3 + x^4))/((-1 + x)^2*(1 + x)). - Michael De Vlieger, Mar 09 2016
Showing 1-3 of 3 results.