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 14 results. Next

A074149 Sum of terms in each group in A074147.

Original entry on oeis.org

1, 6, 15, 36, 65, 114, 175, 264, 369, 510, 671, 876, 1105, 1386, 1695, 2064, 2465, 2934, 3439, 4020, 4641, 5346, 6095, 6936, 7825, 8814, 9855, 11004, 12209, 13530, 14911, 16416, 17985, 19686, 21455, 23364, 25345, 27474, 29679, 32040, 34481, 37086
Offset: 1

Views

Author

Amarnath Murthy, Aug 28 2002

Keywords

Comments

The odd-indexed entries are the sums pertaining to the corresponding magic squares.

Crossrefs

Programs

Formula

a(2n-1) = 4n^3 - 6n^2 + 4n - 1, a(2n) = 4n^3 + 2n. a(n) = (n^3 + n)/2 if n odd, n^3/2 + n if n even. a(n) = n^3/2 + n(3 + (-1)^n)/4. - Franklin T. Adams-Watters, Jul 17 2006
G.f.: x*(x^2+1)*(x^2+4*x+1) / ( (1+x)^2*(x-1)^4 ). - R. J. Mathar, Mar 07 2011
E.g.f.: x*((2 + 3*x + x^2)*cosh(x) + (3 + 3*x + x^2)*sinh(x))/2. - Stefano Spezia, May 07 2021
a(n) = n*(n^2-A000035(n))/2 + n. - Chai Wah Wu, Aug 30 2022

Extensions

More terms from Franklin T. Adams-Watters, Jul 17 2006

A082735 Product of n-th group of terms in A074147.

Original entry on oeis.org

1, 8, 105, 5760, 328185, 42577920, 5568833025, 1300252262400, 304513870485825, 111644006842368000, 40992233865440682825, 21695920874860629196800, 11492457771692770753505625, 8291067715225260172247040000
Offset: 1

Views

Author

Amarnath Murthy, Apr 14 2003

Keywords

Crossrefs

Programs

Formula

a(1) = 1, a(2n) = product of next 2n even numbers. a(2n+1) = product of next 2n+1 odd numbers.
a(n)=A006882[A074148(n)]/A006882[A074148(n-2)]. a(2n-1)=A062031(n). a(2n)=A062030(n). # R. J. Mathar, Jul 17 2007

Extensions

Corrected and extended by R. J. Mathar, Jul 17 2007

A082736 LCM of n-th group of terms in A074147.

Original entry on oeis.org

1, 4, 105, 120, 109395, 55440, 1856277675, 42325920, 966710699955, 7210803600, 303646176781042095, 43790142876480, 2432266195067253069525, 6338767304469600, 12793596869123737224933375, 659267412349963697280
Offset: 1

Views

Author

Amarnath Murthy, Apr 14 2003

Keywords

Crossrefs

Programs

Formula

a(1) = 1, a(2n) = LCM of next 2n even numbers. a(2n+1) = LCM of next 2n+1 odd numbers.

Extensions

More terms from R. J. Mathar, Jul 17 2007

A074148 a(n) = n + floor(n^2/2).

Original entry on oeis.org

1, 4, 7, 12, 17, 24, 31, 40, 49, 60, 71, 84, 97, 112, 127, 144, 161, 180, 199, 220, 241, 264, 287, 312, 337, 364, 391, 420, 449, 480, 511, 544, 577, 612, 647, 684, 721, 760, 799, 840, 881, 924, 967, 1012, 1057, 1104, 1151, 1200, 1249, 1300, 1351, 1404, 1457
Offset: 1

Views

Author

Amarnath Murthy, Aug 28 2002

Keywords

Comments

Last term in each group in A074147.
Index of the last occurrence of n in A100795.
Equals row sums of an infinite lower triangular matrix with alternate columns of (1, 3, 5, 7, ...) and (1, 1, 1, ...). - Gary W. Adamson, May 16 2010
a(n) = A214075(n+2,2). - Reinhard Zumkeller, Jul 03 2012
The heart pattern appears in (n+1) X (n+1) coins. Abnormal orientation heart is A065423. Normal heart is A093005 (A074148 - A065423). Void is A007590. See illustration in links. - Kival Ngaokrajang, Sep 11 2013
a(n+1) is the smallest size of an n-prolific permutation; a permutation of s letters is n-prolific if each (s - n)-subset of the letters in its one-line notation forms a unique pattern. - David Bevan, Nov 30 2016
For n > 2, a(n-1) is the smallest size of a nontrivial permuted packing of diamond tiles with diagonal length n; a permuted packing is a translational packing for which the set of translations is the plot of a permutation. - David Bevan, Nov 30 2016
Also the length of a longest path in the (n+1) X (n+1) bishop and black bishop graphs. - Eric W. Weisstein, Mar 27 2018
Row sums of A143182 triangle - Nikita Sadkov, Oct 10 2018

Examples

			Equals row sums of the generating triangle:
   1;
   3,  1;
   5,  1,  1;
   7,  1,  3,  1;
   9,  1,  5,  1,  1;
  11,  1,  7,  1,  3,  1;
  13,  1,  9,  1,  5,  1,  1;
  15,  1, 11,  1,  7,  1,  3,  1;
  ...
Example: a(5) = 17 = (9 + 1 + 5 + 1 + 1). - _Gary W. Adamson_, May 16 2010
The smallest 1-prolific permutations are 3142 and its symmetries; a(2) = 4. The smallest 2-prolific permutations are 3614725 and its symmetries; a(3) = 7. - _David Bevan_, Nov 30 2016
		

Crossrefs

a(n) = A000982(n+1) - 1.
Antidiagonal sums of A237447 & A237448.

Programs

Formula

a(n) = (2*n^2 + 4*n + (-1)^n - 1)/4. - Vladeta Jovovic, Apr 06 2003
a(n) = A109225(n,2) for n > 1. - Reinhard Zumkeller, Jun 23 2005
a(n) = +2*a(n-1) - 2*a(n-3) + 1*a(n-4). - Joerg Arndt, Apr 02 2011
a(n) = a(n-2) + 2*n, a(0) = 0, a(1) = 1. - Paul Barry, Jul 17 2004
From R. J. Mathar, Aug 30 2008: (Start)
G.f.: x*(1 + 2*x - x^2)/((1 - x)^3*(1 + x)).
a(n) + a(n+1) = A028387(n).
a(n+1) - a(n) = A109613(n+1). (End)
a(n) = floor(n^4/(2n^2 + 1)) with offset 2..a(2) = 1. - Gary Detlefs, Feb 11 2010
a(n) = n + floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
From Franck Maminirina Ramaharo, Jan 04 2019: (Start)
a(n) = n*(n + 1)/2 + floor(n/2) = A000217(n) + A004526(n).
E.g.f.: (exp(-x) - (1 - 6*x - 2*x^2)*exp(x))/4. (End)
Sum_{n>=1} 1/a(n) = 1 - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)). - Amiram Eldar, Sep 16 2022

Extensions

More terms from Vladeta Jovovic, Apr 06 2003
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
Further edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
Description simplified by Eric W. Weisstein, Mar 27 2018

A317614 a(n) = (1/2)*(n^3 + n*(n mod 2)).

Original entry on oeis.org

1, 4, 15, 32, 65, 108, 175, 256, 369, 500, 671, 864, 1105, 1372, 1695, 2048, 2465, 2916, 3439, 4000, 4641, 5324, 6095, 6912, 7825, 8788, 9855, 10976, 12209, 13500, 14911, 16384, 17985, 19652, 21455, 23328, 25345, 27436, 29679, 32000, 34481, 37044, 39775, 42592
Offset: 1

Views

Author

Stefano Spezia, Aug 01 2018

Keywords

Comments

Terms are obtained as partial sums in an algorithm for the generation of the sequence of the fourth powers (A000583). Starting with the sequence of the positive integers (A000027), it is necessary to delete every 4th term and to consider the partial sums of the obtained sequence, then to delete every 3rd term, and lastly to consider again the partial sums (see References).
a(n) is the trace of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern as shown in the examples below. Specifically, M(n) is defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even, and it has det(M(n)) = 0 for n > 2 (proved).
From Saeed Barari, Oct 31 2021: (Start)
Also the sum of the entries in an n X n matrix whose elements start from 1 and increase as they approach the center. For instance, in case of n=5, the entries of the following matrix sum to 65:
1 2 3 2 1
2 3 4 3 2
3 4 5 4 3
2 3 4 3 2
1 2 3 2 1. (End)
The n X n square matrix of the preceding comment is defined as: A[i,j,n] = n - abs((n + 1)/2 - j) - abs((n + 1)/2 - i). - Stefano Spezia, Nov 05 2021

Examples

			For n = 1 the matrix M(1) is
  1
with trace Tr(M(1)) = a(1) = 1.
For n = 2 the matrix M(2) is
  1, 2
  4, 3
with Tr(M(2)) = a(2) = 4.
For n = 3 the matrix M(3) is
  1, 2, 3
  6, 5, 4
  7, 8, 9
with Tr(M(3)) = a(3) = 15.
		

References

  • Edward A. Ashcroft, Anthony A. Faustini, Rangaswami Jagannathan, and William W. Wadge, Multidimensional Programming, Oxford University Press 1995, p. 12.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 64.
  • G. Polya, Mathematics and Plausible Reasoning: Induction and analogy in mathematics, Princeton University Press 1990, p. 118.
  • Shailesh Shirali, A Primer on Number Sequences, Universities Press (India) 2004, p. 106.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.7.3 on pages 122-123.

Crossrefs

Cf. A000583, A000027, A186424 (first differences).
Cf. related to the M matrices: A074147 (antidiagonals), A130130 (rank), A241016 (row sums), A317617 (column sums), A322277 (permanent), A323723 (subdiagonal sums), A323724 (superdiagonal sums).

Programs

  • GAP
    a_n:=List([1..nmax], n->(1/2)*(n^3 + n*RemInt(n, 2)));
    
  • GAP
    List([1..50],n->(1/2)*(n^3+n*(n mod 2))); # Muniru A Asiru, Aug 24 2018
  • Magma
    [IsEven(n) select n^3/2 else (n^3+n)/2: n in [1..50]]; // Vincenzo Librandi, Aug 07 2018
    
  • Maple
    a:=n->(1/2)*(n^3+n*modp(n,2)): seq(a(n),n=1..50); # Muniru A Asiru, Aug 24 2018
  • Mathematica
    CoefficientList[Series[1/4 E^-x (1 + 3 E^(2 x) + 6 E^(2 x) x + 2 E^(2 x) x^2), {x, 0, 45}], x]*Table[(k + 1)!, {k, 0, 45}]
    CoefficientList[Series[-(1 + x^2)/((-1 + x)*(1 + x)^3), {x, 0, 45}], x]*Table[(k + 1)*(-1)^k, {k, 0, 45}]
    CoefficientList[Series[-(1 + x^2)/((-1 + x)^3*(1 + x)), {x, 0, 45}], x]*Table[(k + 1), {k, 0, 45}]
    From Robert G. Wilson v, Aug 01 2018: (Start)
    a[i_, j_, n_] := If[OddQ@ i, j + n (i - 1), n*i - j + 1]; f[n_] := Tr[Table[a[i, j, n], {i, n}, {j, n}]]; Array[f, 45]
    CoefficientList[Series[(x^4 + 2x^3 + 6x^2 + 2x + 1)/((x - 1)^4 (x + 1)^2), {x, 0, 45}], x]
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 4, 15, 32, 65, 108}, 45]
    (End)
  • Maxima
    a(n):=(1/2)*(n^3 + n*mod(n,2))$ makelist(a(n), n, 1, nmax);
    
  • PARI
    Vec(x*(1 + 2*x + 6*x^2 + 2*x^3 + x^4) / ((1 - x)^4*(1 + x)^2) + O(x^40)) \\ Colin Barker, Aug 02 2018
    
  • PARI
    M(i, j, n) = if (i % 2, j + n*(i-1), n*i - j + 1);
    a(n) = sum(k=1, n, M(k, k, n)); \\ Michel Marcus, Aug 07 2018
    
  • R
    for (n in 1:nmax){
       a <- (n^3+n*n%%2)/2
       output <- c(n, a)
       cat(output, "\n")
    }
    (MATLAB and FreeMat)
    for(n=1:nmax); a=(n^3+n*mod(n,2))/2; fprintf('%d\t%0.f\n',n,a); end
    

Formula

a(n) = (1/2)*(A000578(n) + n*A000035(n)).
a(n) = A006003(n) - (n/2)*(1 - (n mod 2)).
a(n) = Sum_{k=1..n} T(n,k), where T(n,k) = ((n + 1)*k - n)*(n mod 2) + ((n - 1)*k + 1)*(1 - (n mod 2)).
E.g.f.: E(x) = (1/4)*exp(-x)*x*(1 + 3*exp(2*x) + 6*exp(2*x)*x + 2*exp(2*x)*x^2).
L.g.f.: L(x) = -x*(1 + x^2)/((-1 + x)*(1 + x)^3).
H.l.g.f.: LH(x) = -x*(1 + x^2)/((-1 + x)^3*(1 + x)).
Dirichlet g.f.: (1/2)*(Zeta(-3 + s) + 2^(-s)*(-2 + 2^s)*Zeta(-1 + s)).
From Colin Barker, Aug 02 2018: (Start)
G.f.: x*(1 + 2*x + 6*x^2 + 2*x^3 + x^4) / ((1 - x)^4*(1 + x)^2).
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n>6.
a(n) = n^3/2 for n even.
a(n) = (n^3+n)/2 for n odd. (End)
a(2*n) = A317297(n+1) + A001489(n). - Stefano Spezia, Dec 28 2018
Sum_{n>0} 1/a(n) = (1/2)*(-2*polygamma(0, 1/2) + polygamma(0, (1-i)/2)+ polygamma(0, (1+i)/2)) + zeta(3)/4 approximately equal to 1.3959168891658447368440622669882813003351669... - Stefano Spezia, Feb 11 2019
a(n) = (A000578(n) + A193356(n))/2. - Stefano Spezia, Jun 27 2022
a(n) = A210378(n-1)/n. - Stefano Spezia, Jul 15 2024

A061925 a(n) = ceiling(n^2/2) + 1.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 19, 26, 33, 42, 51, 62, 73, 86, 99, 114, 129, 146, 163, 182, 201, 222, 243, 266, 289, 314, 339, 366, 393, 422, 451, 482, 513, 546, 579, 614, 649, 686, 723, 762, 801, 842, 883, 926, 969, 1014, 1059, 1106, 1153, 1202, 1251, 1302, 1353, 1406
Offset: 0

Views

Author

Henry Bottomley, May 17 2001

Keywords

Comments

a(n+1) gives index of the first occurrence of n in A100795. - Amarnath Murthy, Dec 05 2004
First term in each group in A074148. - Amarnath Murthy, Aug 28 2002
From Christian Barrientos, Jan 01 2021: (Start)
For n >= 3, a(n) is the number of square polyominoes with at least 2n - 2 cells whose bounding box has size 2 X n.
For n = 3, there are 6 square polyominoes with a bounding box of size 2 X 3:
_ _ _ _ _
|||_| |||_| |||_| |||_| |||_| |||_
|||_| ||| || || || || |||
(End)
Except for a(2), a(n) agrees with the lower matching number of the (n+1) X (n+1) bishop graph up to at least n = 13. - Eric W. Weisstein, Dec 23 2024

Crossrefs

Programs

Formula

a(n) = a(n-1) + 2*floor((n-1)/2) + 1 = A061926(3, k) = 2*A002620(n+1) - (n-1) = A000982(n) + 1.
a(2*n) = a(2*n-1) + 2*n - 1 = 2*n^2 + 1 = A058331(n).
a(2*n+1) = a(2*n) + 2*n + 1 = 2*(n^2 + n + 1) = A051890(n+1).
a(n) = floor((n^2+3)/2). - Gary Detlefs, Feb 13 2010
From R. J. Mathar, Feb 19 2010: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1-x^2+2*x^3)/((1+x) * (1-x)^3). (End)
a(n) = (2*n^2 - (-1)^n + 5)/4. - Bruno Berselli, Sep 29 2011
a(n) = A007590(n+1) - n + 1. - Wesley Ivan Hurt, Jul 15 2013
a(n) + a(n+1) = A027688(n). a(n+1) - a(n) = A109613(n). - R. J. Mathar, Jul 20 2013
E.g.f.: ((2 + x + x^2)*cosh(x) + (3 + x + x^2)*sinh(x))/2. - Stefano Spezia, May 07 2021

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 09 2007

A322277 Permanent of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern.

Original entry on oeis.org

1, 11, 490, 60916, 15745548, 7477647372, 5799397213200, 6925325038489152, 11958227405868674880, 28853103567727115409600, 93561657023119005869616000, 398720531811315564754326938880, 2174628314166392755825875267321600, 14941853448103858870808931238617312000
Offset: 1

Views

Author

Stefano Spezia, Dec 01 2018

Keywords

Comments

M(n) is defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even.
det(M(1)) = 1, det(M(2)) = -5 and det(M(n)) = 0 for n > 2 (proved).
The trace of the matrix M(n) is A317614(n).

Examples

			For n = 1 the matrix M(1) is
  1
with permanent a(1) = 1.
For n = 2 the matrix M(2) is
  1, 2
  4, 3
with permanent a(2) = 11.
For n = 3 the matrix M(3) is
  1, 2, 3
  6, 5, 4
  7, 8, 9
with permanent a(3) = 490.
		

Crossrefs

Cf. A317614 (trace of matrix M(n)).
Cf. A241016 (row sums of M matrices), A317617 (column sums of M matrices), A074147 (antidiagonals of M matrices).

Programs

  • Maple
    with(LinearAlgebra):
    a := n -> Permanent(Matrix(n, (i, j) -> 1-j+i*n+(-1+2*j-n)*modp(i,2))):
    seq(a(n), n = 1 .. 20);
  • Mathematica
    M[i_, j_, n_] := 1 - j + i n + (-1 + 2 j - n) Mod[i, 2]; a[n_] := Permanent[Table[M[i, j, n], {i, n}, {j, n}]]; Array[a, 20]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i % 2, j + n*(i-1), n*i - j + 1)));
    vector(20, n, a(n))

A317617 Triangle T read by rows: T(n, k) = (n^3 + n)/2 + (k - (n + 1)/2)*(n mod 2).

Original entry on oeis.org

1, 5, 5, 14, 15, 16, 34, 34, 34, 34, 63, 64, 65, 66, 67, 111, 111, 111, 111, 111, 111, 172, 173, 174, 175, 176, 177, 178, 260, 260, 260, 260, 260, 260, 260, 260, 365, 366, 367, 368, 369, 370, 371, 372, 373, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 666
Offset: 1

Views

Author

Stefano Spezia, Aug 01 2018

Keywords

Comments

T(n, k) is the sum of the terms of the k-th column of an n X n square matrix M formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern (proved). The n X n square matrix M is defined as M[i, j, n] = j + n*(i - 1) if i is odd and M[i, j, n] = n*i - j + 1 if i is even (see the examples below).
The rows of even indices of the triangle T are made of all the same repeating number.

Examples

			n\k|   1   2   3   4   5   6
---+------------------------
1  |   1
2  |   5   5
3  |  14  15  16
4  |  34  34  34  34
5  |  63  64  65  66  67
6  | 111 111 111 111 111 111
...
For n = 1 the matrix M is
  1
with column sum 1.
For n = 2 the matrix M is
  1, 2
  4, 3
with column sums 5, 5.
For n = 3 the matrix M is
  1, 2, 3
  6, 5, 4
  7, 8, 9
with column sums 14, 15, 16.
		

Crossrefs

Cf. A006003, A000027, A000035, A037270 (row sums).
A317614(n): the trace of the n X n square matrix M.
A074147(n): the elements of the antidiagonal of the n X n square matrix M.
A241016(n): the triangle of the row sums of the n X n square matrix M.
A246697(n): the right diagonal of the triangle T.

Programs

  • GAP
    A317617 := function(n)
    local i, j, t;
    for i in [1 .. n] do
       for j in [1 .. i] do
          t := (i^3 + i)/2 + (j - (i + 1)/2)*(i mod 2);
          Print(t, "\t");
       od;
       Print("\n");
    od;
    end;
    A317617(11); # yields sequence in triangular form
    
  • GAP
    Flat(List([1..11],n->List([1..n],k->(n^3+n)/2+(k-(n+1)/2)*(n mod 2)))); # Muniru A Asiru, Aug 24 2018
  • Magma
    [[(n^3 + n)/2 + (k - (n + 1)/2)*(n mod 2): k in [1..n]]: n in [1..11]];
    
  • Maple
    a:=(n,k)->(n^3+n)/2+(k-(n+1)/2)*modp(n,2): seq(seq(a(n,k),k=1..n),n=1..11); # Muniru A Asiru, Aug 24 2018
  • Mathematica
    f[n_] := Table[SeriesCoefficient[(x*(x*(5 - 7*y) + x^4*(1 - 2*y) - x^3*(-3 + y) - 3*x^2*(-1 + y) + y))/((-1 + x)^4*(1 + x)^2*(-1 + y)^2), {x, 0, i}, {y, 0, j}], {i, n, n}, {j, 1, n}]; Flatten[Array[f, 11]]
    T[i_, j_, n_] := If[OddQ@ i, j + n*(i - 1), n*i - j + 1]; f[n_] := Plus @@@ Transpose[ Table[T[i, j, n], {i, n}, {j, n}]]; Array[f, 11] // Flatten  (* Robert G. Wilson v, Aug 01 2018 *)
    f[n_] := Table[SeriesCoefficient[1/4 E^(-x + y) (1 - x - 2 y + E^(2 x) (-1 + 3 x + 6 x^2 + 2 x^3 + 2 y)), {x, 0, i}, {y, 0, j}]*i!*j!, {i, n, n}, {j, 1, n}]; Flatten[Array[f, 11]] (* Stefano Spezia, Jan 10 2019 *)
  • Maxima
    sjoin(v, j) := apply(sconcat, rest(join(makelist(j, length(v)), v)))$ display_triangle(n) := for i from 1 thru n do disp(sjoin(makelist((i^3+i)/2+(j-(i+1)/2)*mod(i, 2), j, 1, i), " ")); display_triangle(10);
    
  • PARI
    M(i,j,n) = if (i % 2, j + n*(i-1), n*i - j + 1);
    T(n, k) = sum(i=1, n, M(i,k,n));
    tabl(nn) = for(n=1, nn, for(k=1, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, Aug 09 2018
    
  • R
    # by formula
    for (n in 1:11){
       t <- c(n, "")
       for(j in 1:n){
          t <- c(t, (n^3+n)/2+(j-(n+1)/2)*(n%%2), "")
       }
       cat(t, "\n")
    } # yields sequence in triangular form
    (MATLAB and FreeMat)
    for(i=1:11);
       for(j=1:i);
          t=(i^3 + i)/2 + (j - (i + 1)/2)*mod(i,2);
          fprintf('%0.f\t', t);
       end
       fprintf('\n');
    end % yields sequence in triangular form
    

Formula

T(n, k) = A006003(n) + (k - (A000027(n) + 1)/2)*A000035(n).
G.f.: x*(x*(5 - 7*y) + x^4*(1 - 2*y) - x^3*(- 3 + y) - 3*x^2*(- 1 + y) + y)/((-1 + x)^4*(1 + x)^2*(-1 + y)^2).
E.g.f.: (1/4)*exp(-x + y)*(1 - x - 2*y + exp(2*x)*(-1 + 3*x + 6*x^2 + 2*x^3 + 2*y)). - Stefano Spezia, Jan 10 2019

A116941 Permutation of the natural numbers in conjunction with A116939 and A003056.

Original entry on oeis.org

0, 1, 3, 2, 4, 6, 5, 7, 9, 11, 8, 10, 12, 14, 16, 13, 15, 17, 19, 21, 23, 18, 20, 22, 24, 26, 28, 30, 25, 27, 29, 31, 33, 35, 37, 39, 32, 34, 36, 38, 40, 42, 44, 46, 48, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 61, 63, 65, 67, 69, 71, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 27 2006

Keywords

Comments

Inverse: A116942;
A003056(n) = A116939(a(n)).

Programs

  • Haskell
    a116941 n = a116941_list !! n
    a116941_list = f 0 1 (zip a116939_list [0..]) [] where
       f u v xis'@((x,i):xis) ws
         | x == u    = i : f u v xis ws
         | x == v    = f u v xis (i : ws)
         | otherwise = reverse ws ++ f v x xis' []
    -- Reinhard Zumkeller, Jun 28 2013
  • Mathematica
    Table[ Ceiling[(n -1)^2/2] + 2k -2, {n, 12}, {k, n}] // Flatten (* Robert G. Wilson v, Mar 09 2017 after Ivan Neretin in A074147 *)

Formula

a(n) = A074147(n+1) - 1. - Robert G. Wilson v, Mar 09 2017

A138609 List the first term from A042963, then 2 terms from A014601 (starting from 3), 3 terms from A042963, 4 terms from A014601, etc.

Original entry on oeis.org

1, 3, 4, 2, 5, 6, 7, 8, 11, 12, 9, 10, 13, 14, 17, 15, 16, 19, 20, 23, 24, 18, 21, 22, 25, 26, 29, 30, 27, 28, 31, 32, 35, 36, 39, 40, 33, 34, 37, 38, 41, 42, 45, 46, 49, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 50, 53, 54, 57, 58, 61, 62, 65, 66, 69, 70, 63, 64, 67, 68, 71, 72
Offset: 1

Views

Author

Ctibor O. Zizka, May 14 2008

Keywords

Comments

The original name was "Generalized Connell sequence". However, this sequence has only a passing resemblance to Connell-like sequences (see A001614 and the paper by Iannucci & Mills-Taylor), which are all monotone, while this sequence is a bijection of natural numbers.
The sequence is formed by concatenating subsequences S1,S2,S3,..., each of finite length. The subsequence S1 consists of the element 1. The n-th subsequence has n elements. Each subsequence is nondecreasing. The difference between two consecutive elements in the same subsequence is varying, but >= 1.

Examples

			Let us separate natural numbers into two disjoint sets (A042963 and A014601):
  1,2,5,6,9,10,13,14,17,18,21,22,25,26,29,30,...
  3,4,7,8,11,12,15,16,19,20,23,24,27,28,31,32,...
then
  S1={1}
  S2={3,4}
  S3={2,5,6,}
  S4={7,8,11,12}
  S5={9,10,13,14,17}
  ...
  and concatenating S1/S2/S3/S4/S5/... gives this sequence.
		

Crossrefs

Formula

a(n) = A116966(A074147(n)-1). - Antti Karttunen, Oct 05 2009

Extensions

Edited, extended and keyword tabl added by Antti Karttunen, Oct 05 2009
Showing 1-10 of 14 results. Next