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

A163257 An interspersion: the order array of the even-numbered columns (after swapping the first two rows) of the double interspersion at A161179.

Original entry on oeis.org

1, 5, 2, 11, 6, 3, 19, 12, 8, 4, 29, 20, 15, 10, 7, 41, 30, 24, 18, 14, 9, 55, 42, 35, 28, 23, 17, 13, 71, 56, 48, 40, 34, 27, 22, 16, 89, 72, 63, 54, 47, 39, 33, 26, 21, 109, 90, 80, 70, 62, 53, 46, 38, 32, 25, 131, 110, 99, 88, 79, 69, 61, 52, 45, 37, 31, 155, 132, 120, 108
Offset: 1

Views

Author

Clark Kimberling, Jul 24 2009

Keywords

Comments

A permutation of the natural numbers.
Beginning at row 6, the columns obey a 3rd-order recurrence:
c(n)=c(n-1)+c(n-2)-c(n-3)+1.
Except for initial terms, the first seven rows are A028387, A002378, A005563, A028552, A008865, A014209, A028873, and the first column, A004652.

Examples

			Corner:
1....5...11...19
2....6...12...20
3....8...15...24
4...10...18...28
The double interspersion A161179 begins thus:
1....4....7...12...17...24
2....3....8...11...18...23
5....6...13...16...25...30
9...10...19...22...33...38
Expel the odd-numbered columns and then swap rows 1 and 2, leaving
3....11...23...39
4....12...24...40
6....16...30...48
10...22...38...58
Then replace each of those numbers by its rank when all the numbers are jointly ranked.
		

Crossrefs

Formula

Let S(n,k) denote the k-th term in the n-th row. Four cases:
S(1,k)=k^2+k-1
S(2,k)=k^2+k
if n>1 is odd, then S(n,k)=k^2+(n-1)k+(n-1)(n-3)/4
if n>2 is even, then S(n,k)= k^2+(n-1)k+n(n-4)/4.

A175287 Partial sums of ceiling(n^2/4).

Original entry on oeis.org

0, 1, 2, 5, 9, 16, 25, 38, 54, 75, 100, 131, 167, 210, 259, 316, 380, 453, 534, 625, 725, 836, 957, 1090, 1234, 1391, 1560, 1743, 1939, 2150, 2375, 2616, 2872, 3145, 3434, 3741, 4065, 4408, 4769, 5150, 5550, 5971, 6412, 6875, 7359, 7866, 8395, 8948, 9524, 10125, 10750
Offset: 0

Views

Author

Mircea Merca, Dec 03 2010

Keywords

Comments

a(n) is the number of 1243-avoiding odd Grassmannian permutations of size n+1. Avoiding any of the patterns 2134, 2341, or 4123, gives the same sequence. - Juan B. Gil, Mar 09 2023
Conjecture: a(n) is the number of perimeter-magic (hollow) triangles of order 3 with magic sum n+2. Order 3 means each of the 3 edges has 3 elements >=1; the triangle has 6 elements. The elements do not need to be distinct, and triangles obtained by rotations are counted only once. The triangle (read ccw) for magic sum 3 has elements 1 1 1 1 1 1. The 2 triangles with magic sum 4 are 1 1 2 1 1 2 and 1 2 1 2 1 2. - R. J. Mathar, Mar 08 2025

Examples

			a(4) = ceil(0/4)+ceil(1/4)+ceil(4/4)+ceil(9/4)+ceil(16/4) = 0+1+1+3+4=9.
		

Crossrefs

Partial sums of A004652.
Cf. A361272.

Programs

  • Magma
    [Floor((n+1)*(2*n^2+n+9)/24): n in [0..60]]; // Vincenzo Librandi, Jun 22 2011
    
  • Maple
    a:= n-> round((2*n^(3)+3*n^(2)+10*n)/24): seq(a(n), n=0..20);
  • Mathematica
    Table[Sum[Ceiling[i^2/4], {i, 0, n}], {n, 0, 49}] (* or *) Table[(2n(2n^2 + 3n + 10) -9(-1)^n + 9)/48, {n, 0, 49}] (* Alonso del Arte, Dec 03 2010 *)
    CoefficientList[Series[(x^3 - x^2 + x)/(x^5 - 3 x^4 + 2 x^3 + 2 x^2 - 3 x + 1), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
    Accumulate[Ceiling[Range[0,50]^2/4]] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,1,2,5,9},60] (* Harvey P. Dale, Nov 19 2014 *)
  • PARI
    x='x+O('x^99); concat(0, Vec((x^3-x^2+x)/ (x^5-3*x^4+2*x^3+2*x^2-3*x+1))) \\ Altug Alkan, Apr 05 2016

Formula

a(n) = round((2*n+1)*(2*n^2+2*n+9)/48).
a(n) = floor((n+1)*(2*n^2+n+9)/24).
a(n) = ceiling((2*n^3+3*n^2+10*n)/24).
a(n) = round((2*n^3+3*n^2+10*n)/24).
a(n) = a(n-4)+n^2-3*n+5 , n>3.
G.f.: x*(1-x+x^2) / ( (1+x)*(x-1)^4 ).
a(n) = (2*n*(2*n^2+3*n+10)-9*(-1)^n+9)/48. - Bruno Berselli, Dec 03 2010
a(n)+a(n+1) = A004006(n+1). - R. J. Mathar, Mar 08 2025

A035107 First differences give (essentially) A028242.

Original entry on oeis.org

3, 9, 17, 29, 44, 64, 88, 118, 153, 195, 243, 299, 362, 434, 514, 604, 703, 813, 933, 1065, 1208, 1364, 1532, 1714, 1909, 2119, 2343, 2583, 2838, 3110, 3398, 3704, 4027, 4369, 4729, 5109, 5508, 5928, 6368, 6830, 7313, 7819, 8347, 8899, 9474
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(4*n^3+54*n^2+212*n+153-9*(-1)^n)/48: n in [0..50]]; // Vincenzo Librandi, Oct 21 2013
  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{3,9,17,29,44},50] (* Harvey P. Dale, Oct 20 2013 *)
    CoefficientList[Series[(2 x^3 - 4 x^2 + 3)/((x - 1)^4 (x + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 21 2013 *)

Formula

a(n) = (4*n^3 +54*n^2 +212*n +153 -9*(-1)^n)/48.
G.f.: (2*x^3-4*x^2+3) / ((x-1)^4*(x+1)). - Colin Barker, Mar 04 2013

A275799 Number of inequivalent (modulo C_4 rotations) square n X n grids with squares coming in two colors and three squares have one of the colors.

Original entry on oeis.org

1, 22, 140, 578, 1785, 4612, 10416, 21340, 40425, 72010, 121836, 197582, 308945, 468328, 690880, 995352, 1404081, 1944030, 2646700, 3549370, 4694921, 6133292, 7921200, 10123828, 12814425, 16076242, 20001996, 24696070, 30273825, 36864080
Offset: 2

Views

Author

Wolfdieter Lang, Oct 03 2016

Keywords

Comments

See the k=3 column of table A054772(n, k), with more explanations there.

Crossrefs

Cf. A054772, A000012 (k=0), A004652 (k=1), A212714 (k=2).

Programs

  • PARI
    Vec(x^2*(1+18*x+55*x^2+92*x^3+55*x^4+18*x^5+x^6)/((1-x)^7*(1+x)^3) + O(x^40)) \\ Colin Barker, Oct 16 2016

Formula

a(n) = A054772(n, 3) = A054772(n, n^2-3), n >= 2.
From Colin Barker, Oct 09 2016: (Start)
G.f.: x^2*(1+18*x+55*x^2+92*x^3+55*x^4+18*x^5+x^6) / ((1-x)^7*(1+x)^3).
a(n) = (n^6-3*n^4+2*n^2)/24 for n even.
a(n) = (n^6-3*n^4+5*n^2-3)/24 for n odd. (End)
From Stefan Hollos, Oct 16 2016: (Start)
a(n) = C(n^2,3)/4 for n even,
a(n) = (C(n^2,3) + (n^2-1)/2)/4 for n odd. (End)

A280340 a(n) = a(n-1) + 10^n * a(n-2) with a(0) = 1 and a(1) = 1.

Original entry on oeis.org

1, 1, 101, 1101, 1011101, 111111101, 1011212111101, 1112122222111101, 101122323232322111101, 1112223344434333322111101, 1011224344546565545343322111101, 111223345667777878776655443322111101, 1011224455769911213121200887756443322111101
Offset: 0

Views

Author

Seiichi Manyama, Dec 31 2016

Keywords

Comments

The Rogers-Ramanujan continued fraction is defined by R(q) = q^(1/5)/(1+q/(1+q^2/(1+q^3/(1+ ... )))). The limit of a(n)/A015468(n+2) is 10^(-1/5) * R(10).
a(n) has A004652(n+1) digits. The last n digits are the same as the last n digits of a(n-1). - Robert Israel, Jan 12 2017

Examples

			1/1 = a(0)/A015468(2).
1/(1+10/1) = 1/11 = a(1)/A015468(3).
1/(1+10/(1+10^2/1)) = 101/111 = a(2)/A015468(4).
1/(1+10/(1+10^2/(1+10^3/1))) = 1101/11111 = a(3)/A015468(5).
		

Crossrefs

Cf. similar sequences with the recurrence a(n-1) + q^n * a(n-2) for n>1, a(0)=1 and a(1)=1: A280294 (q=2), A279543 (q=3), this sequence (q=10).

Programs

  • Maple
    A[0]:= 1: A[1]:= 1:
    for n from 2 to 20 do A[n]:= A[n-1]+10^n*A[n-2] od:
    seq(A[i],i=0..20); # Robert Israel, Jan 12 2017
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-1]+10^n a[n-2]},a,{n,15}] (* Harvey P. Dale, Jul 12 2020 *)

Formula

a(n) a(n-3) = 10 a(n-2) a(n-1) - 10 a(n-2)^2 + a(n-1) a(n-3). - Robert Israel, Jan 12 2017

A097066 Expansion of (1-2*x+2*x^2)/((1+x)*(1-x)^3).

Original entry on oeis.org

1, 0, 2, 2, 5, 6, 10, 12, 17, 20, 26, 30, 37, 42, 50, 56, 65, 72, 82, 90, 101, 110, 122, 132, 145, 156, 170, 182, 197, 210, 226, 240, 257, 272, 290, 306, 325, 342, 362, 380, 401, 420, 442, 462, 485, 506, 530, 552, 577, 600, 626, 650, 677, 702, 730, 756, 785, 812
Offset: 0

Views

Author

Paul Barry, Jul 22 2004

Keywords

Comments

Partial sums of A097065. Pairwise sums are A000124, with extra leading 1.
Binomial transform is 1, 1, 3, 9, 26, ..., A072863 with extra leading 1.

Crossrefs

Programs

  • GAP
    List([0..70], n-> (2*n^2 +3 +5*(-1)^n)/8); # G. C. Greubel, Jun 30 2019
  • Magma
    [(2*n^2 +3 +5*(-1)^n)/8: n in [0..70]]; // G. C. Greubel, Jun 30 2019
    
  • Mathematica
    CoefficientList[Series[(1-2x+2x^2)/((1+x)(1-x)^3), {x, 0, 70}], x] (* or *) LinearRecurrence[{2, 0, -2, 1}, {1, 0, 2, 2}, 70] (* Harvey P. Dale, Apr 08 2014 *)
    Table[(2n^2 +3 +5(-1)^n)/8, {n,0,70}] (* Vincenzo Librandi, Apr 09 2014 *)
  • PARI
    vector(70, n, n--; (2*n^2 +3 +5*(-1)^n)/8) \\ G. C. Greubel, Jun 30 2019
    
  • Sage
    [(2*n^2 +3 +5*(-1)^n)/8 for n in (0..70)] # G. C. Greubel, Jun 30 2019
    

Formula

G.f.: (1-2*x+2*x^2)/((1-x^2)*(1-x)^2).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = 5*(-1)^n/8 + (2*n^2+3)/8.
a(n) = A004652(n+1) - A004526(n+1) = ceiling(((n+1)/2)^2) - floor((n+1)/2). - Ridouane Oudra, Jun 22 2019
E.g.f.: ((4+x+x^2)*cosh(x) - (1-x-x^2)*sinh(x))/4. - G. C. Greubel, Jun 30 2019

A135840 A135839 * A000012 as infinite lower triangular matrices.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Dec 01 2007

Keywords

Comments

Row sums = A004652 starting (1, 3, 4, 7, 9, 13, 16, 21, ...).

Examples

			First few rows of the triangle:
  1;
  2, 1;
  2, 1, 1;
  3, 2, 1, 1;
  3, 2, 2, 1, 1;
  4, 3, 2, 2, 1, 1;
  4, 3, 3, 2, 2, 1, 1;
  5, 4, 3, 3, 2, 2, 1, 1;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[1, 1] := 1; T[n_, 1] := Floor[(n + 2)/2]; T[n_, n_] := 1; T[n_, k_] := Floor[(n - k + 2)/2]; Table[T[n, k], {n, 1, 8}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2016 *)

Formula

T(1, 1) = 1, T(n, 1) = floor((n + 2)/2), T(n, n) = 1, T(n, k) = floor((n - k + 2)/2). - G. C. Greubel, Dec 05 2016

A167753 Hankel transform of A167751.

Original entry on oeis.org

1, 1, 0, -1, -1, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1
Offset: 0

Views

Author

Paul Barry, Nov 10 2009

Keywords

Comments

The nonzero terms appear to be indexed by ceiling((n+1)^2/4) - 0^n (see A004652).

Crossrefs

Cf. A167752.

A226088 a(n) is the number of the distinct quadrilaterals in a regular n-gon, which Q3 type are excluded.

Original entry on oeis.org

0, 1, 1, 3, 4, 8, 10, 15, 19, 26, 31, 39, 46, 56, 64, 75, 85, 98, 109, 123, 136, 152, 166, 183, 199, 218
Offset: 3

Views

Author

Kival Ngaokrajang, May 25 2013

Keywords

Comments

From the drawings as shown in links, it can be separated the distinct quadrilaterals into 3 types:
Q1: Quadrilaterals which have at least one side equal to n-gon sides length.
Q2: Quadrilaterals which have at least one pair parallel sides and all sides are longer than n-gon sides length.
Q3: Quadrilaterals which have no parallel sides and all sides are longer than n-gon side length.
Q1(n) = A004652(n-3); Q2(n) = A001917(n-6), Q2(3) = 0, Q2(4) = 0; Q3(n) = A005232(n-10), Q3(3) = 0, Q3(4) = 0, Q3(5) = 0, Q3(6) = 0, Q3(7) = 0, Q3(8) = 0, Q3(9) = 0.
a(n) = Q1(n) + Q2(n). The total distinct quadrilaterals is Q1 + Q2 + Q3. Also the total distinct quadrilaterals = A005232(n-4), for n>=4. Also a(n) = A005232(n-4) - A005232(n-10), for n>=10.

Examples

			For a pentagon, there are 5 quadrilaterals which are the same size and shape. Therefore a(5) = 1.
		

Crossrefs

Cf. A004652, A001917, A005232, A001399: For n >= 3, a(n-3) is number of distinct triangles in an n-gon.

Formula

Empirical g.f.: -x^4*(x^2-x+1)^2*(x^2+x+1) / ((x-1)^3*(x+1)*(x^2+1)). - Colin Barker, Oct 31 2013

A138585 The sequence is formed by concatenating subsequences S1, S2, ... each of finite length. S1 consists of the element 1. The n-th subsequence consist of numbers {(n/2)*(n/2 - 1)+ 1, ..., (n/2)*(n/2 + 1)} for n even, {((n-1)/2)^2, ..., (n-1)/2 * ((n-1)/2 + 2)} for n odd.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, May 13 2008

Keywords

Comments

A generalized Connell sequence.
Except for the first term the first element of each subsequence Sn (equivalently, each row of the triangle) gives A004652 (offset by 1), and the last element is A035106.

Examples

			S1: {1}
S2: {1,2}
S3: {1,2,3,}
S4: {3,4,5,6}
S5: {4,5,6,7,8}
S6: {7,8,9,10,11,12}, etc.
so concatenation of S1/S2/S3/S4/S5/S6/... gives:
1,1,2,1,2,3,3,4,5,6,4,5,6,7,8,7,8,9,10,11,12,...
		

Crossrefs

Cf. A001614.

Programs

  • Maple
    S := proc(n) local s: if(n=1)then s:=1: elif(n mod 2 = 0)then s:=(n/2)*(n/2 -1)+1: else s:=((n-1)/2)^2: fi: seq(k,k=s..s+n-1): end: seq(S(n),n=1..12); # Nathaniel Johnston, Oct 01 2011

Extensions

Corrected and edited by D. S. McNeil, Dec 12 2010
Previous Showing 11-20 of 22 results. Next