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.

Previous Showing 11-20 of 66 results. Next

A122458 "Dropping time" of the reduced Collatz iteration starting with 2n+1.

Original entry on oeis.org

0, 2, 1, 4, 1, 3, 1, 4, 1, 2, 1, 3, 1, 37, 1, 35, 1, 2, 1, 5, 1, 3, 1, 34, 1, 2, 1, 3, 1, 4, 1, 34, 1, 2, 1, 32, 1, 3, 1, 5, 1, 2, 1, 3, 1, 28, 1, 5, 1, 2, 1, 26, 1, 3, 1, 19, 1, 2, 1, 3, 1, 5, 1, 9, 1, 2, 1, 4, 1, 3, 1, 4, 1, 2, 1, 3, 1, 25, 1, 13, 1, 2, 1, 18, 1, 3, 1, 5, 1, 2, 1, 3, 1, 4, 1, 8, 1, 2, 1, 5
Offset: 0

Views

Author

T. D. Noe, Sep 08 2006

Keywords

Comments

We count only the 3x+1 steps of the usual Collatz iteration. We stop counting when the iteration produces a number less than the initial 2n+1. For a fixed dropping time k, let N(k)=A100982(k) and P(k)=2^(A020914(k)-1). There are exactly N(k) odd numbers less than P(k) with dropping time k. Moreover, the sequence is periodic: if d is one of the N(k) odd numbers, then k=a(d)=a(d+i*P(k)) for all i>=0. This periodicity makes it easy to compute the average dropping time of the reduced Collatz iteration: Sum_{k>0} k*N(k)/P(k) = 3.492651852186... (A122791).

Examples

			a(3)=4 because, starting with 7, the iteration produces 11,17,13,5 and the last term is less than 7.
n = 13: the fr trajectory for 2*13+1 = 27 is 41, 31, 47, 71, 107, 161, 121, 91, 137, 103, 155, 233, 175, 263, 395, 593, 445, 167, 251, 377, 283, 425, 319, 479, 719, 1079, 1619, 2429, 911, 1367, 2051, 3077, 577, 433, 325, 61, 23, 35, 53, 5, 1 with 41 terms (without 27), hence fr^[37] = 23 < 27  and  a(13) = 37. - _Wolfdieter Lang_, Feb 20 2019
		

References

  • Victor Klee and Stan Wagon, Old and New Unsolved Problems in Plane Geometry and Number Theory, Mathematical Association of America (1991) pp. 225-229, 308-309. [called on p. 225 stopping time for 2n+1 and the function C(2*n+1) = A075677(n+1), n >= 0. - Wolfdieter Lang, Feb 20 2019]

Crossrefs

Cf. A000265, A060445, A075677 (one step of the reduced Collatz iteration), A075680.
Cf. A087113 (indices of 1's), A017077 (indices of 2's), A122791 (limit mean).

Programs

  • Mathematica
    nextOddK[n_]:=Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; dt[n_]:=Module[{m=n, cnt=0}, If[n>1, While[m=nextOddK[m]; cnt++; m>n]]; cnt]; Table[dt[n],{n,1,301,2}]

Formula

a(n) is the least k for which fr^[k](n) < 2*n + 1, for n >= 1 and k >= 1, where fr(n) = A075677(n+1) = A000265(3*n+2). No k satisfies this for n = 0: a(0) := 0 by convention. The dropping time a(n) is finite, for n >= 1, if the Collatz conjecture is true. - Wolfdieter Lang, Feb 20 2019
a(1+i*8) = 2, for i>=0, because A100982(2) = 1 is odd, and A020914(2) = 4 gives P(2) = 2^(4-1) = 8. - Ruud H.G. van Tol, Dec 19 2021

A081582 Pascal-(1,7,1) array.

Original entry on oeis.org

1, 1, 1, 1, 9, 1, 1, 17, 17, 1, 1, 25, 97, 25, 1, 1, 33, 241, 241, 33, 1, 1, 41, 449, 1161, 449, 41, 1, 1, 49, 721, 3297, 3297, 721, 49, 1, 1, 57, 1057, 7161, 14721, 7161, 1057, 57, 1, 1, 65, 1457, 13265, 44961, 44961, 13265, 1457, 65, 1, 1, 73, 1921, 22121, 108353, 192969, 108353, 22121, 1921, 73, 1
Offset: 0

Views

Author

Paul Barry, Mar 23 2003

Keywords

Comments

One of a family of Pascal-like arrays. A007318 is equivalent to the (1,0,1)-array. A008288 is equivalent to the (1,1,1)-array. Rows include A017077, A081593, A081594. Coefficients of the row polynomials in the Newton basis are given by A013614.

Examples

			Rows begin
  1,  1,   1,    1,     1, ... A000012;
  1,  9,  17,   25,    33, ... A017077;
  1, 17,  97,  241,   449, ... A081593;
  1, 25, 241, 1161,  3297, ...
  1, 33, 449, 3297, 14721, ...
Triangle begins:
  1;
  1,  1;
  1,  9,    1;
  1, 17,   17,    1;
  1, 25,   97,   25,     1;
  1, 33,  241,  241,    33,    1;
  1, 41,  449, 1161,   449,   41,    1;
  1, 49,  721, 3297,  3297,  721,   49,  1;
  1, 57, 1057, 7161, 14721, 7161, 1057, 57, 1;
		

Crossrefs

Cf. Pascal (1,m,1) array: A123562 (m = -3), A098593 (m = -2), A000012 (m = -1), A007318 (m = 0), A008288 (m = 1), A081577 (m = 2), A081578 (m = 3), A081579 (m = 4), A081580 (m = 5), A081581 (m = 6), A143683 (m = 8).

Programs

  • Magma
    A081582:= func< n,k,q | (&+[Binomial(k, j)*Binomial(n-j, k)*q^j: j in [0..n-k]]) >;
    [A081582(n,k,7): k in [0..n], n in [0..12]]; // G. C. Greubel, May 26 2021
    
  • Mathematica
    Table[ Hypergeometric2F1[-k, k-n, 1, 8], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, May 24 2013 *)
  • Sage
    flatten([[hypergeometric([-k, k-n], [1], 8).simplify() for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 26 2021

Formula

T(n,k) = Sum_{j = 0..n-k} binomial(n-k,j)*binomial(k,j)*8^j.
Riordan array (1/(1 - x), x*(1 + 7*x)/(1 - x)).
Square array T(n, k) defined by T(n, 0) = T(0, k)=1, T(n, k) = T(n, k-1) + 7*T(n-1, k-1) + T(n-1, k).
Rows are the expansions of (1 + 7*x)^k/(1 - x)^(k+1).
T(n, k) = Hypergeometric2F1([-k, k-n], [1], 8). - Jean-François Alcover, May 24 2013
E.g.f. for the n-th subdiagonal, n = 0,1,2,..., equals exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} binomial(n,k)*(8*x)^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 + 16*x + 64*x^2/2) = 1 + 17*x + 97*x^2/2! + 241*x^3/3! + 449*x^4/4! + 721*x^5/5! + .... - Peter Bala, Mar 05 2017
Sum_{k=0..n} T(n, k) = A015519(n+1). - G. C. Greubel, May 26 2021

A047471 Numbers that are congruent to {1, 3} mod 8.

Original entry on oeis.org

1, 3, 9, 11, 17, 19, 25, 27, 33, 35, 41, 43, 49, 51, 57, 59, 65, 67, 73, 75, 81, 83, 89, 91, 97, 99, 105, 107, 113, 115, 121, 123, 129, 131, 137, 139, 145, 147, 153, 155, 161, 163, 169, 171, 177, 179, 185, 187, 193, 195, 201, 203, 209, 211, 217, 219, 225, 227, 233
Offset: 1

Views

Author

Keywords

Examples

			For n=2, a(2) = 8*2-1-12 = 3;
For n=3, a(3) = 8*3-3-12 = 9;
For n=4, a(4) = 8*4-9-12 = 11. - _Vincenzo Librandi_, Aug 06 2010
		

Crossrefs

Union of A017077 and A017101.
Cf. A033200 (primes).

Programs

  • Haskell
    a047471 n = a047471_list !! (n-1)
    a047471_list = [n | n <- [1..], mod n 8 `elem` [1,3]]
    -- Reinhard Zumkeller, Dec 29 2012
    
  • Magma
    [4*(n-1)-(-1)^n : n in [1..80]]; // Wesley Ivan Hurt, Apr 28 2017
  • Maple
    A047471:=n->4*n - 4 - (-1)^n; seq(A047471(n), n=1..100); # Wesley Ivan Hurt, Jan 30 2014
  • Mathematica
    Table[4 n - 4 - (-1)^n, {n, 100}] (* Wesley Ivan Hurt, Jan 30 2014 *)
    #+{1,3}&/@(8*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,3,9},60] (* Harvey P. Dale, Jan 05 2017 *)

Formula

G.f.: x*(1+2*x+5*x^2)/((1+x)*(1-x)^2). - Paul Barry, Apr 10 2008
a(n) = 4*(n-1)-(-1)^n. - Rolf Pleisch, Aug 04 2009
a(n) = 8*n-a(n-1)-12, with a(1)=1. - Vincenzo Librandi, Aug 06 2010
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + sqrt(2)*log(sqrt(2)+1)/4. - Amiram Eldar, Dec 18 2021

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A047529 Numbers that are congruent to {1, 3, 7} mod 8.

Original entry on oeis.org

1, 3, 7, 9, 11, 15, 17, 19, 23, 25, 27, 31, 33, 35, 39, 41, 43, 47, 49, 51, 55, 57, 59, 63, 65, 67, 71, 73, 75, 79, 81, 83, 87, 89, 91, 95, 97, 99, 103, 105, 107, 111, 113, 115, 119, 121, 123, 127, 129, 131, 135, 137, 139, 143, 145, 147, 151, 153, 155, 159
Offset: 1

Views

Author

Keywords

Comments

Terms that occur on the first two rows of array A257852. Odd numbers that are not of the form 4k+1, where k is an odd number. - Antti Karttunen, Jun 06 2024

Examples

			G.f. = x + 3*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 15*x^6 + 17*x^7 + 19*x^8 + 23*x^9 + ...
		

Crossrefs

Setwise difference A005408 \ A004770.
Disjoint union of A004767 and A017077; see A257852.

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [1, 3, 7]]; // Wesley Ivan Hurt, Jun 13 2016
  • Maple
    A047529:=n->(24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9: seq(A047529(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
  • Mathematica
    Select[Range[150], MemberQ[{1,3,7}, Mod[#,8]]&] (* Harvey P. Dale, May 02 2011 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 3, 7, 9}, 100] (* Vincenzo Librandi, Jun 14 2016 *)
  • PARI
    Vec(x*(x^3+4*x^2+2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 12 2015
    
  • PARI
    {a(n) = n\3 * 8 + [-1, 1, 3][n%3 + 1]}; /* Michael Somos, Nov 15 2015 */
    

Formula

a(n) = (24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9. - Fred Daniel Kline, Nov 12 2015
From Colin Barker, Nov 12 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x*(x^3+4*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)). (End)
a(n+3) = a(n) + 8 for all n in Z. - Michael Somos, Nov 15 2015
a(3k) = 8k-1, a(3k-1) = 8k-5, a(3k-2) = 8k-7. - Wesley Ivan Hurt, Jun 13 2016
a(n) = 8 * floor((n-1) / 3) + 2^(((n-1) mod 3) + 1) - 1. - Fred Daniel Kline, Aug 09 2016
a(n) = 2*(n + floor(n/3)) - 1. - Wolfdieter Lang, Sep 10 2021

A227238 Numbers whose base-9 sum of digits is 9.

Original entry on oeis.org

17, 25, 33, 41, 49, 57, 65, 73, 89, 97, 105, 113, 121, 129, 137, 145, 153, 169, 177, 185, 193, 201, 209, 217, 225, 249, 257, 265, 273, 281, 289, 297, 329, 337, 345, 353, 361, 369, 409, 417, 425, 433, 441, 489, 497, 505, 513, 569, 577, 585, 649, 657, 737, 745
Offset: 1

Views

Author

Tom Edgar, Sep 01 2013

Keywords

Comments

All of the entries are odd.
Subsequence of A017077. - Michel Marcus, Sep 02 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The 9-ary expansion of 17 is (1,8), which has sum of digits 9.
The 9-ary expansion of 169 is (2,0,7), which has sum of digits 9.
10 is not on the list since the 9-ary expansion of 10 is (1,1), which has sum of digits 2 not 9.
		

Crossrefs

Cf. A226636 (b = 3), A226969 (b = 4), A227062 (b = 5), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Mathematica
    Select[Range@ 750, Total@ IntegerDigits[#, 9] == 9 &] (* Michael De Vlieger, Dec 23 2016 *)
  • PARI
    select( is(n)=sumdigits(n,9)==9, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    agen = A226636gen(sod=9, base=9) # generator of terms using code in A226636
    print([next(agen) for n in range(1, 55)]) # Michael S. Branicky, Jul 10 2022
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=9))==9]
    

A238475 Rectangular array with all start numbers Me(n, k), k >= 1, for the Collatz operation ud^(2*n), n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

1, 9, 5, 17, 37, 21, 25, 69, 149, 85, 33, 101, 277, 597, 341, 41, 133, 405, 1109, 2389, 1365, 49, 165, 533, 1621, 4437, 9557, 5461, 57, 197, 661, 2133, 6485, 17749, 38229, 21845, 65, 229, 789, 2645, 8533, 25941, 70997, 152917, 87381
Offset: 1

Views

Author

Wolfdieter Lang, Mar 10 2014

Keywords

Comments

The two operations on natural numbers m used in the Collatz 3x+1 conjecture (see the links) are here (following the M. Trümper reference) denoted by u for 'up' and d for 'down': u m = 3*m+1, if m is odd, and d m = m/2 if m is even. The present array gives all positive start numbers Me(n, k), k >= 1, for Collatz sequences following the pattern (word) ud^(2*n), for n >= 1, which end in an odd number. The end number does not depend on n and it is given by Ne(k) = 6*k - 5.
This rectangular array is Example 2.1. with x = 2*n, n >= 1, of the M. Trümper reference, pp. 4-5, written as a triangle by taking NE-SW diagonals. The case x = 2*n+1, n >= 0, for the word ud^(2*k+1) appears as array and triangle in A238476.
The first row sequences of the array Me (they become columns in the triangle Te) are A017077, A238477, A239123, ...
Note that there are also Collatz sequences starting with an odd number, following the pattern ud^(2*n) which end in an even number. For example, take n=1 and the sequence [5, 16, 8, 4]. Such sequences are here not considered.

Examples

			The rectangular array Me(n, k) begins:
n\k      1       2       3        4       5        6        7        8        9       10 ...
1:       1       9      17       25      33       41       49       57       65       73
2:       5      37      69      101     133      165      197      229      261      293
3:      21     149     277      405     533      661      789      917     1045     1173
4:      85     597    1109     1621    2133     2645     3157     3669     4181     4693
5:     341    2389    4437     6485    8533    10581    12629    14677    16725    18773
6:    1365    9557   17749    25941   34133    42325    50517    58709    66901    75093
7:    5461   38229   70997   103765  136533   169301   202069   234837   267605   300373
8:   21845  152917  283989   415061  546133   677205   808277   939349  1070421  1201493
9:   87381  611669 1135957  1660245 2184533  2708821  3233109  3757397  4281685  4805973
10: 349525 2446677 4543829  6640981 8738133 10835285 12932437 15029589 17126741 19223893
...
The triangle Te(m, n) begins (zeros are not shown):
m\n   1    2    3     4      5      6       7       8       9      10 ...
1:    1
2:    9    5
3:   17   37   21
4:   25   69  149    85
5:   33  101  277   597    341
6:   41  133  405  1109   2389   1365
7:   49  165  533  1621   4437   9557    5461
8:   57  197  661  2133   6485  17749   38229   21845
9:   65  229  789  2645   8533  25941   70997  152917   87381
10:  73  261  917  3157  10581  34133  103765  283989  611669  349525
...
----------------------------------------------------------------------------------------------
n=1, ud^2, k=1: Me(1, 1) = 1 = Te(1, 1), Ne(1) = 1 with the Collatz sequence [1, 4, 2, 1] of length 4.
n=1, ud^2, k=2: Me(1, 2) = 9 = Te(2, 1), Ne(2) = 7 with the Collatz sequence [9, 28, 14, 7] of length 4.
n=2, ud^4, k=1: Me(2, 1) = 5 = Te(2, 2), Ne(1) = 1 with the length 6 Collatz sequence [5, 16, 8, 4, 2, 1].
n=5, ud^(10), k=2: Me(5, 2) =  2389  = Te(6,5),  Ne(2) = 7 with the Collatz sequence [2389, 7168, 3584, 1792, 896, 448, 224, 112, 56, 28, 14, 7] of length 12.
		

Crossrefs

Formula

The array: Me(n, k) = 2^(2*n+1)*k - (5*2^(2*n)+1)/3 for n >= 1 and k >= 1.
The triangle: Te(m, n) = Me(n, m-n+1) = 2*4^n*(m-n) + (4^n-1)/3 for m >= n >= 1 and 0 for m < n.

A047393 Numbers that are congruent to {0, 1} mod 8.

Original entry on oeis.org

0, 1, 8, 9, 16, 17, 24, 25, 32, 33, 40, 41, 48, 49, 56, 57, 64, 65, 72, 73, 80, 81, 88, 89, 96, 97, 104, 105, 112, 113, 120, 121, 128, 129, 136, 137, 144, 145, 152, 153, 160, 161, 168, 169, 176, 177, 184, 185, 192, 193, 200, 201, 208, 209, 216, 217, 224, 225, 232
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that floor(k/2) = 4*floor(k/8). - Bruno Berselli, Oct 05 2017

Crossrefs

Union of A008590 and A017077.

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+8 od: seq(a[n], n=0..58); # Zerinvary Lajos, Mar 16 2008
  • Mathematica
    Riffle[#, # + 1] & [Range[0, 400, 8]] (* Paolo Xausa, Mar 11 2025 *)
  • PARI
    forstep(n=0,200,[1,7],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
    
  • PARI
    a(n) = 4*n - 11/2 - 3*(-1)^n/2; \\ David Lovler, Jul 25 2022
    
  • Python
    def A047393(n): return n-1<<2 if n&1 else (n<<2)-7 # Chai Wah Wu, Mar 11 2025

Formula

a(n) = 8*n - a(n-1) - 15 for n>1, a(1)=0. - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 4*n - 11/2 - 3*(-1)^n/2.
G.f.: x^2*(1+7*x) / ( (1+x)*(x-1)^2 ). (End)
a(n+1) = Sum_{k>=0} A030308(n,k)*A146541(k). - Philippe Deléham, Oct 17 2011
Sum_{n>=2} (-1)^n/a(n) = (sqrt(2)+1)*Pi/16 + log(2)/2 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
E.g.f.: ((8*x - 3)*exp(x) + 3*exp(-x))/2 = 4*x*exp(x) - 3*sinh(x). - David Lovler, Aug 02 2022

Extensions

More terms from James Sellers, Jun 20 2000

A371096 Array A read by upward antidiagonals in which the entry A(n,k) in row n and column k is defined by A(1, k) = 8*k-7, and A(n+1, k) = A371094(A(n, k)), n,k >= 1.

Original entry on oeis.org

1, 21, 9, 5461, 117, 17, 357913941, 11605, 213, 25, 1537228672809129301, 72701269, 87381, 309, 33, 28356863910078205288614550619314017621, 3752999689475413, 91625968981, 30037, 405, 41, 9649340769776349618630915417390658987772498722136713669954798667326094136661, 27043212804868893898596335048021, 100743818301219097892181, 760567125, 79189, 501, 49
Offset: 1

Views

Author

Antti Karttunen, Apr 21 2024

Keywords

Examples

			Array begins:
n\k|         1         2            3          4           5          6
---+--------------------------------------------------------------------
1  |         1,        9,          17,        25,         33,        41,
2  |        21,      117,         213,       309,        405,       501,
3  |      5461,    11605,       87381,     30037,      79189,     48469,
4  | 357913941, 72701269, 91625968981, 760567125, 1968526677, 299193685,
		

Crossrefs

Cf. A371094, A017077 (row 1).
Every fourth column (1, 5, 9, 13, 17, ...) of array A372282.
Cf. also arrays A257852, A371100 and A371102.

Programs

  • PARI
    up_to = 28;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A371096sq(n,k) = if(1==n,8*k-7,A371094(A371096sq(n-1,k)));
    A371096list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A371096sq((a-(col-1)),col))); (v); };
    v371096 = A371096list(up_to);
    A371096(n) = v371096[n];

A342819 Table read by ascending antidiagonals: T(k, n) is the number of distinct values of the magic constant in a perimeter-magic k-gon of order n.

Original entry on oeis.org

4, 4, 7, 6, 9, 10, 6, 11, 12, 13, 8, 13, 16, 17, 16, 8, 15, 18, 21, 20, 19, 10, 17, 22, 25, 26, 25, 22, 10, 19, 24, 29, 30, 31, 28, 25, 12, 21, 28, 33, 36, 37, 36, 33, 28, 12, 23, 30, 37, 40, 43, 42, 41, 36, 31, 14, 25, 34, 41, 46, 49, 50, 49, 46, 41, 34, 14, 27, 36, 45, 50, 55, 56, 57, 54, 51, 44, 37
Offset: 3

Views

Author

Stefano Spezia, Mar 22 2021

Keywords

Examples

			The table begins:
k\n|  3   4   5   6   7 ...
---+-------------------
3  |  4   7  10  13  16 ...
4  |  4   9  12  17  20 ...
5  |  6  11  16  21  26 ...
6  |  6  13  18  25  30 ...
7  |  8  15  22  29  36 ...
...
		

Crossrefs

Cf. A005408 (n = 4), A016813 (n = 6), A016921 (n = 8), A017077 (n = 10), A146951 (n = 7), A238290 (n = 9), A342757, A342758.

Programs

  • Mathematica
    T[k_,n_]:=k(n-2)+(Mod[k,2]-1)Mod[n,2]+1;Table[T[k+3-n,n],{k,3,14},{n,3,k}]//Flatten

Formula

O.g.f.: (1 - y + 2*x*(y^2 + y - 1) + x^2*(4*y^2 + y - 3))/((1 - x)^2*(1 + x)*(1 - y)^2*(1 + y)).
E.g.f.: (1 + x*(y - 2))*cosh(x + y) + cosh(y)*sinh(x) + x*(y - 2)*sinh(x + y).
T(k, n) = k*(n - 2) + ((k mod 2) - 1)*(n mod 2) + 1.
T(k, n) = A342758(k, n) - A342757(k, n) + 1.

A130154 Triangle read by rows: T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 9, 7, 1, 1, 9, 13, 13, 9, 1, 1, 11, 17, 19, 17, 11, 1, 1, 13, 21, 25, 25, 21, 13, 1, 1, 15, 25, 31, 33, 31, 25, 15, 1, 1, 17, 29, 37, 41, 41, 37, 29, 17, 1, 1, 19, 33, 43, 49, 51, 49, 43, 33, 19, 1, 1, 21, 37, 49, 57, 61, 61, 57, 49, 37, 21, 1
Offset: 1

Views

Author

Emeric Deutsch, May 22 2007

Keywords

Comments

Column k, except for the initial k-1 0's, is an arithmetic progression with first term 1 and common difference 2(k-1). Row sums yield A116731. First column of the inverse matrix is A129779.
Studied by Paul Curtz circa 1993.
From Rogério Serôdio, Dec 19 2017: (Start)
T(n, k) gives the number of distinct sums of 2(k-1) elements in {1,1,2,2,...,n-1,n-1}. For example, T(6, 2) = the number of distinct sums of 2 elements in {1,1,2,2,3,3,4,4,5,5}, and because each sum from the smallest 1 + 1 = 2 to the largest 5 + 5 = 10 appears, T(6, 2) = 10 - 1 = 9. [In general: 2*(Sum_{j=1..(k-1)} n-j) - (2*(Sum_{j=1..k-1} j) - 1) = 2*n*(k-1) - 4*(k-1)*k/2 + 1 = 2*(k-1)*(n-k) + 1 = T(n, k). - Wolfdieter Lang, Dec 20 2017]
T(n, k) is the number of lattice points with abscissa x = 2*(k-1) and even ordinate in the closed region bounded by the parabola y = x*(2*(n-1) - x) and the x axis. [That is, (1/2)*y(2*(k-1)) + 1 = T(n, k). - Wolfdieter Lang, Dec 20 2017]
Pascal's triangle (A007318, but with apex in the middle) is formed using the rule South = West + East; the rascal triangle A077028 uses the rule South = (West*East + 1)/North; the present triangle uses a similar rule: South = (West*East + 2)/North. See the formula section for this recurrence. (End)

Examples

			The triangle T(n, k) starts:
  n\k  1  2  3  4  5  6  7  8  9 10 ...
  1:   1
  2:   1  1
  3:   1  3  1
  4:   1  5  5  1
  5:   1  7  9  7  1
  6:   1  9 13 13  9  1
  7:   1 11 17 19 17 11  1
  8:   1 13 21 25 25 21 13  1
  9:   1 15 25 31 33 31 25 15  1
 10:   1 17 29 37 41 41 37 29 17  1
 ... reformatted. - _Wolfdieter Lang_, Dec 19 2017
		

Crossrefs

Column sequences (no leading zeros): A000012, A016813, A016921, A017077, A017281, A017533, A131877, A158057, A161705, A215145.

Programs

  • GAP
    Flat(List([1..12], n-> List([1..n], k-> 1 + 2*(n-k)*(k-1) ))); # G. C. Greubel, Nov 25 2019
  • Magma
    [1 + 2*(n-k)*(k-1): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 25 2019
    
  • Maple
    T:=proc(n,k) if k<=n then 2*(n-k)*(k-1)+1 else 0 fi end: for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[1+2(n-k)(k-1),{n,0,20},{k,n}]] (* Harvey P. Dale, Jul 13 2013 *)
  • PARI
    T(n, k) = 1 + 2*(n-k)*(k-1) \\ Iain Fox, Dec 19 2017
    
  • PARI
    first(n) = my(res = vector(binomial(n+1,2)), i = 1); for(r=1, n, for(k=1, r, res[i] = 1 + 2*(r-k)*(k-1); i++)); res \\ Iain Fox, Dec 19 2017
    
  • Sage
    [[1 + 2*(n-k)*(k-1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 25 2019
    

Formula

T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).
G.f.: G(t,z) = t*z*(3*t*z^2 - z - t*z + 1)/((1-t*z)*(1-z))^2.
Equals = 2 * A077028 - A000012 as infinite lower triangular matrices. - Gary W. Adamson, Oct 23 2007
T(n, 1) = 1 and T(n, n) = 1 for n >= 1; T(n, k) = (T(n-1, k-1)*T(n-1, k) + 2)/T(n-2, k-1), for n > 2 and 1 < k < n. See a comment above. - Rogério Serôdio, Dec 19 2017
G.f. column k (with leading zeros): (x^k/(1-x)^2)*(1 + (2*k-3)*x), k >= 1. See the g.f. of the triangle G(t,z) above: (d/dt)^k G(t,x)/k!|{t=0}. - _Wolfdieter Lang, Dec 20 2017

Extensions

Edited by Wolfdieter Lang, Dec 19 2017
Previous Showing 11-20 of 66 results. Next