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-10 of 12 results. Next

A002024 k appears k times; a(n) = floor(sqrt(2n) + 1/2).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Integer inverse function of the triangular numbers A000217. The function trinv(n) = floor((1+sqrt(1+8n))/2), n >= 0, gives the values 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, ..., that is, the same sequence with offset 0. - N. J. A. Sloane, Jun 21 2009
Array T(k,n) = n+k-1 read by antidiagonals.
Eigensequence of the triangle = A001563. - Gary W. Adamson, Dec 29 2008
Can apparently also be defined via a(n+1)=b(n) for n >= 2 where b(0)=b(1)=1 and b(n) = b(n-b(n-2))+1. Tested to be correct for all n <= 150000. - José María Grau Ribas, Jun 10 2011
For any n >= 0, a(n+1) is the least integer m such that A000217(m)=m(m+1)/2 is larger than n. This is useful when enumerating representations of n as difference of triangular numbers; see also A234813. - M. F. Hasler, Apr 19 2014
Number of binary digits of A023758, i.e., a(n) = ceiling(log_2(A023758(n+2))). - Andres Cicuttin, Apr 29 2016
a(n) and A002260(n) give respectively the x(n) and y(n) coordinates of the sorted sequence of points in the integer lattice such that x(n) > 0, 0 < y(n) <= x(n), and min(x(n), y(n)) < max(x(n+1), y(n+1)) for n > 0. - Andres Cicuttin, Dec 25 2016
Partial sums (A060432) are given by S(n) = (-a(n)^3 + a(n)*(1+6n))/6. - Daniel Cieslinski, Oct 23 2017
As an array, T(k,n) is the number of digits columns used in carryless multiplication between a k-digit number and an n-digit number. - Stefano Spezia, Sep 24 2022
a(n) is the maximum number of possible solutions to an n-statement Knights and Knaves Puzzle, where each statement is of the form "x of us are knights" for some 1 <= x <= n, knights can only tell the truth and knaves can only lie. - Taisha Charles and Brittany Ohlinger, Jul 29 2023

Examples

			From _Clark Kimberling_, Sep 16 2008: (Start)
As a rectangular array, a northwest corner:
  1 2 3 4 5 6
  2 3 4 5 6 7
  3 4 5 6 7 8
  4 5 6 7 8 9
This is the weight array (cf. A144112) of A107985 (formatted as a rectangular array). (End)
G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 4*x^9 + 4*x^9 + 4*x^10 + ...
		

References

  • Edward S. Barbeau, Murray S. Klamkin, and William O. J. Moser, Five Hundred Mathematical Challenges, Prob. 441, pp. 41, 194. MAA 1995.
  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 97.
  • K. Hardy and K. S. Williams, The Green Book of Mathematical Problems, p. 59, Solution to Prob. 14, Dover NY, 1985
  • R. Honsberger, Mathematical Morsels, pp. 133-134, MAA 1978.
  • J. F. Hurley, Litton's Problematical Recreations, pp. 152; 313-4 Prob. 22, VNR Co., NY, 1971.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 43.
  • 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).
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.

Crossrefs

a(n+1) = 1+A003056(n), A022846(n)=a(n^2), a(n+1)=A002260(n)+A025581(n).
A123578 is an essentially identical sequence.

Programs

  • Haskell
    a002024 n k = a002024_tabl !! (n-1) !! (k-1)
    a002024_row n = a002024_tabl !! (n-1)
    a002024_tabl = iterate (\xs@(x:_) -> map (+ 1) (x : xs)) [1]
    a002024_list = concat a002024_tabl
    a002024' = round . sqrt . (* 2) . fromIntegral
    -- Reinhard Zumkeller, Jul 05 2015, Feb 12 2012, Mar 18 2011
    
  • Haskell
    a002024_list = [1..] >>= \n -> replicate n n
    
  • Haskell
    a002024 = (!!) $ [1..] >>= \n -> replicate n n
    -- Sascha Mücke, May 10 2016
    
  • Magma
    [Floor(Sqrt(2*n) + 1/2): n in [1..80]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A002024 := n-> ceil((sqrt(1+8*n)-1)/2); seq(A002024(n), n=1..100);
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - a[n - 1]] + 1 (* Branko Curgus, May 12 2009 *)
    Table[n, {n, 13}, {n}] // Flatten (* Robert G. Wilson v, May 11 2010 *)
    Table[PadRight[{},n,n],{n,15}]//Flatten (* Harvey P. Dale, Jan 13 2019 *)
  • PARI
    t1(n)=floor(1/2+sqrt(2*n)) /* A002024 = this sequence */
    
  • PARI
    t2(n)=n-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1) */
    
  • PARI
    t3(n)=binomial(floor(3/2+sqrt(2*n)),2)-n+1 /* A004736 */
    
  • PARI
    t4(n)=n-1-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1)-1 */
    
  • PARI
    A002024(n)=(sqrtint(n*8)+1)\2 \\ M. F. Hasler, Apr 19 2014
    
  • PARI
    a(n)=(sqrtint(8*n-7)+1)\2
    
  • PARI
    a(n)=my(k=1);while(binomial(k+1,2)+1<=n,k++);k \\ R. J. Cano, Mar 17 2014
    
  • Python
    from math import isqrt
    def A002024(n): return (isqrt(8*n)+1)//2 # Chai Wah Wu, Feb 02 2022
  • Sage
    [floor(sqrt(2*n) +1/2) for n in (1..80)] # G. C. Greubel, Dec 10 2018
    

Formula

a(n) = floor(1/2 + sqrt(2n)). Also a(n) = ceiling((sqrt(1+8n)-1)/2). [See the Liu link for a large collection of explicit formulas. - N. J. A. Sloane, Oct 30 2019]
a((k-1)*k/2 + i) = k for k > 0 and 0 < i <= k. - Reinhard Zumkeller, Aug 30 2001
a(n) = a(n - a(n-1)) + 1, with a(1)=1. - Ian M. Levitt (ilevitt(AT)duke.poly.edu), Aug 18 2002
a(n) = round(sqrt(2n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
T(n,k) = A003602(A118413(n,k)); = T(n,k) = A001511(A118416(n,k)). - Reinhard Zumkeller, Apr 27 2006
G.f.: (x/(1-x))*Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, Oct 06 2003
Equals A127899 * A004736. - Gary W. Adamson, Feb 09 2007
Sum_{i=1..n} Sum_{j=i..n+i-1} T(j,i) = A000578(n); Sum_{i=1..n} T(n,i) = A000290(n). - Reinhard Zumkeller, Jun 24 2007
a(n) + n = A014132(n). - Vincenzo Librandi, Jul 08 2010
a(n) = ceiling(-1/2 + sqrt(2n)). - Branko Curgus, May 12 2009
a(A169581(n)) = A038567(n). - Reinhard Zumkeller, Dec 02 2009
a(n) = round(sqrt(2*n)) = round(sqrt(2*n-1)); there exist a and b greater than zero such that 2*n = 2+(a+b)^2 -(a+3*b) and a(n)=(a+b-1). - Fabio Civolani (civox(AT)tiscali.it), Feb 23 2010
A005318(n+1) = 2*A005318(n) - A205744(n), A205744(n) = A005318(A083920(n)), A083920(n) = n - a(n). - N. J. A. Sloane, Feb 11 2012
Expansion of psi(x) * x / (1 - x) in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Mar 19 2014
G.f.: (x/(1-x)) * Product_{n>=1} (1 + x^n) * (1 - x^(2*n)). - Paul D. Hanna, Feb 27 2016
a(n) = 1 + Sum_{i=1..n/2} ceiling(floor(2(n-1)/(i^2+i))/(2n)). - José de Jesús Camacho Medina, Jan 07 2017
a(n) = floor((sqrt(8*n-7)+1)/2). - Néstor Jofré, Apr 24 2017
a(n) = floor((A000196(8*n)+1)/2). - Pontus von Brömssen, Dec 10 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, Oct 01 2022
G.f. as array: (x^2*(1 - y)^2 + y^2 + x*y*(1 - 2*y))/((1 - x)^2*(1 - y)^2). - Stefano Spezia, Apr 22 2024

A190620 Odd numbers with a single zero in their binary expansion.

Original entry on oeis.org

5, 11, 13, 23, 27, 29, 47, 55, 59, 61, 95, 111, 119, 123, 125, 191, 223, 239, 247, 251, 253, 383, 447, 479, 495, 503, 507, 509, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 3071, 3583, 3839, 3967, 4031
Offset: 1

Views

Author

Reinhard Zumkeller, May 14 2011

Keywords

Comments

Odd numbers such that the binary weight is one less than the number of significant digits. Except for the initial 0, A129868 is a subsequence of this sequence. - Alonso del Arte, May 14 2011
From Bernard Schott, Oct 20 2022: (Start)
A036563 \ {-2, -1, 1} is a subsequence, since for m >= 3, A036563(m) = 2^m - 3 has 11..1101 with (m-2) starting 1's for binary expansion.
A083329 \ {1, 2} is a subsequence, since for m >= 2, A083329(m) = 3*2^(m-1) - 1 has 1011..11 with (m-1) trailing 1's for binary expansion.
A129868 \ {0} is a subsequence, since for m >= 1, A129868(m) = 2*4^m - 2^m - 1 is a binary cyclops number that has 11..11011..11 with m starting 1's and m trailing 1's for binary expansion.
The 0-bit position in binary expansion of a(n) is at rank A004736(n) + 1 from the right.
For k >= 2, there are (k-1) terms between 2^k and 2^(k+1), or equivalently (k-1) terms with (k+1) bits.
{2*a(n), n>0} form a subsequence of A353654 (numbers with one trailing 0 bit and one other 0 bit). (End)

Crossrefs

A036563 \ {-2, -1, 1}, A083329 \ {1, 2}, A129868 are subsequences.
Odd numbers with k zeros in their binary expansion: A000225 (k=0), A357773 (k=2).

Programs

  • Haskell
    import Data.List (elemIndices)
    a190620 n = a190620_list !! (n-1)
    a190620_list = filter odd $ elemIndices 1 a023416_list
    -- A more efficient version, inspired by the Maple program in A190619:
    a190620_list' = g 8 2 where
       g m 2 = (m - 3) : g (2*m) (m `div` 2)
       g m k = (m - k - 1) : g m (k `div` 2)
    
  • Maple
    isA := proc(n) convert(n, base, 2): %[1] = nops(%) - add(%) end:
    select(isA, [$1..4031]); # Peter Luschny, Oct 27 2022
    # Alternatively, using a formula of Bernard Schott and A123578:
    A190620 := proc(n) A123578(n); 4*2^% - 2^(1 - n + (% + %^2)/2) - 1 end:
    seq(A190620(n), n = 1..50); # Peter Luschny, Oct 28 2022
  • Mathematica
    Select[Range[1,5001,2],DigitCount[#,2,0]==1&] (* Harvey P. Dale, Jul 12 2018 *)
  • Python
    from itertools import count, islice
    def agen():
        for d in count(3):
            b = 1 << d
            for i in range(2, d):
                yield b - (b >> i) - 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 13 2022
    
  • Python
    from math import isqrt, comb
    def A190620(n): return (1<<(a:=(isqrt(n<<3)+1>>1)+1)+1)-(1<Chai Wah Wu, Dec 18 2024

Formula

A190619(n) = A007088(a(n));
A023416(a(n)) = 1.
From Bernard Schott, Oct 21 2022: (Start)
a((n-1)*(n-2)/2 - (i-1)) = 2^n - 2^i - 1 for n >= 3 and 1 <= i <= n-2 (after Robert Israel in A357773).
a(n) = A000225(A002024(n)+2) - A000079(A004736(n)).
a(n) = 4*2^k(n) - 2^(1 - n + (k(n) + k(n)^2)/2) - 1, where k is the Kruskal-Macaulay function A123578.
A070939(a(n)) = A002024(n) + 2. (End)

A316292 Number T(n,k) of permutations p of [n] such that k is the maximum of the partial sums of the signed up-down jump sequence of 0,p; triangle T(n,k), n>=0, ceiling((sqrt(1+8*n)-1)/2)<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 5, 8, 16, 5, 50, 65, 1, 79, 314, 326, 69, 872, 2142, 1957, 34, 1539, 8799, 16248, 13700, 9, 1823, 24818, 89273, 137356, 109601, 1, 1494, 50561, 355271, 947713, 1287350, 986410, 856, 76944, 1070455, 4923428, 10699558, 13281458, 9864101
Offset: 0

Views

Author

Alois P. Heinz, Jun 28 2018

Keywords

Comments

An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump -j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

Examples

			Triangle T(n,k) begins:
: 1;
:    1;
:       2;
:       1, 5;
:          8, 16;
:          5, 50,   65;
:          1, 79,  314,   326;
:             69,  872,  2142,   1957;
:             34, 1539,  8799,  16248,  13700;
:              9, 1823, 24818,  89273, 137356,  109601;
:              1, 1494, 50561, 355271, 947713, 1287350, 986410;
		

Crossrefs

Row sums give A000142.
Column sums give A316294.
Main diagonal gives A000522.
Cf. A002024, A123578, A258829, A291722, A303697, A316293 (same read by columns).

Programs

  • Maple
    b:= proc(u, o, c, k) option remember;
          `if`(c>k, 0, `if`(u+o=0, 1,
           add(b(u-j, o-1+j, c+j, k), j=1..u)+
           add(b(u+j-1, o-j, c-j, k), j=1..o)))
        end:
    T:= (n, k)-> b(n, 0$2, k) -`if`(k=0, 0, b(n, 0$2, k-1)):
    seq(seq(T(n, k), k=ceil((sqrt(1+8*n)-1)/2)..n), n=0..14);
  • Mathematica
    b[u_, o_, c_, k_] := b[u, o, c, k] =
         If[c > k, 0, If[u + o == 0, 1,
         Sum[b[u - j, o - 1 + j, c + j, k], {j, 1, u}] +
         Sum[b[u + j - 1, o - j, c - j, k], {j, 1, o}]]];
    T[n_, k_] := b[n, 0, 0, k] - If[k == 0, 0, b[n, 0, 0, k - 1]];
    Table[Table[T[n, k], {k, Ceiling[(Sqrt[8n+1]-1)/2], n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Feb 27 2021, after Alois P. Heinz *)

A123579 The Kruskal-Macaulay function M_3(n).

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2006

Keywords

Comments

Write n (uniquely) as n = C(n_t,t) + C(n_{t-1},t-1) + ... + C(n_v,v) where n_t > n_{t-1} > ... > n_v >= v >= 1. Then M_t(n) = C(n_t-1,t-1) + C(n_{t-1}-1,t-2) + ... + C(n_v-1,v-1).
From Samuel Harkness, Sep 30 2022: (Start)
a(n) is the smallest number of balls needed on the base layer to stack n balls.
All nonrepeating terms other than a(0) occur at tetrahedral numbers + 1 (n = A000292 + 1).
The value of the nonrepeating terms other than a(0) are the Central Polygonal numbers (A000124). (End)

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4, Fascicle 3, Section 7.2.1.3, Table 3.

Crossrefs

For M_i(n), i=1, 2, 3, 4, 5 see A000127, A123578, A123579, A123580, A123731.

Programs

  • Maple
    lowpol := proc(n,t) local x::integer ; x := floor( (n*factorial(t))^(1/t)) ; while binomial(x,t) <= n do x := x+1 ; od ; RETURN(x-1) ; end:
    C := proc(n,t) local nresid,tresid,m,a ; nresid := n ; tresid := t ; a := [] ; while nresid > 0 do m := lowpol(nresid,tresid) ; a := [op(a),m] ; nresid := nresid - binomial(m,tresid) ; tresid := tresid-1 ; od ; RETURN(a) ; end:
    M := proc(n,t) local a ; a := C(n,t) ; add( binomial(op(i,a)-1,t-i),i=1..nops(a)) ; end:
    A123579 := proc(n) M(n,3) ; end:
    for n from 0 to 120 do printf("%d, ",A123579(n)) ; od ; # R. J. Mathar, Mar 14 2007
  • Mathematica
    c = 0; T = {0}; For[r = 1, r <= 7, r++, For[n = 1, n <= r, n++, c++; For[m = 1, m <= n, m++, AppendTo[T, c]]]]; Take[T, 75] (* Samuel Harkness, Sep 30 2022 *)

A123580 The Kruskal-Macaulay function M_4(n).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 12 2006

Keywords

Comments

Write n (uniquely) as n = C(n_t,t) + C(n_{t-1},t-1) + ... + C(n_v,v) where n_t > n_{t-1} > ... > n_v >= v >= 1. Then M_t(n) = C(n_t-1,t-1) + C(n_{t-1}-1,t-2) + ... + C(n_v-1,v-1).

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4, Fascicle 3, Section 7.2.1.3, Table 3.

Crossrefs

For M_i(n), i=1, 2, 3, 4, 5 see A000127, A123578, A123579, A123580, A123731.

Programs

  • Maple
    lowpol := proc(n,t) local x::integer; x := floor( (n*factorial(t))^(1/t)); while binomial(x,t) <= n do x := x+1; od; RETURN(x-1); end: C := proc(n,t) local nresid,tresid,m,a; nresid := n; tresid := t; a := []; while nresid > 0 do m := lowpol(nresid,tresid); a := [op(a),m]; nresid := nresid - binomial(m,tresid); tresid := tresid-1; od; RETURN(a); end: M := proc(n,t) local a; a := C(n,t); add( binomial(op(i,a)-1,t-i),i=1..nops(a)); end: A123580 := proc(n) M(n,4); end: for n from 0 to 120 do printf("%d, ",A123580(n)); od; # R. J. Mathar, Mar 14 2007
  • Mathematica
    lowpol[n_, t_] := Module[{x = Floor[(n*t!)^(1/t)]}, While[Binomial[x, t] <= n, x = x + 1]; x - 1];
    c[n_, t_] := Module[{n0 = n, t0 = t, a = {}, m}, While[n0 > 0, m = lowpol[n0, t0]; AppendTo[a, m]; n0 = n0 - Binomial[m, t0]; t0 = t0 - 1]; a];
    M[n_, t_] := With[{a = c[n, t]}, Sum[Binomial[a[[i]] - 1, t - i], {i, 1, Length[a]}]];
    A123580[n_] := M[n, 4];
    Table[A123580[n], {n, 0, 73}] (* Jean-François Alcover, Mar 30 2023, after R. J. Mathar *)

A123731 The Kruskal-Macaulay function M_5(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 14, 15, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 24, 25, 25, 25, 26, 27, 28, 28, 29, 30, 30, 31, 31, 31, 32, 33, 33, 34, 34, 34, 35, 35, 35, 35, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 44, 45, 45, 45, 46
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2006

Keywords

Comments

Write n (uniquely) as n = C(n_t,t) + C(n_{t-1},t-1) + ... + C(n_v,v) where n_t > n_{t-1} > ... > n_v >= v >= 1. Then M_t(n) = C(n_t-1,t-1) + C(n_{t-1}-1,t-2) + ... + C(n_v-1,v-1).

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4, Fascicle 3, Section 7.2.1.3, Table 3.

Crossrefs

For M_i(n), i=1, 2, 3, 4, 5 see A000127, A123578, A123579, A123580, A123731.

Programs

  • Maple
    lowpol := proc(n,t) local x::integer; x := floor( (n*factorial(t))^(1/t)); while binomial(x,t) <= n do x := x+1; od; RETURN(x-1); end:
    C := proc(n,t) local nresid,tresid,m,a; nresid := n; tresid := t; a := []; while nresid > 0 do m := lowpol(nresid,tresid); a := [op(a),m]; nresid := nresid - binomial(m,tresid); tresid := tresid-1; od; RETURN(a); end:
    M := proc(n,t) local a; a := C(n,t); add( binomial(op(i,a)-1,t-i),i=1..nops(a)); end:
    A123731 := proc(n) M(n,5); end:
    for n from 0 to 120 do printf("%d, ",A123731(n)); od; # R. J. Mathar, Mar 14 2007
  • Mathematica
    lowpol[n_, t_] := Module[{x = Floor[(n*t!)^(1/t)]}, While[Binomial[x, t] <= n, x = x + 1]; x - 1];
    c[n_, t_] := Module[{n0 = n, t0 = t, a = {}, m}, While[n0 > 0, m = lowpol[n0, t0]; AppendTo[a, m]; n0 = n0 - Binomial[m, t0]; t0 = t0 - 1]; a];
    M[n_, t_] := With[{a = c[n, t]}, Sum[Binomial[a[[i]] - 1, t - i], {i, 1, Length[a]}]];
    A123731[n_] := M[n, 5];
    Table[A123731[n], {n, 0, 72}] (* Jean-François Alcover, Mar 30 2023, after R. J. Mathar *)

Extensions

More terms from R. J. Mathar, Mar 14 2007

A127739 Triangle read by rows, in which row n contains the triangular number T(n) = A000217(n) repeated n times; smallest triangular number greater than or equal to n.

Original entry on oeis.org

1, 3, 3, 6, 6, 6, 10, 10, 10, 10, 15, 15, 15, 15, 15, 21, 21, 21, 21, 21, 21, 28, 28, 28, 28, 28, 28, 28, 36, 36, 36, 36, 36, 36, 36, 36, 45, 45, 45, 45, 45, 45, 45, 45, 45, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
Offset: 1

Views

Author

Gary W. Adamson, Jan 27 2007

Keywords

Comments

Seen as a sequence, these are the triangular numbers applied to the Kruskal-Macaulay function A123578. - Peter Luschny, Oct 29 2022

Examples

			First few rows of the triangle are:
   1;
   3,  3;
   6,  6,  6;
  10, 10, 10, 10;
  15, 15, 15, 15, 15;
  ...
		

Crossrefs

Programs

  • Haskell
    a127739 n k = a127739_tabl !! (n-1) !! (k-1)
    a127739_row n = a127739_tabl !! (n-1)
    a127739_tabl = zipWith ($) (map replicate [1..]) $ tail a000217_list
    -- Reinhard Zumkeller, Feb 03 2012, Mar 18 2011
    
  • Maple
    A127739 := proc(n) local t, s; t := 1; s := 0;
    while t <= n do s := s + 1; t := t + s od; s*(1 + s)/2 end:
    seq(A127739(n), n = 1..66); # Peter Luschny, Oct 29 2022
  • Mathematica
    Table[n(n+1)/2,{n,100},{n}]//Flatten (* Zak Seidov, Mar 19 2011 *)
  • PARI
    A127739=n->binomial((sqrtint(8*n)+3)\2,2) \\ M. F. Hasler, Mar 09 2014
    
  • Python
    from math import isqrt
    def A127739(n): return (r:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(r+1)>>1 # Chai Wah Wu, Nov 07 2024

Formula

Central terms: T(2*n-1,n) = A000384(n). - Reinhard Zumkeller, Mar 18 2011
a(n) = A003057(n)*A002024(n)/2; a(n) = (t+2)*(t+1)/2, where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Feb 08 2013
Sum_{n>=1} 1/a(n)^2 = 8 - 2*Pi^2/3. - Amiram Eldar, Aug 15 2022
a(n) = k(n)*(1 + k(n))/2 = A000217(A123578(n)), where k = A123578. - Peter Luschny, Oct 29 2022

Extensions

Name edited by Michel Marcus, Apr 30 2020

A341736 a(n) is the label of the square of the n-th element in the semigroup S = {(0,0), (i,j): i >= j >= 1}.

Original entry on oeis.org

0, 1, 7, 10, 37, 40, 45, 121, 124, 129, 136, 301, 304, 309, 316, 325, 631, 634, 639, 646, 655, 666, 1177, 1180, 1185, 1192, 1201, 1212, 1225, 2017, 2020, 2025, 2032, 2041, 2052, 2065, 2080, 3241, 3244, 3249, 3256, 3265, 3276, 3289, 3304, 3321, 4951, 4954, 4959
Offset: 0

Views

Author

Alois P. Heinz, Feb 17 2021

Keywords

Comments

The product in S is computed componentwise.
For the labeling of the elements in S and further information see A341317.

Crossrefs

Main diagonal of A341317 and of A341318.

Programs

  • Maple
    t:= n-> n*(n-1)/2:
    f:= n-> ceil((sqrt(1+8*n)-1)/2):
    g:= n-> (x-> [x, n-t(x)])(f(n)):
    a:= n-> (h-> t(h[1]^2)+h[2]^2)(g(n)):
    seq(a(n), n=0..60);
  • Mathematica
    t[n_] := n*(n - 1)/2;
    f[n_] := Ceiling[(Sqrt[1 + 8*n] - 1)/2];
    g[n_] := Function[x, {x, n - t[x]}][f[n]];
    a[n_] := Function[h, t[h[[1]]^2] + h[[2]]^2][g[n]];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)

Formula

a(n) = A341317(n,n) = A341318(n,n).
a(A000217(n)) = A037270(n) = A000217(A000290(n)).

A332644 Largest of the least integers of prime signatures over all partitions of n into distinct parts.

Original entry on oeis.org

1, 2, 4, 12, 24, 72, 360, 720, 2160, 10800, 75600, 151200, 453600, 2268000, 15876000, 174636000, 349272000, 1047816000, 5239080000, 36673560000, 403409160000, 5244319080000, 10488638160000, 31465914480000, 157329572400000, 1101307006800000, 12114377074800000
Offset: 0

Views

Author

Alois P. Heinz, Feb 18 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, j) option remember;
          `if`(i*(i+1)/2 b(n$2, 1):
    seq(a(n), n=0..30);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, a(n-1)*
          ithprime(n-(t-> t*(t+1)/2)(floor((sqrt(8*n-7)-1)/2))))
        end:
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, j_] := b[n, i, j] = If[i(i+1)/2 < n, 0, If[n == 0, 1, Max[b[n, i - 1, j], Prime[j]^i b[n - i, Min[n - i, i - 1], j + 1]]]];
    a[n_] := b[n, n, 1];
    a /@ Range[0, 30] (* Jean-François Alcover, May 07 2020, after 1st Maple program *)

Formula

a(n) = A328524(n,A000009(n)).
A001221(a(n)) = A003056(n).
A001222(a(n)) = n.
A046523(a(n)) = a(n).
a(n)/a(n-1) = A037126(n) = A000040(n-A000217(A003056(n))) for n > 0.
a(n) in { A025487 }.
a(n) in { A055932 }.
a(n) in { A087980 }.
A007814(a(n)) = A123578(n).

A366509 a(n) is the maximum number of dots on the slope of a Ferrers diagram of a partition of n into distinct parts.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Oct 11 2023

Keywords

Comments

A Ferrers diagram arranges the parts of a partition in left-justified rows of dots, where the numbers of dots in row m corresponds to the m-th part of the partition, with parts in decreasing order.
The slope of a Ferrers diagram is the longest 45-degree line segment joining the rightmost dot in the first row with other dots in the diagram (see example).
If the top row of a diagram for n has A123578(n) dots, the corresponding slope is maximal.

Examples

			The Ferrers diagrams for the partitions of n = 7 into distinct parts are:
.
.  (7)             (6,1)         (5,2)       (4,3)     (4,2,1)
.  o o o o o o o   o o o o o o   o o o o o   o o o o   o o o o
.                  o             o o         o o o     o o
.                                                      o
.
The maximal slope (joining 2 dots) corresponds to the (4,3) partition.
For n = 11 there are two diagrams with maximal slope (joining 2 dots):
.
.  o o o o o o   o o o o o
.  o o o o o     o o o o
.                o o
.
For n = 26 the maximal slope, corresponding to the partition (7,6,5,4,3,1), joins 5 dots:
.
.  o o o o o o o
.             /
.  o o o o o o
.           /
.  o o o o o
.         /
.  o o o o
.       /
.  o o o
.
.  o
.
		

Crossrefs

Row records in A277231.

Programs

Formula

a(n) = r - A123578(A000217(r)-n), where r = A123578(n).
In particular, if n is a triangular number, a(n) = r.
Showing 1-10 of 12 results. Next