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

A141419 Triangle read by rows: T(n, k) = A000217(n) - A000217(n - k) with 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 12, 14, 15, 6, 11, 15, 18, 20, 21, 7, 13, 18, 22, 25, 27, 28, 8, 15, 21, 26, 30, 33, 35, 36, 9, 17, 24, 30, 35, 39, 42, 44, 45, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55
Offset: 1

Views

Author

Roger L. Bagula, Aug 05 2008

Keywords

Comments

As a rectangle, the accumulation array of A051340.
From Clark Kimberling, Feb 05 2011: (Start)
Here all the weights are divided by two where they aren't in Cahn.
As a rectangle, A141419 is in the accumulation chain
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
row 1: A000027
col 1: A000217
diag (1,5,...): A000326 (pentagonal numbers)
diag (2,7,...): A005449 (second pentagonal numbers)
diag (3,9,...): A045943 (triangular matchstick numbers)
diag (4,11,...): A115067
diag (5,13,...): A140090
diag (6,15,...): A140091
diag (7,17,...): A059845
diag (8,19,...): A140672
(End)
Let N=2*n+1 and k=1,2,...,n. Let A_{N,n-1} = [0,...,0,1; 0,...,0,1,1; ...; 0,1,...,1; 1,...,1], an n X n unit-primitive matrix (see [Jeffery]). Let M_n=[A_{N,n-1}]^4. Then t(n,k)=[M_n](1,k), that is, the n-th row of the triangle is given by the first row of M_n. - _L. Edson Jeffery, Nov 20 2011
Conjecture. Let N=2*n+1 and k=1,...,n. Let A_{N,0}, A_{N,1}, ..., A_{N,n-1} be the n X n unit-primitive matrices (again see [Jeffery]) associated with N, and define the Chebyshev polynomials of the second kind by the recurrence U_0(x) = 1, U_1(x) = 2*x and U_r(x) = 2*x*U_(r-1)(x) - U_(r-2)(x) (r>1). Define the column vectors V_(k-1) = (U_(k-1)(cos(Pi/N)), U_(k-1)(cos(3*Pi/N)), ..., U_(k-1)(cos((2*n-1)*Pi/N)))^T, where T denotes matrix transpose. Let S_N = [V_0, V_1, ..., V_(n-1)] be the n X n matrix formed by taking V_(k-1) as column k-1. Let X_N = [S_N]^T*S_N, and let [X_N](i,j) denote the entry in row i and column j of X_N, i,j in {0,...,n-1}. Then t(n,k) = [X_N](k-1,k-1), and row n of the triangle is given by the main diagonal entries of X_N. Remarks: Hence t(n,k) is the sum of squares t(n,k) = sum[m=1,...,n (U_(k-1)(cos((2*m-1)*Pi/N)))^2]. Finally, this sequence is related to A057059, since X_N = [sum_{m=1,...,n} A057059(n,m)*A_{N,m-1}] is also an integral linear combination of unit-primitive matrices from the N-th set. - L. Edson Jeffery, Jan 20 2012
Row sums: n*(n+1)*(2*n+1)/6. - L. Edson Jeffery, Jan 25 2013
n-th row = partial sums of n-th row of A004736. - Reinhard Zumkeller, Aug 04 2014
T(n,k) is the number of distinct sums made by at most k elements in {1, 2, ... n}, for 1 <= k <= n, e.g., T(6,2) = the number of distinct sums made by at most 2 elements in {1,2,3,4,5,6}. The sums range from 1, to 5+6=11. So there are 11 distinct sums. - Derek Orr, Nov 26 2014
A number n occurs in this sequence A001227(n) times, the number of odd divisors of n, see A209260. - Hartmut F. W. Hoft, Apr 14 2016
Conjecture: 2*n + 1 is composite if and only if gcd(t(n,m),m) != 1, for some m. - L. Edson Jeffery, Jan 30 2018
From Peter Munn, Aug 21 2019 in respect of the sequence read as a triangle: (Start)
A number m can be found in column k if and only if A286013(m, k) is nonzero, in which case m occurs in column k on row A286013(m, k).
The first occurrence of m is in row A212652(m) column A109814(m), which is the rightmost column in which m occurs. This occurrence determines where m appears in A209260. The last occurrence of m is in row m column 1.
Viewed as a sequence of rows, consider the subsequences (of rows) that contain every positive integer. The lexicographically latest of these subsequences consists of the rows with row numbers in A270877; this is the only one that contains its own row numbers only once.
(End)

Examples

			As a triangle:
   1,
   2,  3,
   3,  5,  6,
   4,  7,  9, 10,
   5,  9, 12, 14, 15,
   6, 11, 15, 18, 20, 21,
   7, 13, 18, 22, 25, 27, 28,
   8, 15, 21, 26, 30, 33, 35, 36,
   9, 17, 24, 30, 35, 39, 42, 44, 45,
  10, 19, 27, 34, 40, 45, 49, 52, 54, 55;
As a rectangle:
   1   2   3   4   5   6   7   8   9  10
   3   5   7   9  11  13  15  17  19  21
   6   9  12  15  18  21  24  27  30  33
  10  14  18  22  26  30  34  38  42  46
  15  20  25  30  35  40  45  50  55  60
  21  27  33  39  45  51  57  63  69  75
  28  35  42  49  56  63  70  77  84  91
  36  44  52  60  68  76  84  92 100 108
  45  54  63  72  81  90  99 108 117 126
  55  65  75  85  95 105 115 125 135 145
Since the odd divisors of 15 are 1, 3, 5 and 15, number 15 appears four times in the triangle at t(3+(5-1)/2, 5) in column 5 since 5+1 <= 2*3, t(5+(3-1)/2, 3), t(1+(15-1)/2, 2*1) in column 2 since 15+1 > 2*1, and t(15+(1-1)/2, 1). - _Hartmut F. W. Hoft_, Apr 14 2016
		

References

  • R. N. Cahn, Semi-Simple Lie Algebras and Their Representations, Dover, NY, 2006, ISBN 0-486-44999-8, p. 139.

Crossrefs

Cf. A000330 (row sums), A004736, A057059, A070543.
A144112, A051340, A141419, A185874, A185875, A185876 are accumulation chain related.
A141418 is a variant.
Cf. A001227, A209260. - Hartmut F. W. Hoft, Apr 14 2016
A109814, A212652, A270877, A286013 relate to where each natural number appears in this sequence.
A000027, A000217, A000326, A005449, A045943, A059845, A115067, A140090, A140091, A140672 are rows, columns or diagonals - refer to comments.

Programs

  • Haskell
    a141419 n k =  k * (2 * n - k + 1) `div` 2
    a141419_row n = a141419_tabl !! (n-1)
    a141419_tabl = map (scanl1 (+)) a004736_tabl
    -- Reinhard Zumkeller, Aug 04 2014
  • Maple
    a:=(n,k)->k*n-binomial(k,2): seq(seq(a(n,k),k=1..n),n=1..12); # Muniru A Asiru, Oct 14 2018
  • Mathematica
    T[n_, m_] = m*(2*n - m + 1)/2; a = Table[Table[T[n, m], {m, 1, n}], {n, 1, 10}]; Flatten[a]

Formula

t(n,m) = m*(2*n - m + 1)/2.
t(n,m) = A000217(n) - A000217(n-m). - L. Edson Jeffery, Jan 16 2013
Let v = d*h with h odd be an integer factorization, then v = t(d+(h-1)/2, h) if h+1 <= 2*d, and v = t(d+(h-1)/2, 2*d) if h+1 > 2*d; see A209260. - Hartmut F. W. Hoft, Apr 14 2016
G.f.: y*(-x + y)/((-1 + x)^2*(-1 + y)^3). - Stefano Spezia, Oct 14 2018
T(n, 2) = A060747(n) for n > 1. T(n, 3) = A008585(n - 1) for n > 2. T(n, 4) = A016825(n - 2) for n > 3. T(n, 5) = A008587(n - 2) for n > 4. T(n, 6) = A016945(n - 3) for n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7.r n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7. T(n, 9) = A008591(n - 4) for n > 8. T(n, 10) = A017329(n - 5) for n > 9. T(n, 11) = A008593(n - 5) for n > 10. T(n, 12) = A017593(n - 6) for n > 11. T(n, 13) = A008595(n - 6) for n > 12. T(n, 14) = A147587(n - 7) for n > 13. T(n, 15) = A008597(n - 7) for n > 14. T(n, 16) = A051062(n - 8) for n > 15. T(n, 17) = A008599(n - 8) for n > 16. - Stefano Spezia, Oct 14 2018
T(2*n-k, k) = A070543(n, k). - Peter Munn, Aug 21 2019

Extensions

Simpler name by Stefano Spezia, Oct 14 2018

A118235 Smallest positive number starting an interval of consecutive integers with element sum n.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 3, 8, 2, 1, 5, 3, 6, 2, 1, 16, 8, 3, 9, 2, 1, 4, 11, 7, 3, 5, 2, 1, 14, 4, 15, 32, 3, 7, 2, 1, 18, 8, 4, 6, 20, 3, 21, 2, 1, 10, 23, 15, 4, 8, 6, 3, 26, 2, 1, 5, 7, 13, 29, 4, 30, 14, 3, 64, 2, 1, 33, 5, 9, 7, 35, 4, 36, 17, 3, 6, 2, 1, 39, 14, 5, 19, 41, 7, 4, 20, 12, 3, 44, 2, 1, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 18 2006

Keywords

Comments

Right border of A299765. - Omar E. Pol, Jul 24 2018
In other words: a(n) is smallest part of the partitions of n into consecutive parts. - Omar E. Pol, Mar 12 2019

Examples

			a(3)=1 since 3 = 1+2; a(5)=2 since 5 = 2+3; a(6)=1 since 6 = 1+2+3; etc.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local j, k, s; j, k, s:= 1$3;
          while s<>n do
             if sAlois P. Heinz, Aug 05 2018
  • Mathematica
    a[n_] := Module[{j = 1, k = 1, s = 1}, While[True, If[s == n, Break[]]; If[s < n, k = k+1; s = s+k, s = s-j; j = j+1]]; j];
    Array[a, 100] (* Jean-François Alcover, Mar 12 2019, after Alois P. Heinz *)
  • PARI
    {a(n)=local(A=n);for(j=1,n,for(k=j,n+1,if(n==k*(k-1)/2-j*(j-1)/2,A=j;k=j=2*n+1)));A} /* Paul D. Hanna, Oct 28 2011 */

Formula

A109814(n) * (A109814(n) + 2*a(n) - 1) / 2 = n.
a(m) = n iff m = 2^k: a(A000079(n)) = A000079(n);
a(m) = 1 iff m = k*(k+1)/2: a(A000217(n)) = 1.
a(A002817(n-1)+1) = n; i.e., a(m) = n if m = k*(k-1)/2 + 1 and k = n*(n-1)/2 + 1. - Paul D. Hanna, Oct 28 2011
a(m) = 2 iff m = k*(k+3)/2: a(A000096(n)) = 2. - Bernard Schott, Mar 12 2019

A138796 Least possible k > 0 with T(k) - T(j) = n, j > 0, where T(i) > 0 are the triangular numbers A000217.

Original entry on oeis.org

2, 3, 4, 3, 6, 4, 8, 4, 10, 6, 5, 7, 5, 6, 16, 9, 6, 10, 6, 8, 7, 12, 9, 7, 8, 7, 28, 15, 8, 16, 32, 8, 10, 8, 13, 19, 11, 9, 10, 21, 9, 22, 9, 10, 13, 24, 17, 10, 12, 11, 10, 27, 10, 13, 11, 12, 16, 30, 11, 31, 17, 11, 64, 11, 18, 34, 12, 14, 13, 36, 12, 37, 20, 12, 13, 12, 21, 40, 18
Offset: 2

Views

Author

Peter Pein (petsie(AT)dordos.net), Mar 30 2008

Keywords

Comments

For T(k) see A138797, for j see A138798 and for T(j) see A138799.
The number of ways n can be written as difference of two triangular numbers is sequence A136107
Note that n = t(k)-t(j) implies 2n = (k-j)(k+j+1), where (k-j) and (k+j+1) are of opposite parity. Let d be the odd element of { k-j, k+j+1 }. Then d is an odd divisor of n and k = ( d + 2n/d - 1 ) / 2. Therefore a(n) = ( min{ d + 2n/d } - 1 ) / 2 where d runs through all odd divisors of n, except perhaps (sqrt(8*n+1) +- 1)/2 which correspond to j=0. See PARI program. The restriction that j > 0 seems artificial. If it is removed we get A212652. - Max Alekseyev, Mar 31 2008

Examples

			a(30)=8, because 30 = T(30) - T(29) = T(11) - T(8) = T(9) - T(5) = T(8) - T(3) and 8 is the least index of the minuends.
		

Crossrefs

Programs

  • Mathematica
    T=#(#+1)/2&;Min[k/.{ToRules[Reduce[{T[k]-T[j]\[Equal]#,0
    				
  • PARI
    { a(n) = local(m); m=2*n+1; fordiv(n/2^valuation(n,2),d,if((2*d+1)^2!=8*n+1&&(2*d-1)^2!=8*n+1,m=min(m,d+(2*n)\d))); (m-1)\2 }
    vector(100,n,a(n)) \\ Max Alekseyev, Mar 31 2008

A379633 Irregular triangle read by rows in which row n lists the largest parts of the partitions of n into consecutive parts (with the partitions ordered by increasing number of parts).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Dec 31 2024

Keywords

Comments

Row n gives the first A001227(n) terms of the n-th row of A379631.
Conjecture: the right border gives A212652.

Examples

			Triangle begins:
   1;
   2;
   3,  2;
   4;
   5,  3;
   6,  3;
   7,  4;
   8;
   9,  5,  4;
  10,  4;
  11,  6;
  12,  5;
  13,  7;
  14,  5;
  15,  8,  6,  5;
  16;
  17,  9;
  18,  7,  6;
  19, 10;
  20,  6;
  21, 11,  8,  6;
  22,  7;
  23, 12;
  24,  9;
  25, 13,  7;
  26,  8;
  27, 14, 10,  7;
  28,  7;
  ...
Illustration of initial terms:
                                                         _
                                                       _|1|
                                                     _|2 _|
                                                   _|3  |2|
                                                 _|4   _| |
                                               _|5    |3 _|
                                             _|6     _| |3|
                                           _|7      |4  | |
                                         _|8       _|  _| |
                                       _|9        |5  |4 _|
                                     _|10        _|   | |4|
                                   _|11         |6   _| | |
                                 _|12          _|   |5  | |
                               _|13           |7    |  _| |
                             _|14            _|    _| |5 _|
                           _|15             |8    |6  | |5|
                         _|16              _|     |   | | |
                       _|17               |9     _|  _| | |
                     _|18                _|     |7  |6  | |
                   _|19                 |10     |   |  _| |
                 _|20                  _|      _|   | |6 _|
               _|21                   |11     |8   _| | |6|
             _|22                    _|       |   |7  | | |
           _|23                     |12      _|   |   | | |
         _|24                      _|       |9    |  _| | |
       _|25                       |13       |    _| |7  | |
     _|26                        _|        _|   |8  |  _| |
   _|27                         |14       |10   |   | |7 _|
  |28                           |         |     |   | | |7|
  ...
The diagram is also the left part of the diagram of A379631.
The geometrical structure is the same as the diagram of A237591.
		

Crossrefs

Positive terms of A286013.
Column 1 gives A000027.
Row lengths give A001227.
Row sums give A286015.
Subsequence of A286000 and of A299765 and of A379631.
For the smallest parts see A379632.

A218621 a(n) = unique divisor d of n such that d + (n/d - 1)/2 is minimal and integral.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, 3, 16, 1, 2, 1, 4, 3, 2, 1, 8, 5, 2, 3, 4, 1, 6, 1, 32, 3, 2, 5, 4, 1, 2, 3, 8, 1, 6, 1, 4, 5, 2, 1, 16, 7, 10, 3, 4, 1, 6, 5, 8, 3, 2, 1, 4, 1, 2, 7, 64, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 5, 4, 7, 6, 1, 16, 9, 2, 1, 4, 5
Offset: 1

Views

Author

L. Edson Jeffery, Feb 18 2013

Keywords

Comments

Differs from A079891 starting at a(18).
For integers M, k, with 0<=k<=M, consider a representation of n as n = T(M) - T(M-k) = M + (M-1) + ... + (M-k+1), in which k is maximal, where T(r) = r*(r+1)/2 is the r-th triangular number. Then k = A109814(n), and M = A212652(n) = a(n) + (n/a(n) - 1)/2 is minimal.
Conjecture. For n, p, v, j natural numbers, the conditions on a(n) seem to be the following:
1. If n is an odd prime, then a(n) = 1.
2. If n is odd and composite, then
a(n) = max(p : p | n, p <= sqrt(n), p is a prime).
3. If n is equal to a power of 2, then a(n) = n.
4. If n = 2^j*v, with v odd, v>1 and j>1, then a(n) = 2^j.
5. If n = 2*v, with v odd and composite, then
a(n) = 2*p, where p is the least prime such that p | v.
6. If n = 2*p, for p an odd prime, then a(n) = 2.

Crossrefs

Programs

  • Mathematica
    Table[d = Divisors[n]; mn = Infinity; best = 0; Do[q = i + (n/i - 1)/2; If[IntegerQ[q] && q < mn, mn = q; best = i], {i, d}]; best, {n, 100}] (* T. D. Noe, Feb 21 2013 *)

A345117 a(n) is the index (in Z/nZ) of the first already visited element in the process of moving around Z/nZ, starting at 0 with stride 1 and increasing stride by 1 after each step.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 4, 1, 0, 10, 3, 2, 1, 0, 8, 11, 3, 17, 1, 0, 6, 9, 21, 3, 10, 1, 0, 4, 6, 12, 16, 3, 21, 1, 0, 5, 28, 6, 15, 26, 3, 38, 1, 0, 45, 18, 9, 6, 28, 15, 3, 7, 1, 0, 10, 21, 20, 52, 6, 8, 29, 3, 32, 1, 0, 59, 10, 36, 21, 27, 6, 46, 62, 3, 15, 1
Offset: 1

Views

Author

Sophie Weber, Jun 08 2021

Keywords

Examples

			For n = 3 we start with Z/3Z represented as [0,1,2]. In the first step we mark the zero to obtain [0*,1,2] and move one step (to 1). Then we mark the 1 to obtain [0*,1*,2] and move two steps (to 0*). We have landed on a number already visited, so the process ends here, and as we have landed on 0 last, a(3) = 0.
For n = 4 we start with [0,1,2,3]. After the first step we get [0*,1,2,3] and we land at 1. After the second step we have [0*,1*,2,3] and we have landed at 3. In the penultimate step we mark the 3 to get [0*,1*,2,3*] and move 3 steps (to 2). We mark the 2 and move 4 steps to the 2*, which we have already visited. Therefore, a(4) = 2.
For n = 5 the list of steps is as follows: [0,1,2,3,4] -> [0*,1,2,3,4] -> [0*,1*,2,3,4] -> [0*,1*,2,3*,4] -> we land on 1 again, therefore a(5) = 1.
For n = 7 the list of steps is as follows: [0,1,2,3,4,5,6] -> [0*,1,2,3,4,5,6] -> [0*,1*,2,3,4,5,6] -> [0*,1*,2,3*,4,5,6] -> [0*,1*,2,3*,4,5,6*] -> we land on 3 again, therefore a(7) = 3.
Note: the '*' after a number means that this number was already visited.
		

Crossrefs

Programs

  • Python
    def a(n):
        row = ['x' for i in range(n)]
        free = True
        count = index = 0
        while(free):
            row[index] = count
            count += 1
            index = (index + count) % n
            if row[index] != 'x':
                free = False
        return index

Formula

a(n) = A000217(A212652(n)) mod n. - Rémy Sigrist, Jun 08 2021
Showing 1-6 of 6 results.