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

A186424 Odd terms in A186423.

Original entry on oeis.org

1, 3, 11, 17, 33, 43, 67, 81, 113, 131, 171, 193, 241, 267, 323, 353, 417, 451, 523, 561, 641, 683, 771, 817, 913, 963, 1067, 1121, 1233, 1291, 1411, 1473, 1601, 1667, 1803, 1873, 2017, 2091, 2243, 2321, 2481, 2563, 2731, 2817, 2993, 3083, 3267, 3361, 3553, 3651
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Comments

Sum of odd square and half of even square. - Vladimir Joseph Stephan Orlovsky, May 20 2011
Numbers m such that 6*m-2 is a square. - Bruno Berselli, Apr 29 2016

Crossrefs

Programs

  • Haskell
    a186424 n = a186424_list !! n
    a186424_list = filter odd a186423_list
    
  • Mathematica
    Table[If[OddQ[n],n^2+((n+1)^2)/2,(n^2)/2+(n+1)^2],{n,0,100}] (* Vladimir Joseph Stephan Orlovsky, May 20 2011 *)
  • Python
    def A186424(n): return (n*(3*n + 2) + 1 if n&1 else n*(3*n + 4) + 2)>>1 # Chai Wah Wu, Jan 31 2023

Formula

From R. J. Mathar, Feb 28 2011: (Start)
G.f.: ( -1-2*x-6*x^2-2*x^3-x^4 ) / ( (1+x)^2*(x-1)^3 ).
a(n) = 3*(1+2*n+2*n^2)/4 + (-1)^n*(1+2*n)/4. (End)
a(n+2) = a(n) + A091999(n+2).
Union of A080859 and A126587: a(2*n) = A080859(n) and a(2*n+1) = A126587(n+1).
From Peter Bala, Feb 13 2021: (Start)
Appears to be the sequence of exponents in the following series expansion:
Sum_{n >= 0} (-1)^n * x^n/Product_{k = 1..n} 1 - x^(2*k-1) = 1 - x - x^3 + x^11 + x^17 - x^33 - x^43 + + - - .... Cf. A053253.
More generally, for nonnegative integer N, we appear to have the identity
Product_{j = 1..N} 1/(1 + x^(2*j-1))*( P(N,x) + Sum_{n >= 1} (-1)^n * x^((2*N+1)*n-N)/Product_{k = 1..n} 1 - x^(2*k-1) ) = 1 - x - x^3 + x^11 + x^17 - x^33 - x^43 + + - - ..., where P(N,x) is a polynomial in x of degree N^2 - 1, with the first few values given empirically by
P(0,x) = 0, P(1,x) = 1, P(2,x) = 1 - x^2 + x^3, P(3,x) = 1 - x^2 + x^5 - x^7 + x^8 and P(4,x) = 1 - x^2 - x^4 + x^5 + x^8 - x^9 + x^12 - x^14 + x^15. Cf. A203568. (End)
E.g.f.: ((2 + 5*x + 3*x^2)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x))/2. - Stefano Spezia, May 08 2021
Sum_{n>=0} 1/a(n) = sqrt(2)*Pi*sinh(sqrt(2)*Pi/3)/(1+2*cosh(sqrt(2)*Pi/3)). - Amiram Eldar, May 11 2025

A193832 Irregular triangle read by rows in which row n lists 2n-1 copies of 2n-1 and n copies of 2n, for n >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 22 2011

Keywords

Comments

Sequence of successive positive integers k in which if k is odd then k appears k times, otherwise if k is even then k appears k/2 times.
Note that an arrangement of the blocks of this sequence shows the growth of the generalized pentagonal numbers A001318 (see example).
The sums of each block give the positive integers of A129194: 1, 2, 9, 8, 25, 18, 49,...
Partial sums of A080995. - Paolo P. Lava, Aug 23 2011.
Concatenations of rows of triangles A001650 and A111650; also, seen as a flat list, the row lengths of triangle A260672 and the first differences of its row sums (cf. A260706). - Reinhard Zumkeller, Nov 17 2015
Also a(n) = number of squares in the arithmetic progression {24k + 1: 0 <= k <= n-1} [Granville]. - N. J. A. Sloane, Dec 13 2017

Examples

			a) If written as a triangle the initial rows are
  1, 2,
  3, 3, 3, 4, 4,
  5, 5, 5, 5, 5, 6, 6, 6,
  7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10,
  ...
Row sums give A126587.
b) An application using the blocks of this sequence: the illustration of the growth of an arrangement which represents the generalized pentagonal numbers A001318. For example; the first 9 positive initial terms: 1, 2, 5, 7, 12, 15, 22, 26, 35.
.
.         9
.       8 9
.     8 7 9
.   8 6 7 9
. 8 6 5 7 9
. 6 4 5 7 9
. 4 3 5 7 9
. 2 3 5 7 9
. 1 3 5 7 9
...
		

Crossrefs

Programs

  • Haskell
    a193832 n k = a193832_tabf !! (n-1) !! (k-1)
    a193832_row n = a193832_tabf !! (n-1)
    a193832_tabf = zipWith (++) a001650_tabf a111650_tabl
    a193832' n = a193832_list !! (n - 1)
    a193832_list = concat a193832_tabf
    -- Reinhard Zumkeller, Nov 15 2015
  • Mathematica
    Array[Join @@ MapIndexed[ConstantArray[#, #/(1 + Boole[First@ #2 == 2])] &, {2 # - 1, 2 #}] &, 7] // Flatten (* or *)
    Table[If[k <= 2 n - 1, 2 n - 1, 2 n], {n, 7}, {k, 3 n - 1}] // Flatten (* Michael De Vlieger, Dec 14 2017 *)

Formula

a(n) = sqrt(8n/3) plus or minus 1 [Granville] - N. J. A. Sloane, Dec 13 2017
If 8 <= n <= 52, then a(n-1) < a(n) if and only if n is in A221672. - Jonathan Sondow, Dec 14 2017

Extensions

Edited by N. J. A. Sloane, Dec 13 2017

A187015 The number of different classes of 2-dimensional convex lattice polytopes having volume n/2 up to unimodular equivalence.

Original entry on oeis.org

1, 2, 3, 7, 6, 13, 13, 27, 26, 44, 43, 83, 81, 122, 136, 208, 215, 317, 341, 490, 542, 710, 778, 1073, 1186, 1519, 1708, 2178, 2405, 3042, 3408, 4247, 4785, 5782, 6438, 7870, 8833, 10560, 11857, 14131, 15733, 18636, 20773, 24381, 27353, 31764, 35284, 41081, 45791, 52762
Offset: 1

Views

Author

Jonathan Vos Post, Mar 01 2011

Keywords

Comments

Lattice polytopes up to the equivalence relation used here are also called toric diagrams, see references below. - Andrey Zabolotskiy, May 10 2019
Liu & Zong give a(7) = 11, and others use their list, but their list lacks polygons No. 3 and 4 from Balletti's file 2-polytopes/v7.txt. - Andrey Zabolotskiy, Dec 28 2021

Crossrefs

Cf. A126587, A003051 (triangles only), A322343, A366409.

Programs

  • Python
    # See the Python program for A366409.

Extensions

a(8) from Yan Xiao added by Andrey Zabolotskiy, May 10 2019
Name edited, a(7) corrected, a(9)-a(50) added using Balletti's data by Andrey Zabolotskiy, Dec 28 2021

A190816 a(n) = 5*n^2 - 4*n + 1.

Original entry on oeis.org

1, 2, 13, 34, 65, 106, 157, 218, 289, 370, 461, 562, 673, 794, 925, 1066, 1217, 1378, 1549, 1730, 1921, 2122, 2333, 2554, 2785, 3026, 3277, 3538, 3809, 4090, 4381, 4682, 4993, 5314, 5645, 5986, 6337, 6698, 7069, 7450, 7841, 8242, 8653, 9074
Offset: 0

Views

Author

Keywords

Comments

For n >= 2, hypotenuses of primitive Pythagorean triangles with m = 2*n-1, where the sides of the triangle are a = m^2 - n^2, b = 2*n*m, c = m^2 + n^2; this sequence is the c values, short sides (a) are A045944(n-1), and long sides (b) are A002939(n).

Crossrefs

Short sides (a) A045944(n-1), long sides (b) A002939(n).
Cf. A017281 (first differences), A051624 (a(n)-1), A202141.
Sequences of the form m*n^2 - 4*n + 1: -A131098 (m=0), A028872 (m=1), A056220 (m=2), A045944 (m=3), A016754 (m=4), this sequence (m=5), A126587 (m=6), A339623 (m=7), A080856 (m=8).

Programs

  • Magma
    [5*n^2 - 4*n + 1: n in [0..50]]; // Vincenzo Librandi, Jun 19 2011
    
  • Mathematica
    Table[5*n^2 - 4*n + 1, {n, 0, 100}]
    LinearRecurrence[{3,-3,1},{1,2,13},100] (* or *) CoefficientList[ Series[ (-10 x^2+x-1)/(x-1)^3,{x,0,100}],x] (* Harvey P. Dale, May 24 2011 *)
  • PARI
    a(n)=5*n^2-4*n+1 \\ Charles R Greathouse IV, Oct 16 2015
    
  • SageMath
    [5*n^2-4*n+1 for n in range(41)] # G. C. Greubel, Dec 03 2023

Formula

From Harvey P. Dale, May 24 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=2, a(2)=13.
G.f.: (1 - x + 10*x^2)/(1-x)^3. (End)
E.g.f.: (1 + x + 5*x^2)*exp(x). - G. C. Greubel, Dec 03 2023

Extensions

Edited by Franklin T. Adams-Watters, May 20 2011

A282513 a(n) = floor((3*n + 2)^2/24 + 1/3).

Original entry on oeis.org

0, 1, 3, 5, 8, 12, 17, 22, 28, 35, 43, 51, 60, 70, 81, 92, 104, 117, 131, 145, 160, 176, 193, 210, 228, 247, 267, 287, 308, 330, 353, 376, 400, 425, 451, 477, 504, 532, 561, 590, 620, 651, 683, 715, 748, 782, 817, 852, 888, 925, 963
Offset: 0

Views

Author

Luce ETIENNE, Feb 17 2017

Keywords

Comments

List of quadruples: 2*n*(3*n+1), (2*n+1)*(3*n+1), 6*n^2+8*n+3, (n+1)*(6*n+5). These terms belong to the sequences A033580, A033570, A126587 and A049452, respectively. See links for all the permutations.
After 0, subsequence of A025767.
It seems that a(n) is the smallest number of cells that need to be painted in a (n+1) X (n+1) grid, such that it has no unpainted hexominoes (see link to Kamenetsky and Pratt). - Rob Pratt, Dmitry Kamenetsky, Aug 30 2020

Examples

			Rectangular array with four columns:
.   0,   1,   3,   5;
.   8,  12,  17,  22;
.  28,  35,  43,  51;
.  60,  70,  81,  92;
. 104, 117, 131, 145, etc.
From _Rob Pratt_, Aug 30 2020: (Start)
For n = 3, painting only 2 cells would leave an unpainted hexomino, but painting the following 3 cells avoids all unpainted hexominoes:
    . . .
    . . X
    X X .
(End)
		

Crossrefs

Cf. A033436: floor((3*n)^2/24 + 1/3).
Cf. A130519.
Minimum number of painted cells in other n-ominoes: A337501, A337502, A337503.

Programs

  • Magma
    [(3*n^2+4*n+4) div 8: n in [0..50]]; // Bruno Berselli, Feb 17 2017
  • Mathematica
    Table[Floor[(3 n + 2)^2/24 + 1/3], {n, 0, 50}] (* or *) CoefficientList[Series[x (1 + x + x^3)/((1 + x) (1 + x^2) (1 - x)^3), {x, 0, 50}], x] (* or *) Table[(6 n^2 + 8 n + 3 + Cos[n Pi] - 4 Cos[n Pi/2])/16, {n, 0, 50}] (* or *) Table[(3 n + 2)^2/24 + 1/3 + (-6 + (1 + (-1)^n) (1 + 2 I^((n + 1) (n + 2))))/16, {n, 0, 50}] (* Michael De Vlieger, Feb 17 2017 *)
    LinearRecurrence[{2,-1,0,1,-2,1},{0,1,3,5,8,12},60] (* Harvey P. Dale, Aug 10 2024 *)
  • PARI
    a(n)=(3*n^2 + 4*n + 4)\8 \\ Charles R Greathouse IV, Feb 17 2017
    

Formula

G.f.: x*(1 + x + x^3)/((1 + x)*(1 + x^2)*(1 - x)^3).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n>5.
a(n) = floor((3*n + 2)^2/24 + 2/3).
a(n) = (6*n^2 + 8*n + 3 + (-1)^n - 2*((-1)^((2*n - 1 + (-1)^n)/4) + (-1)^((2*n + 1 - (-1)^n)/4)))/16. Therefore:
a(2*k) = (6*k^2 + 4*k + 1 - (-1)^k)/4,
a(2*k+1) = (k + 1)*(3*k + 2)/2.
a(n) = (6*n^2 + 8*n + 3 + cos(n*Pi) - 4*cos(n*Pi/2))/16.
a(n) = (3*n + 2)^2/24 + 1/3 + (-6 + (1 + (-1)^n)*(1 + 2*i^((n+1)*(n+2))))/16, where i=sqrt(-1).
a(n) = A130519(n+3)+A130519(n+2)+A130519(n). - R. J. Mathar, Jun 23 2021

Extensions

Corrected and extended by Bruno Berselli, Feb 17 2017

A319384 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), a(0)=1, a(1)=5, a(2)=9, a(3)=21, a(4)=29.

Original entry on oeis.org

1, 5, 9, 21, 29, 49, 61, 89, 105, 141, 161, 205, 229, 281, 309, 369, 401, 469, 505, 581, 621, 705, 749, 841, 889, 989, 1041, 1149, 1205, 1321, 1381, 1505, 1569, 1701, 1769, 1909, 1981, 2129, 2205, 2361, 2441, 2605, 2689, 2861, 2949, 3129, 3221, 3409, 3505, 3701, 3801, 4005, 4109, 4321, 4429, 4649, 4761, 4989, 5105, 5341, 5461
Offset: 0

Views

Author

Paul Curtz, Sep 18 2018

Keywords

Comments

The two bisections A136392(n+1)=1,9,29,61, ... and A201279(n)=5,21,49, ... are in the hexagonal spiral based on 2*n+1:
.
67--65--63--61
/ \
69 33--31--29 59
/ / \ \
71 35 11---9 27 57
/ / / \ \ \
73 37 13 1 7 25 55
/ / / / / /
39 15 3---5 23 53
\ \ / /
41 17--19--21 51
\ /
43--45--47--49
.
A201279(n) - A136892(n) = 20*n.

Crossrefs

In the spiral: A003154(n+1), A080859, A126587, A136392, A201279, A227776.
Partial sums of A382154.

Programs

  • Magma
    [(6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4 : n in [0..50]]; // Wesley Ivan Hurt, Jan 19 2021
    
  • Mathematica
    Table[(6 n^2 + 6 n + 5 - (2 n + 1)*(-1)^n)/4, {n, 0, 80}] (* Wesley Ivan Hurt, Jan 07 2021 *)
  • PARI
    Vec((1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2) + O(x^50)) \\ Colin Barker, Jun 05 2019
    
  • Python
    def A319384(n): return (n*(3*n+4)+3 if n&1 else n*(3*n+2)+2)>>1 # Chai Wah Wu, Mar 25 2025

Formula

a(2*n) = A136392(n+1), a(2*n+1) = A201279(n).
a(-n) = a(n).
a(2*n) + a(2*n+1) = 6*A001844(n).
a(n) = (6*n^2 + 6*n + 5 - (2*n + 1)*(-1)^n)/4. - Wesley Ivan Hurt, Oct 04 2018
G.f.: (1 + x^2)*(1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^2). - Colin Barker, Jun 05 2019
a(n) = A104585(n) + A032766(n+1). - Alex W. Nowak, Jan 08 2021

Extensions

More terms from N. J. A. Sloane, Mar 23 2025

A372219 Four-column table read by rows: row n is the unique primitive Pythagorean quadruple (a,b,c,d) such that a < (a + b + c - d)/2 = 2n(n + 1) and b = c.

Original entry on oeis.org

1, 12, 12, 17, 7, 30, 30, 43, 17, 56, 56, 81, 31, 90, 90, 131, 49, 132, 132, 193, 71, 182, 182, 267, 97, 240, 240, 353, 127, 306, 306, 451, 161, 380, 380, 561, 199, 462, 462, 683, 241, 552, 552, 817, 287, 650, 650, 963, 337, 756, 756, 1121, 391, 870, 870, 1291, 449, 992, 992, 1473
Offset: 2

Views

Author

Keywords

Comments

A Pythagorean quadruple is a quadruple (a,b,c,d) of positive integers such that a^2 + b^2 + c^2 = d^2 with a <= b <= c. Its inradius is (a+b+c-d)/2, which is a positive integer.

Examples

			Table begins:
  n=1:    1,  12,    12,    17;
  n=2:    7,  30,    30,    43;
  n=3:   17,  56,    56,    81;
  n=4:   31,  90,    90,   131;
  n=5:   49, 132,   132,   193;
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2024.

Crossrefs

Cf. A372220, A056220 (first column), A002939 (second column), A126587 (fourth column).

Programs

  • Mathematica
    cuaternas={};Do[cuaternas=Join[cuaternas,{2n^2-1,4n^2+6n+2,4n^2+6n+2,6n^2+8n+3}],{n,1,35}];cuaternas

Formula

Row n = (a, b, c, d) = (2n^2 - 1, 4n^2 + 6n + 2, 4n^2 + 6n + 2, 6n^2 + 8n + 3).

A226028 Array T(j,k) of counts of internal lattice points within all Pythagorean triangles (see comments for array order).

Original entry on oeis.org

3, 22, 17, 49, 103, 43, 69, 217, 244, 81, 156, 305, 505, 445, 131, 187, 671, 709, 913, 706, 193, 190, 793, 1546, 1281, 1441, 1027, 267, 295, 799, 1819, 2781, 2021, 2089, 1408, 353, 465, 1249, 1828, 3265, 4376, 2929, 2857, 1849, 451, 498, 1937, 2863, 3277, 5131, 6331, 4005, 3745, 2350, 561
Offset: 1

Views

Author

Frank M Jackson, May 23 2013

Keywords

Comments

The array of counts of internal lattice points within all Pythagorean triangles T(j,k) is arranged so that its first column is the ordered counts of internal lattice points within the k-th primitive Pythagorean triangle (PPT) A225414(k) and the j-th column is j multiples of these PPT side lengths.
Let the k-th PPT have integer perpendicular sides a, b then its j-th multiple has area A = j^2*a*b/2 and the count of lattice points intersected by its boundary is B = j*(a+b+1) by the application of Pick's theorem the count of internal lattice points within it is I = (j^2*a*b-j*(a+b+1)+2)/2.

Examples

			Array begins
    3,   17,  43,  81, 131, ...
   22,  103, 244, 445, ...
   49,  217, 505, ...
   69,  305, ...
  156, ...
		

Crossrefs

Cf. A126587 (first row), A225414 (first column).

Programs

  • Mathematica
    getpairs[k_] := Reverse[Select[IntegerPartitions[k, {2}], GCD[#[[1]], #[[2]]]==1 &]]; getpptpairs[j_] := (newlist=getpairs[j]; Table[{(newlist[[m]][[1]]^2-newlist[[m]][[2]]^2-1)(2newlist[[m]][[1]]*newlist[[m]][[2]]-1)/2, newlist[[m]][[1]]^2-newlist[[m]][[2]]^2, 2newlist[[m]][[1]]*newlist[[m]][[2]]}, {m, 1, Length[newlist]}]); lexicographicLattice[{dim_, maxHeight_}] := Flatten[Array[Sort@Flatten[(Permutations[#1] &) /@ IntegerPartitions[#1 +dim-1, {dim}], 1] &, maxHeight], 1]; array[{x_, y_}] := (pptpair=table[[y]]; (x^2*pptpair[[2]]*pptpair[[3]])/2-x(pptpair[[2]]+pptpair[[3]]+1)/2+1); maxterms=20; table=Sort[Flatten[Table[getpptpairs[2p+1], {p, 1, maxterms}], 1]][[1;;maxterms]]; pairs=lexicographicLattice[{2, maxterms}]; Table[array[pairs[[n]]], {n, 1, maxterms(maxterms+1)/2}]

A063098 Dimension of the space of weight 2n cusp forms for Gamma_0( 30 ).

Original entry on oeis.org

3, 14, 26, 38, 50, 62, 74, 86, 98, 110, 122, 134, 146, 158, 170, 182, 194, 206, 218, 230, 242, 254, 266, 278, 290, 302, 314, 326, 338, 350, 362, 374, 386, 398, 410, 422, 434, 446, 458, 470, 482, 494, 506, 518, 530, 542, 554, 566, 578, 590
Offset: 1

Views

Author

N. J. A. Sloane, Jul 08 2001

Keywords

Crossrefs

Conjectured first differences of A126587.

Formula

Conjectures from Colin Barker, Jun 09 2019: (Start)
G.f.: x*(3 + 8*x + x^2) / (1 - x)^2.
a(n) = 2*a(n-1) - a(n-2) for n>3.
a(n) = 2*(6*n-5) for n>1.
(End)
Showing 1-9 of 9 results.