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

A004526 Nonnegative integers repeated, floor(n/2).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2 - s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - Amarnath Murthy, Sep 20 2002
Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - Donald S. McDonald, Jan 09 2003
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005
Number of partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - Emeric Deutsch, Apr 14 2006
Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - Hieronymus Fischer, Jun 01 2007
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - Milan Janjic, Jan 24 2010
From Clark Kimberling, Mar 10 2011: (Start)
Let RT abbreviate rank transform (A187224). Then
RT(this sequence) = A187484;
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011
For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619. - M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - Martin Renner, Mar 23 2013
a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct rectangles and square in a regular n-gon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - Kival Ngaokrajang, Jun 25 2013
x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - Wesley Ivan Hurt, Jul 12 2013
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - Wesley Ivan Hurt, Jul 21 2013
a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2-color, 2-partition of n. - Ctibor O. Zizka, Nov 19 2014
Minimum in- and out-degree for a directed K_n (see link). - Jon Perry, Nov 22 2014
a(n) is also the independence number of the triangular graph T(n). - Luis Manuel Rivera Martínez, Mar 12 2015
For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - Rick L. Shepherd, Jan 24 2016
More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - Ilya Gutkovskiy, Mar 21 2016
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - Clark Kimberling, May 02 2016
The arithmetic function v_2(n,2) as defined in A289187. - Robert Price, Aug 22 2017
a(n) is also the total domination number of the (n-3)-gear graph. - Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO - Problem 2). - Bernard Schott, Mar 07 2020
a(n-1) is also the number of integer-sided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750. - Bernard Schott, Oct 15 2020
For n >= 1, a(n-1) is the greatest remainder on division of n by any k in 1..n. - David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular n-gon is given by a(n/2) for n even. For n odd such number is zero. For a regular n-gon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n-4) for n > 3 otherwise 0, with offset 0. - Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, -2, 4, -8, 16, -32, ... (see A122803). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...
		

References

  • G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
  • Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).

Crossrefs

a(n+2) = A008619(n). See A008619 for more references.
A001477(n) = a(n+1)+a(n). A000035(n) = a(n+1)-A002456(n).
a(n) = A008284(n, 2), n >= 1.
Zero followed by the partial sums of A000035.
Column 2 of triangle A094953. Second row of A180969.
Partial sums: A002620. Other related sequences: A010872, A010873, A010874.
Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).
Cf. A289187, A139756 (binomial transf).

Programs

  • Haskell
    a004526 = (`div` 2)
    a004526_list = concatMap (\x -> [x, x]) [0..]
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    [Floor(n/2): n in [0..100]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A004526 := n->floor(n/2); seq(floor(i/2),i=0..50);
  • Mathematica
    Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* Stefan Steinerberger, Apr 02 2006 *)
    f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
    With[{c=Range[0,40]},Riffle[c,c]] (* Harvey P. Dale, Aug 26 2013 *)
    CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
    LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
    Floor[Range[0, 40]/2] (* Eric W. Weisstein, Apr 07 2018 *)
  • Maxima
    makelist(floor(n/2),n,0,50); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=n\2 /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ Altug Alkan, Mar 21 2016
    
  • Python
    def a(n): return n//2
    print([a(n) for n in range(74)]) # Michael S. Branicky, Apr 30 2022
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
    
  • Sage
    def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
    

Formula

G.f.: x^2/((1+x)*(x-1)^2).
a(n) = floor(n/2).
a(n) = ceiling((n+1)/2). - Eric W. Weisstein, Jan 11 2024
a(n) = 1 + a(n-2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(2*n) = a(2*n+1) = n.
a(n+1) = n - a(n). - Henry Bottomley, Jul 25 2001
For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1)). - Benoit Cloitre, Oct 11 2002
a(n) = (2*n-1)/4 + (-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k). - Paul Barry, May 20 2003
E.g.f.: ((2*x-1)*exp(x) + exp(-x))/4. - Paul Barry, Sep 03 2003
G.f.: (1/(1-x)) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - Ralf Stephan, Feb 24 2004
a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005
a(n) = (n-(1-(-1)^n)/2)/2 = (1/2)*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{k=0..n} A000035(k). - Hieronymus Fischer, Jun 01 2007
The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - Mohammad K. Azarian, Nov 08 2007; corrected by M. F. Hasler, Nov 17 2008
a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010
a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - Jonathan Vos Post, May 20 2010
For n >= 2, a(n) = floor(log_2(2^a(n-1) + 2^a(n-2))). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010
A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012
a(n) = A008615(n) + A002264(n). - Reinhard Zumkeller, Apr 28 2014
Euler transform of length 2 sequence [1, 1]. - Michael Somos, Jul 03 2014

Extensions

Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012

A336755 Primitive triples for integer-sided triangles whose sides a < b < c are in arithmetic progression.

Original entry on oeis.org

2, 3, 4, 3, 4, 5, 3, 5, 7, 4, 5, 6, 5, 6, 7, 4, 7, 10, 5, 7, 9, 6, 7, 8, 5, 8, 11, 7, 8, 9, 5, 9, 13, 7, 9, 11, 8, 9, 10, 7, 10, 13, 9, 10, 11, 6, 11, 16, 7, 11, 15, 8, 11, 14, 9, 11, 13, 10, 11, 12, 7, 12, 17, 11, 12, 13, 7, 13, 19, 8, 13, 18, 9, 13, 17, 10, 13, 16, 11, 13, 15, 12, 13, 14
Offset: 1

Views

Author

Bernard Schott, Sep 07 2020

Keywords

Comments

The triples are displayed in increasing order of perimeter (equivalently in increasing order of middle side) and if perimeters coincide then by increasing order of the smallest side; also, each triple (a, b, c) is in increasing order.
When b is prime, all the corresponding triples in A336750 are primitive triples.
The only right integer triangle in the data corresponds to the triple (3, 4, 5).
The number of primitive such triangles whose middle side = b is equal to A023022(b) for b >= 3.
For all the triples (primitive or not), miscellaneous properties and references, see A336750.

Examples

			The table begins:
  2, 3, 4;
  3, 4, 5;
  3, 5, 7;
  4, 5, 6;
  5, 6, 7;
  4, 7, 10;
  5, 7, 9;
  6, 7, 8;
The smallest such primitive triple is (2, 3, 4).
The only triangle with perimeter = 12 corresponds to the Pythagorean triple: (3, 4, 5).
There exist two triangles with perimeter = 15 corresponding to triples (3, 5, 7) and (4, 5, 6).
There exists only one primitive triangle with perimeter = 18 whose triple is (5, 6, 7), because (4, 6, 8) is not a primitive triple.
		

Crossrefs

Cf. A336750 (triples, primitive or not), this sequence (primitive triples), A336756 (perimeter of primitive triangles), A336757 (number of such primitive triangles whose perimeter = n).
Cf. A103606 (similar for primitive Pythagorean triples).
Cf. A023022.

Programs

  • Maple
    for b from 3 to 20 do
    for a from b-floor((b-1)/2) to b-1 do
    c := 2*b - a;
    if gcd(a,b)=1 and gcd(b,c)=1 then print(a,b,c); end if;
    end do;
    end do;
  • Mathematica
    Select[Flatten[Table[{a, b, 2*b-a}, {b, 3, 20}, {a, b-Floor[(b-1)/2], b-1}], 1], GCD @@ # == 1 &] (* Paolo Xausa, Feb 28 2024 *)
  • PARI
    tabf(nn) = {for (b = 3, nn, for (a = b-floor((b-1)/2), b-1, my(c = 2*b - a); if (gcd([a, b, c]) == 1, print(a, " ", b, " ", c););););} \\ Michel Marcus, Sep 08 2020

A307136 a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.

Original entry on oeis.org

3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20
Offset: 1

Views

Author

Wolfdieter Lang, Mar 26 2019

Keywords

Comments

This sequence a(n) = f(D(n)) := ceiling(sqrt(4*D(n))), with D(n) > 0, not a square, given in A000037, is important i) for finding out whether an indefinite binary quadratic form with discriminant 4*D(n) is reduced and also ii) for finding the principal reduced form for discriminant 4*D(n). See the W. Lang link under A225953 for the definition of reduced in eq. (1), and the principal reduced form [1, b(n), - (D(n) - (b(n)/2)^2] with eq. b(n) given in eq. (5) (there the discriminant D = 4*D(n)).
Even a(n) appear (a(n) - 2)/2 times, odd a(n) appear (a(n) - 1)/2 times. See the second formula below.
Middle side of integer-sided triangles whose sides a < b < c are in arithmetic progression. For the corresponding triples and miscellaneous properties and references, see A336750. - Bernard Schott, Oct 07 2020

Crossrefs

Programs

  • Maple
    seq(i$((i-2+(i mod 2))/2),i=3..20); # Robert Israel, Mar 26 2019
  • Mathematica
    A307136[n_] := Ceiling[2*Sqrt[n+Round[Sqrt[n]]]]; Array[A307136, 100] (* or *)
    Flatten[Array[ConstantArray[#, Floor[(#-1)/2]] &, 19, 3]] (* Paolo Xausa, Feb 29 2024 *)
  • PARI
    lista(nn) = for (n=1, nn, if (!issquare(n), print1(ceil(2*sqrt(n)), ", "))); \\ Michel Marcus, Mar 26 2019
    
  • Python
    from math import isqrt
    def A307136(n): return 1+isqrt((n+isqrt(n+isqrt(n))<<2)-1) # Chai Wah Wu, Jul 28 2022

Formula

a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
s(n):= floor((a(n)-1)/2) = A000194(n) = A000037(n) - n, for n >= 1. See a comment above for the multiplicity of a(n).
G.f.: (Theta2(0,x)/x^(1/4) + Theta3(0,x)+3)*x/(2*(1-x)) where Theta2 and Theta3 are Jacobi Theta functions. - Robert Israel, Mar 26 2019

A336751 Smallest side of integer-sided triangles whose sides a < b < c are in arithmetic progression.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Aug 15 2020

Keywords

Comments

The triples of sides (a,b,c) with a < b < c are in increasing order of perimeter = 3*b, and if perimeter coincide, then by increasing order of the smallest side. This sequence lists the a's.
Equivalently: smallest side of integer-sided triangles such that b = (a+c)/2 with a < c.
a >= 2 and each side a appears a-1 times but not consecutively.
For each a = 3*k, k>=1, there exists exactly one right triangle (3*k, 4*k, 5*k) whose sides a < b < c are in arithmetic progression.
This sequence is not increasing a(6) = 5 for triangle with perimeter = 18 and a(7) = 4 for triangle with perimeter = 21. The smallest side is not an increasing function of the perimeter of these triangles.
For the corresponding triples and miscellaneous properties and references, see A336750.

Examples

			a = 2 for only the smallest triangle (2, 3, 4).
a = 3 for Pythagorean triple (3, 4, 5) and also for the second triangle (3, 5, 7).
		

References

  • V. Lespinard & R. Pernet, Trigonométrie, Classe de Mathématiques élémentaires, programme 1962, problème B-290 p. 121, André Desvigne.

Crossrefs

Cf. A336750 (triples), this sequence (smallest side), A307136 (middle side), A336753 (largest side), A336754 (perimeter).
Cf. A335894 (smallest side when triangles angles are in arithmetic progression).

Programs

  • Maple
    for b from 3 to 30 do
    for a from b-floor((b-1)/2) to b-1 do
    c := 2*b - a;
    print(a);
    end do;
    end do;
  • Mathematica
    Flatten[Array[Range[#-Floor[(#-1)/2], #-1] &, 20, 3]] (* Paolo Xausa, Feb 28 2024 *)

Formula

a(n) = A336750(n, 1).

A336754 Perimeters in increasing order of integer-sided triangles whose sides a < b < c are in arithmetic progression.

Original entry on oeis.org

9, 12, 15, 15, 18, 18, 21, 21, 21, 24, 24, 24, 27, 27, 27, 27, 30, 30, 30, 30, 33, 33, 33, 33, 33, 36, 36, 36, 36, 36, 39, 39, 39, 39, 39, 39, 42, 42, 42, 42, 42, 42, 45, 45, 45, 45, 45, 45, 45, 48, 48, 48, 48, 48, 48, 48, 51, 51, 51, 51, 51, 51, 51, 51
Offset: 1

Views

Author

Bernard Schott, Aug 31 2020

Keywords

Comments

Equivalently: perimeters of integer-sided triangles such that b = (a+c)/2 with a < c.
As perimeter = 3 * middle side, these perimeters p are all multiple of 3, and each term p appears floor((p-3)/6) = A004526((p-3)/3) consecutively.
For each perimeter = 12*k with k>0, there exists one right integer triangle whose triple is (3k, 4k, 5k).
For the corresponding primitive triples, miscellaneous properties and references, see A336750.

Examples

			Perimeter = 9 only for the smallest triangle (2, 3, 4).
Perimeter = 12 only for Pythagorean triple (3, 4, 5).
Perimeter = 15 for the two triples (3, 5, 7) and (4, 5, 6).
		

References

  • V. Lespinard and R. Pernet, Trigonométrie, Classe de Mathématiques élémentaires, programme 1962, problème B-290 p. 121, André Desvigne.

Crossrefs

Cf. A004526.
Cf. A336750 (triples), A336751 (smallest side), A307136 (middle side), A336753 (largest side), this sequence (perimeter), A024164 (number of such triangles whose perimeter = n), A336755 (primitive triples).
Cf. A335897 (perimeters when angles A, B and C are in arithmetic progression).

Programs

  • Maple
    for b from 3 to 30 do
    for a from b-floor((b-1)/2) to b-1 do
    c := 2*b - a;
    print(a+b+c);
    end do;
    end do;
  • Mathematica
    A336754[n_] := 3*Ceiling[2*Sqrt[n+Round[Sqrt[n]]]]; Array[A336754, 100] (* or *)
    Flatten[Array[ConstantArray[3*#, Floor[(#-1)/2]] &, 19, 3]] (* Paolo Xausa, Feb 29 2024 *)

Formula

a(n) = A336750(n, 1) + A336750(n, 2) + A336750(n, 3).
a(n) = 3 * A307136(n).

A024164 Number of integer-sided triangles with sides a,b,c, a

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Bernard Schott, Oct 10 2020: (Start)
Equivalently: number of integer-sided triangles whose sides a < b < c are in arithmetic progression with perimeter n.
Equivalently: number of integer-sided triangles such that b = (a+c)/2 with a < c and perimeter n.
All the perimeters are multiple of 3 because each perimeter = 3 * middle side b.
For each perimeter n = 12*k with k>0, there exists one and only one such right integer triangle whose triple is (3k, 4k, 5k).
For the corresponding primitive triples and miscellaneous properties and references, see A336750. (End)

Examples

			a(9) = 1 for the smallest such triangle (2, 3, 4).
a(12) = 1 for Pythagorean triple (3, 4, 5).
a(15) = 2 for the two triples (3, 5, 7) and (4, 5, 6).
		

Crossrefs

Cf. A336750 (triples), A336751 (smallest side), A307136 (middle side), A336753 (largest side), A336754 (perimeter), this sequence (number of triangles whose perimeter = n), A336755 (primitive triples), A336756 (primitive perimeters), A336757 (number of primitive triangles with perimeter = n).
Cf. A005044 (number of integer-sided triangles with perimeter = n).

Programs

  • Mathematica
    A024164[n_] := If[Mod[n, 3] == 0, Floor[(n - 3)/6], 0]; Array[A024164, 100] (* Wesley Ivan Hurt, Nov 01 2020 *)
    LinearRecurrence[{0,0,1,0,0,1,0,0,-1},{0,0,0,0,0,0,0,0,1},120] (* Harvey P. Dale, Jun 03 2021 *)

Formula

If n = 3*k, then a(n) = floor((n-3)/6) = A004526((n-3)/3), otherwise, a(3k+1) = a(3k+2) = 0. - Bernard Schott, Oct 10 2020
From Wesley Ivan Hurt, Nov 01 2020: (Start)
G.f.: x^9/((x^3 - 1)^2*(x^3 + 1)).
a(n) = a(n-3) + a(n-6) - a(n-9).
a(n) = (1 - ceiling(n/3) + floor(n/3)) * floor((n-3)/6). (End)
E.g.f.: (18 + (x - 6)*cosh(x) + (x - 3)*sinh(x) - exp(-x/2)*((9 + 3*exp(x) + x)*cos(sqrt(3)*x/2) + sqrt(3)*x*sin(sqrt(3)*x/2)))/18. - Stefano Spezia, Feb 29 2024

A336753 Largest side of integer-sided triangles whose sides a < b < c are in arithmetic progression.

Original entry on oeis.org

4, 5, 7, 6, 8, 7, 10, 9, 8, 11, 10, 9, 13, 12, 11, 10, 14, 13, 12, 11, 16, 15, 14, 13, 12, 17, 16, 15, 14, 13, 19, 18, 17, 16, 15, 14, 20, 19, 18, 17, 16, 15, 22, 21, 20, 19, 18, 17, 16, 23, 22, 21, 20, 19, 18, 17, 25, 24, 23, 22, 21, 20, 19, 18, 26, 25, 24, 23, 22, 21, 20, 19
Offset: 1

Views

Author

Bernard Schott, Aug 25 2020

Keywords

Comments

The triples of sides (a,b,c) with a < b < c are in increasing order of perimeter = 3*b, and if perimeters coincide, then by increasing order of the smallest side. This sequence lists the c's.
Equivalently: largest side of integer-sided triangles such that b = (a+c)/2 with a < c.
c >= 4 and each largest side c appears floor((c-1)/3) = A002264(c-1) times but not consecutively.
For each c = 5*k, k>=1, there exists exactly one right triangle (3*k, 4*k, 5*k) whose sides a < b < c are in arithmetic progression.
For the corresponding primitive triples and miscellaneous properties and references, see A336750.

Examples

			c = 4 only for the smallest triangle (2, 3, 4).
c = 5 only for Pythagorean triple (3, 4, 5).
c = 6 only for triple (4, 5, 6).
c = 7 for the two triples (3, 5, 7) and (5, 6, 7).
		

References

  • V. Lespinard & R. Pernet, Trigonométrie, Classe de Mathématiques élémentaires, programme 1962, problème B-290 p. 121, André Desvigne.

Crossrefs

Cf. A336750 (triples), A336751 (smallest side), A307136 (middle side), this sequence (largest side), A336754 (perimeter).
Cf. A335896 (largest side when triangles angles are in arithmetic progression).

Programs

  • Maple
    for b from 3 to 30 do
    for a from b-floor((b-1)/2) to b-1 do
    c := 2*b - a;
    print(c);
    end do;
    end do;
  • Mathematica
    Flatten[Array[2*#-Range[#-Floor[(#-1)/2], #-1] &, 20, 3]] (* Paolo Xausa, Feb 28 2024 *)

Formula

a(n) = A336750(n, 3).

A336756 Perimeters in increasing order of primitive integer-sided triangles whose sides a < b < c are in arithmetic progression.

Original entry on oeis.org

9, 12, 15, 15, 18, 21, 21, 21, 24, 24, 27, 27, 27, 30, 30, 33, 33, 33, 33, 33, 36, 36, 39, 39, 39, 39, 39, 39, 42, 42, 42, 45, 45, 45, 45, 48, 48, 48, 48, 51, 51, 51, 51, 51, 51, 51, 51, 54, 54, 54, 57, 57, 57, 57, 57, 57, 57, 57, 57, 60, 60, 60, 60, 63, 63, 63, 63, 63, 63
Offset: 1

Views

Author

Bernard Schott, Sep 16 2020

Keywords

Comments

Equivalently: perimeters of primitive integer-sided triangles such that b = (a+c)/2 with a < c.
As perimeter = 3 * middle side, these perimeters p are all multiples of 3 and each term p appears consecutively A023022(p/3) = phi(p/3)/2 times for p >= 9.
Remark, when the middle side is prime, then the number of primitive triangles with a perimeter p = 3*b equals phi(p/3)/2 = (b-1)/2 = (p-3)/6 and in this case, all the triangles are primitive (see A336754).
For the corresponding primitive triples, miscellaneous properties, and references, see A336750.

Examples

			Perimeter = 9 only for the smallest triangle (2, 3, 4).
Perimeter = 12 only for the Pythagorean triple (3, 4, 5).
Perimeter = 15 for the two triples (3, 5, 7) and (4, 5, 6).
There only exists one primitive triangle with perimeter = 18 whose triple is (5, 6, 7), because (4, 6, 8) is not a primitive triple.
		

Crossrefs

Cf. A336754 (perimeters, primitive or not), A336755 (primitive triples), this sequence (perimeters of primitive triangles), A336757 (number of such primitive triangles whose perimeter = n).
Cf. A023022.

Programs

  • Maple
    for b from 3 to 21 do
    for a from b-floor((b-1)/2) to b -1 do
    c := 2*b - a;
    if gcd(a,b)=1 and gcd(b,c)=1 then print(a+b+c); end if;
    end do;
    end do;
  • Mathematica
    Flatten[Array[ConstantArray[3*#, EulerPhi[#]/2] &, 20, 3]] (* Paolo Xausa, Feb 29 2024 *)
  • PARI
    lista(nn) = {my(list=List()); for (b = 3, nn, for (a = b-floor((b-1)/2), b-1, my(c = 2*b - a); if (gcd([a, b, c]) == 1, listput(list, a+b+c);););); Vec(list);} \\ Michel Marcus, Sep 16 2020

A336757 Number of primitive integer-sided triangles whose sides a < b < c are in arithmetic progression with a perimeter = n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 3, 0, 0, 2, 0, 0, 3, 0, 0, 2, 0, 0, 5, 0, 0, 2, 0, 0, 6, 0, 0, 3, 0, 0, 4, 0, 0, 4, 0, 0, 8, 0, 0, 3, 0, 0, 4, 0, 0, 4, 0, 0, 6, 0, 0, 5, 0, 0, 11, 0, 0, 4
Offset: 1

Views

Author

Bernard Schott, Sep 20 2020

Keywords

Comments

Equivalently: number of primitive integer-sided triangles such that b = (a+c)/2 with a < c and perimeter = n.
As the perimeter of these triangles = 3*b where b is the middle side, a(n) >= 1 iff n = 3*b, with b >= 3.
When b is prime, all the triangles of perimeter n = 3*b are primitive, hence in this case: a(n) = A024164(n).
For the corresponding triples (primitive or not), miscellaneous properties and references, see A336750.

Examples

			a(9) = 1 for the smallest such triangle (2, 3, 4).
a(12) = 1 for the Pythagorean triple (3, 4, 5).
a(15) = 2 for the two triples (3, 5, 7) and (4, 5, 6).
a(18) = 1 for the triple (5, 6, 7); the other triple (4, 6, 8) corresponding to a perimeter = 18 is not a primitive triple.
		

Crossrefs

Cf. A336750 (triples, primitive or not), A336755 (primitive triples), A336756 (perimeters of primitive triangles).
Cf. A024164 (number of such triangles, primitive or not).
Similar sequences: A005044 (integer-sided triangles), A024155 (right triangles), A070201 (with integral inradius).

Formula

For n = 3*b, b >= 3, a(n) = A023022(b) = A000010(b)/2, otherwise a(n) = 0.

A357274 List of primitive triples for integer-sided triangles with angles A < B < C and C = 2*Pi/3 = 120 degrees.

Original entry on oeis.org

3, 5, 7, 7, 8, 13, 5, 16, 19, 11, 24, 31, 7, 33, 37, 13, 35, 43, 16, 39, 49, 9, 56, 61, 32, 45, 67, 17, 63, 73, 40, 51, 79, 11, 85, 91, 19, 80, 91, 55, 57, 97, 40, 77, 103, 24, 95, 109, 13, 120, 127, 23, 120, 133, 65, 88, 133, 69, 91, 139, 56, 115, 151, 25, 143, 157, 75, 112, 163, 15, 161, 169, 104, 105, 181
Offset: 1

Views

Author

Bernard Schott, Sep 22 2022

Keywords

Comments

The only triangles with integer sides that have an angle equal to a whole number of degrees are triangles which have an angle of 60° (A335893), or an angle of 90° (A263728) or an angle of 120° as here (see Keith Selkirk link, p. 251).
The triples are displayed in nondecreasing order of largest side c, and if largest sides coincide then by increasing order of the smallest side a, hence, each triple (a, b, c) is in increasing order.
The corresponding metric relation between sides is c^2 = a^2 + a*b + b^2.
The triples (a, b, c) can be generated with integers u, v such that gcd(u,v) = 1 and 0 < v < u:
-> a = u^2 - v^2
-> b = 2*u*v + v^2
-> c = u^2 + u*v + v^2.
Note that side c cannot be even when the triple is primitive as here.
The (3, 5, 7) triangle is the only primitive triangle with a 120-degree angle and with its integer sides in arithmetic progression (A336750). This smallest triple is obtained for u = 2 and v = 1.
The Fermat point of these triangles is vertex C, then distance FA+FB+FC = CA+CB = b+a is an integer.
If (a,b,c) is a primitive 120-triple, then both (a,a+b,c) and (a+b,b,c) are 60-triples in A335893, see Emrys Read link, lemma 2 p. 302.

Examples

			Table of triples begins:
   3,  5,  7;
   7,  8, 13;
   5, 16, 19;
  11, 24, 31;
   7, 33, 37;
............
(7, 8, 13) is a triple for this sequence because from the law of cosines (see link), cos(C) = (7^2 + 8^2 - 13^2)/(2*7*8) = -1/2.
		

Crossrefs

Cf. also A263728, A336750, A335893 (similar with an angle of Pi/3).

Programs

  • Maple
    for c from 5 to 181 by 2 do
    for a from 3 to c-2 do
    b := (-a + sqrt(4*c^2-3*a^2))/2;
    if b=floor(b) and gcd(a,b)=1 and a
    				

Extensions

a(31..33) = 40,51,79 inserted by Georg Fischer, Dec 04 2022
Showing 1-10 of 11 results. Next