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

A152467 a(n) = floor(n/6).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14
Offset: 0

Views

Author

Keywords

Comments

Apart from initial terms, same as A097992. - Philippe Deléham, Dec 06 2008
From Michel Lagneau, Apr 11 2025: (Start)
Consider the polynomial P(n,z)=(z+1)^n = z*Q(n,z)+1. The sequence 2*a(n) lists the numbers of zeros of Q(n,z) strictly inside the unit circle.
Proof:
The roots of the equation (z+1)^n=1 are:
z_k = exp(2*Pi*i*k/n)-1 for k=0,1,...,n-1. These are n complex roots regularly distributed around the unit circle, translated by -1.
We see how many of these values have a modulus >1.
e^2*Pi*i*k/n are the n-th roots of unity, all of which lie on the unit circle (with modulus 1).
By subtracting 1: z_k = e^2*Pi*i*k/n - 1, we move the unit circle to the center -1.
The z_k are distributed around the circle centered at -1, and we find how many are at a distance >1 from the center (0,0). Let z_k=e^2*Pi*i*k/n, then let Z_k = z_k - 1.
So, abs(Z_k) = abs(z_k - 1) =abs(e^2*i*Pi*k/n) = 2*abs(sin(Pi*k)/n).
So we are looking for the integers k in {1,2,...,n-1} such that:
2*abs(sin(Pi*k/n))>1 =>abs(sin(Pi*k/n))<1/2.
We know the values of sin: abs(sin(teta))<1/2 => teta in {0,Pi/6} union {5*Pi/6,Pi}. So Pi*k/n < Pi/6 => k 5*Pi/6 => k >5*n/6. Conclusion for each n, the number of roots strictly in the unit circle is 2*E[n/6]. (End)

Crossrefs

Cf. A097992.

Programs

Formula

From R. J. Mathar and Philippe Deléham, Dec 06 2008: (Start)
a(n) = floor(n/6) = a(n-6) + 1.
G.f.: x^6/((1-x)^2*(1+x)*(1+x+x^2)*(x^2-x+1)). (End)
a(n) = (6*n - 15 + 3*(-1)^n + 12*sin( (2*n+1)*Pi/6 ) + 4*sqrt(3)*sin( (2n+1)*Pi/3) )/36.
a(n) = floor( (3*n-2)/2 - (4*n-3)/3 ). - Robert G. Wilson v, Jun 04 2011
E.g.f.: (6*cos(sqrt(3)*x/2)*cosh(x/2) + 3*(x - 2)*cosh(x) + 2*sqrt(3)*sin(sqrt(3)*x/2)*(2*cosh(x/2) + sinh(x/2)) + 3*(x - 3)*sinh(x))/18. - Stefano Spezia, Nov 13 2022

A265890 Array read by ascending antidiagonals: A(n,k) = A099563(A265609(n,k)), with n as row >= 0, k as column >= 0; the most significant digit in the factorial base representation of rising factorial n^(k) = (n+k-1)!/(n-1)!.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 19 2015

Keywords

Comments

Square array A(row,col) is read by ascending antidiagonals as: A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), A(3,0), A(2,1), A(1,2), A(0,3), ...
A265609(n,k) is the rising factorial, also known as Pochhammer symbol and A099563(n) is the most significant "digit" (place holder) in the factorial representation (A007623) of n.

Examples

			The top left corner of the array A265609 with its terms shown in factorial base (A007623) looks like this:
1,   0,    0,     0,       0,        0,         0,          0,           0
1,   1,   10,   100,    1000,    10000,    100000,    1000000,    10000000
1,  10,  100,  1000,   10000,   100000,   1000000,   10000000,   100000000
1,  11,  200,  2200,   30000,   330000,   4000000,   44000000,   500000000
1,  20,  310, 10000,  110000,  1220000,  14000000,  160000000,  1830000000
1,  21, 1100, 13300,  220000,  3000000,  36000000,  452000000,  5500000000
1, 100, 1300, 24000,  411000,  6000000,  82000000, 1100000000, 13300000000
1, 101, 2110, 41000, 1000000, 13000000, 174000000, 2374000000, 30360000000
-
Taking the most significant "digit" (placeholder that may get arbitrarily large values) gives us the top left corner of this array:
-
1, 0, 0, 0, 0, 0, 0, 0,  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
1, 1, 1, 1, 1, 1, 1, 1,  1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
1, 1, 1, 1, 1, 1, 1, 1,  1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
1, 1, 2, 2, 3, 3, 4, 4,  5, 5,  6,  6,  7,  7,  8,  8,  9,  9, 10, 10, 11
1, 2, 3, 1, 1, 1, 1, 1,  1, 2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  3
1, 2, 1, 1, 2, 3, 3, 4,  5, 6,  7,  8, 10, 11, 12, 14, 15, 17, 19, 21,  1
1, 1, 1, 2, 4, 6, 8, 1,  1, 1,  1,  2,  2,  2,  2,  3,  3,  3,  4,  4,  5
1, 1, 2, 4, 1, 1, 1, 2,  3, 3,  4,  5,  6,  8,  9, 11, 12, 14, 16, 19, 21
1, 1, 3, 1, 1, 2, 3, 4,  6, 8, 11, 14,  1,  1,  1,  1,  2,  2,  2,  3,  3
1, 1, 3, 1, 2, 3, 5, 8,  1, 1,  1,  2,  2,  3,  4,  5,  6,  7,  8, 10, 12
1, 1, 4, 1, 3, 5, 9, 1,  2, 2,  3,  5,  6,  8, 11, 14, 17, 21,  1,  1,  1
1, 1, 1, 2, 4, 8, 1, 2,  3, 5,  7, 10, 14,  1,  1,  1,  2,  2,  3,  3,  4
1, 2, 1, 3, 6, 1, 2, 4,  6, 9, 14,  1,  1,  2,  3,  4,  5,  6,  8, 10, 13
1, 2, 1, 3, 1, 2, 3, 6, 10, 1,  1,  2,  3,  5,  6,  9, 12, 16, 21,  1,  1
1, 2, 1, 4, 1, 2, 5, 9,  1, 2,  3,  4,  7, 10, 14, 20,  1,  1,  2,  2,  3
1, 2, 2, 5, 1, 3, 7, 1,  2, 3,  5,  8, 13,  1,  1,  1,  2,  3,  4,  6,  8
...
		

Crossrefs

Column 1: A099563.
Row 0: A000007, rows 1 & 2: A000012, row 3: A008619 (see comment in A001710).
Row 4: 1,2,3 followed by A097992 ?
Main diagonal: A265891 (essentially, without the initial 1 from the corner of this array).
Cf. also array A265892.

Programs

A246720 Number A(n,k) of partitions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Sep 02 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1,  1, ...
  0, 1, 0, 1, 0, 1, 0, 1, 0, 0,  1, 1, 0, 0,  1, ...
  0, 1, 1, 2, 0, 1, 0, 1, 1, 0,  2, 1, 1, 0,  2, ...
  0, 1, 0, 2, 1, 2, 0, 1, 1, 0,  3, 1, 0, 0,  2, ...
  0, 1, 1, 3, 0, 2, 1, 2, 1, 0,  4, 1, 2, 0,  4, ...
  0, 1, 0, 3, 0, 2, 0, 2, 1, 1,  5, 2, 0, 0,  4, ...
  0, 1, 1, 4, 1, 3, 0, 2, 2, 0,  7, 2, 2, 1,  6, ...
  0, 1, 0, 4, 0, 3, 0, 2, 1, 0,  8, 2, 0, 0,  6, ...
  0, 1, 1, 5, 0, 3, 1, 3, 2, 0, 10, 2, 3, 0,  9, ...
  0, 1, 0, 5, 1, 4, 0, 3, 2, 0, 12, 2, 0, 0,  9, ...
  0, 1, 1, 6, 0, 4, 0, 3, 2, 1, 14, 3, 3, 0, 12, ...
		

Crossrefs

Main diagonal gives A246721.
Cf. A246688, A246690 (the same for compositions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1, `if`(l=[], 0,
          add(g(n-l[-1]*j, subsop(-1=NULL, l)), j=0..n/l[-1])))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..16);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i > n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[ n >= Length[l], l = Join[l, b[i, 1]]; i++ ]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n == 0, 1, If[l == {}, 0, Sum[g[n - l[[-1]] j, ReplacePart[l, -1 -> Nothing]], {j, 0, n/l[[-1]]}]]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 16}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A081753 a(n) = floor(n/12) if n == 2 (mod 12); a(n) = floor(n/12) + 1 otherwise.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Benoit Cloitre, Apr 08 2003

Keywords

Comments

a(2n) = dimension of M(2n), where M(2n) denotes the complex vector space of modular forms of weight 2n for the group : PSL2(Z). dimension of M(2n+1) = 0.
See A103221(n) for the dimension of M(2n). The Apostol reference, p. 119, eq. (9) uses even k. - Wolfdieter Lang, Sep 16 2016
The space of modular forms is generated by E_4 (A004009) and E_6 (A013973) both of even weight. This is why the space of modular forms of odd weight is trivial. - Michael Somos, Dec 11 2018

Examples

			G.f. = 1 + x + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + 2*x^12 + ... - _Michael Somos_, Dec 11 2018
		

References

  • Apostol, Tom M., Modular Functions and Dirichlet Series in Number Theory, second edition, Springer, 1990.
  • Yves Hellegouarch, "Invitation aux mathématiques de Fermat-Wiles", Dunod, 2ème édition, p. 285

Crossrefs

Programs

  • Maple
    seq(floor(n/12)+1-charfcn[0](n-2 mod 12), n=0..100); # Robert Israel, Sep 16 2016
  • Mathematica
    Table[If[Mod[n, 12] == 2, Floor[n/12], Floor[n/12] + 1], {n, 0, 120}] (* or *)
    CoefficientList[Series[(1 - x^2 + x^3)/(1 - x - x^12 + x^13), {x, 0, 120}], x] (* Michael De Vlieger, Sep 19 2016 *)
    a[ n_] := Quotient[n, 12] + Boole[Mod[n, 12] != 2]; (* Michael Somos, Dec 11 2018 *)
  • PARI
    a(k) = if(k%12-2, floor(k/12)+1, floor(k/12))
    
  • PARI
    {a(n) = n\12 + (n%12!=2)}; /* Michael Somos, Dec 11 2018 */

Formula

a(n) = floor(n/12) if n == 2 (mod 12); a(n) = floor(n/12) + 1 otherwise.
G.f.: (1-x^2+x^3)/(1-x-x^12+x^13). - Robert Israel, Sep 16 2016
a(2*n) = A008615(n+2), a(2*n+1) = A097992(n). - Michael Somos, Dec 11 2018

A348388 Irregular triangle read by rows: T(n, k) = floor((n-k)/k), for k = 1, 2, ..., floor(n/2) and n >= 2.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 5, 2, 1, 6, 2, 1, 7, 3, 1, 1, 8, 3, 2, 1, 9, 4, 2, 1, 1, 10, 4, 2, 1, 1, 11, 5, 3, 2, 1, 1, 12, 5, 3, 2, 1, 1, 13, 6, 3, 2, 1, 1, 1, 14, 6, 4, 2, 2, 1, 1, 15, 7, 4, 3, 2, 1, 1, 1, 16, 7, 4, 3, 2, 1, 1, 1, 17, 8, 5, 3, 2, 2, 1, 1, 1, 18, 8, 5, 3, 2, 2, 1, 1, 1, 19, 9, 5, 4, 3, 2, 1, 1, 1, 1
Offset: 2

Views

Author

Wolfdieter Lang, Oct 31 2021

Keywords

Comments

This irregular triangle T(n, k) gives the number of multiples of number k, larger than k and not exceeding n, for k = 1, 2, ..., floor(n/2), for n >= 2. See A348389 for the array of these multiples.
The length of row n is floor(n/2) = A004526(n), for n >= 2.
The row sums give A002541(n). See the formula given there by Wesley Ivan Hurt, May 08 2016.
The columns give the k-fold repeated positive integers k, for k >= 1.

Examples

			The irregular triangle T(n, k) begins:
n\k   1 2 3 4 5 6 7 8 9 10 ...
------------------------------
2:    1
3:    2
4:    3 1
5:    4 1
6:    5 2 1
7:    6 2 1
8:    7 3 1 1
9:    8 3 2 1
10:   9 4 2 1 1
11:  10 4 2 1 1
12:  11 5 3 2 1 1
13:  12 5 3 2 1 1
14:  13 6 3 2 1 1 1
15:  14 6 4 2 2 1 1
16:  15 7 4 3 2 1 1 1
17:  16 7 4 3 2 1 1 1
18:  17 8 5 3 2 2 1 1 1
19:  18 8 5 3 2 2 1 1 1
20:  19 9 5 4 3 2 1 1 1  1
...
		

Crossrefs

Columns k (with varying offsets): A000027, A004526, A008620, A008621, A002266, A097992, ...

Programs

  • Mathematica
    T[n_, k_] := Floor[(n - k)/k]; Table[T[n, k], {n, 2, 20}, {k, 1, Floor[n/2]}] // Flatten (* Amiram Eldar, Nov 02 2021 *)
  • Python
    def A348388row(n): return [(n - k) // k for k in range(1, 1 + n // 2)]
    for n in range(2, 21): print(A348388row(n))  # Peter Luschny, Nov 05 2021

Formula

T(n, k) = floor((n-k)/k), for k = 1, 2, ..., floor(n/2) and n >= 2.
G.f. of column k: G(k, x) = x^(2*k)/((1 - x)*(1 - x^k)).
Showing 1-5 of 5 results.