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 61-70 of 126 results. Next

A070113 Numbers k such that [A070080(k), A070081(k), A070082(k)] is a scalene integer triangle with relatively prime side lengths.

Original entry on oeis.org

8, 13, 17, 20, 21, 25, 29, 30, 33, 36, 37, 41, 42, 44, 45, 49, 53, 56, 57, 59, 60, 62, 66, 67, 69, 70, 74, 75, 77, 78, 79, 80, 83, 86, 89, 90, 92, 96, 97, 99, 100, 101, 102, 105, 106, 110, 111, 113, 114, 115, 119, 122, 123, 125, 126
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Examples

			36 is a term [A070080(36), A070081(36), A070082(36)]=[3<6<7], A070084(36)=gcd(3,6,7)=1.
		

Crossrefs

Programs

  • Mathematica
    m = 50 (* max perimeter *);
    sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[ Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2 &];
    triangles = DeleteCases[Table[sides[per], {per, 3, m}], {}] // Flatten[#, 1] & // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]] &];
    Position[triangles, {a_, b_, c_} /; a < b < c && GCD[a, b, c] == 1] // Flatten (* Jean-François Alcover, Oct 04 2021 *)

A070203 Number of scalene integer triangles with perimeter n having integral inradius.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 8, 0, 0, 0, 1, 0, 3
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A070201(n) - A070204(n).

Crossrefs

Programs

  • Ruby
    def A(n)
      cnt = 0
      (1..n / 3).each{|a|
        (a + 1..(n - a) / 2).each{|b|
          c = n - a - b
          if a + b > c && b < c
            s = n / 2r
            t = (s - a) * (s - b) * (s - c) / s
            if t.denominator == 1
              t = t.to_i
              cnt += 1 if Math.sqrt(t).to_i ** 2 == t
            end
          end
        }
      }
      cnt
    end
    def A070203(n)
      (1..n).map{|i| A(i)}
    end
    p A070203(100) # Seiichi Manyama, Oct 07 2017

A107573 a(n)=least sidelength of n-th triangle listed at A107572.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 16 2005

Keywords

Examples

			The first 5 integer-sided scalene triangles (a,b,c) with a<b<c are (2,3,4), (2,4,5), (3,4,5), (2,5,6), (3,4,6), of which the least sidelengths are 2,2,3,2,3
		

Crossrefs

A107574 a(n)=middle sidelength of n-th triangle listed at A107572.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 16 2005

Keywords

Examples

			The first 5 integer-sided scalene triangles (a,b,c) with a<b<c are (2,3,4), (2,4,5), (3,4,5), (2,5,6), (3,4,6), of which the middle sidelengths are 3,4,4,5,4.
		

Crossrefs

A107575 a(n)=greatest sidelength of n-th triangle listed at A107572.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 16 2005

Keywords

Examples

			The first 5 integer-sided scalene triangles (a,b,c) with a<b<c are (2,3,4), (2,4,5), (3,4,5), (2,5,6), (3,4,6), of which the greatest sidelengths are 4,5,5,6,6.
		

Crossrefs

A254594 Expansion of 1 / ((1 - x^2)^2 * (1 - x^3) * (1 - x^4)) in powers of x.

Original entry on oeis.org

1, 0, 2, 1, 4, 2, 7, 4, 11, 7, 16, 11, 23, 16, 31, 23, 41, 31, 53, 41, 67, 53, 83, 67, 102, 83, 123, 102, 147, 123, 174, 147, 204, 174, 237, 204, 274, 237, 314, 274, 358, 314, 406, 358, 458, 406, 514, 458, 575, 514, 640, 575, 710, 640, 785, 710, 865, 785, 950
Offset: 0

Views

Author

Michael Somos, Feb 02 2015

Keywords

Comments

Partitions of n into parts of size 3 and size 4 and two kinds of parts of size 2.
The number of quadruples of integers [x, u, v, w] which satisfy x > u > v > w >=0, n+5 = x+u, u+v >= x+w, and x+u+v+w is even.
Euler transform of length 4 sequence [ 0, 2, 1, 1].

Examples

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

Crossrefs

Programs

  • Magma
    I:=[1,0,2,1,4,2,7,4,11,7,16]; [n le 11 select I[n] else 2*Self(n-2)+Self(n-3)-2*Self(n-5)-2*Self(n-6)+Self(n-8)+2*Self(n-9)-Self(n-11): n in [1..60]]; // Vincenzo Librandi, Feb 03 2015
  • Mathematica
    a[ n_] := Quotient[ n^3 + If[ OddQ[n], 12 n^2 + 33 n + 54, 21 n^2 + 132 n + 288], 288];
    a[ n_] := Module[{s = 1, m = n}, If[ n < 0, s = -1; m = -11 - n]; s SeriesCoefficient[ 1 / ((1 - x^2)^2 (1 - x^3) (1 - x^4)), {x, 0, m}]];
    a[ n_] := Length @ FindInstance[ {x > u, u > v, v > w, w >= 0, x + u == n + 5, u + v >= x + w, x + u + v + w == 2 k}, {x, u, v, w, k}, Integers, 10^9];
    CoefficientList[Series[1 / (1 - 2 x^2 - x^3 + 2 x^5 + 2 x^6 - x^8 - 2 x^9 + x^11), {x, 0, 60}], x] (* Vincenzo Librandi, Feb 03 2015 *)
  • PARI
    {a(n) = (n^3 + if(n%2, 12*n^2 + 33*n + 54, 21*n^2 + 132*n + 288)) \ 288};
    
  • PARI
    {a(n) = my(s=1); if( n<0, s=-1; n=-11-n); s * polcoeff( 1 / ((1 - x^2)^2 * (1 - x^3) * (1 - x^4)) + x * O(x^n), n)};
    

Formula

G.f.: 1 / (1 - 2*x^2 - x^3 + 2*x^5 + 2*x^6 - x^8 - 2*x^9 + x^11).
a(n) = -a(-11-n) for all n in Z.
a(n+3) - a(n) = 0 if n even else floor((n+7)^2 / 16).
0 = a(n) - 2*a(n+2) - a(n+3) + 2*a(n+5) + 2*a(n+6) - a(n+8) - 2*a(n+9) + a(n+11) for all n in Z.
a(n) - a(n-2) = A005044(n+3) for all n in Z.
a(n) + a(n-1) = A001400(n) for all n in Z.
a(n) + a(n-2) = A165188(n+1) for all n in Z.
a(n) = A115264(n) - A115264(n-1) for all n in Z.
a(2*n) - a(2*n-6) = a(2*n+3) - a(2*n-3) = A002620(n+2) for all n in Z. - Michael Somos, Feb 11 2015
a(n) = (2*n^3+33*n^2+181*n+234+3*(3*n^2+33*n+86)*(-1)^n+84*(-1)^((2*n+1-(-1)^n)/4)-96*((1+(-1)^n)*floor(((2*n+9+(-1)^n-6*(-1)^((2*n+3+(-1)^n)/4))/24))+(1-(-1)^n)*floor(((2*n+5+(-1)^n-6*(-1)^((2*n-1+(-1)^n)/4))/24))))/576. - Luce ETIENNE, May 22 2015

A325695 Number of length-3 strict integer partitions of n such that the largest part is not the sum of the other two.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 2, 5, 5, 8, 7, 12, 11, 16, 15, 21, 20, 27, 25, 33, 32, 40, 38, 48, 46, 56, 54, 65, 63, 75, 72, 85, 83, 96, 93, 108, 105, 120, 117, 133, 130, 147, 143, 161, 158, 176, 172, 192, 188, 208, 204, 225, 221, 243, 238, 261, 257, 280, 275
Offset: 0

Views

Author

Gus Wiseman, May 15 2019

Keywords

Examples

			The a(7) = 1 through a(15) = 12 partitions (A = 10, B = 11, C = 12):
  (421)  (521)  (432)  (631)  (542)  (543)  (643)   (653)   (654)
                (531)  (721)  (632)  (732)  (652)   (842)   (753)
                (621)         (641)  (741)  (742)   (851)   (762)
                              (731)  (831)  (751)   (932)   (843)
                              (821)  (921)  (832)   (941)   (852)
                                            (841)   (A31)   (861)
                                            (931)   (B21)   (942)
                                            (A21)           (951)
                                                            (A32)
                                                            (A41)
                                                            (B31)
                                                            (C21)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],UnsameQ@@#&&#[[1]]!=#[[2]]+#[[3]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 15 2019: (Start)
G.f.: x^7*(1 + x + 2*x^2) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>9.
(End)
a(n) = A325696(n)/6. - Alois P. Heinz, Jun 18 2020

A385736 a(n) is the number of distinct nondegenerate triangles with perimeter n whose side lengths are triangular numbers.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2, 1, 2, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 0, 1
Offset: 0

Views

Author

Felix Huber, Jul 16 2025

Keywords

Comments

0, 1, 6, 10, 28, 55 are the only triangular numbers <= 10^6 that are not perimeters of triangles whose side lengths are triangular numbers. Conjecture: There are no other triangular numbers that have this property.

Examples

			The a(31) = 2 distinct nondegenerate triangles with perimeter 31 and whose side lengths are triangular numbers are [1, 15, 15] and [6, 10, 15].
		

Crossrefs

Programs

  • Maple
    A385736:=proc(N) # To get the first N + 1 terms.
        local p,x,y,z,i;
        p:=[];
        for z to floor((sqrt(24*N+9)-3)/6) do
            for x from z to floor((sqrt(4*N-3)-1)/2) do
                for y from max(z,floor((sqrt(1+4*(x^2+x-z^2-z))-1)/2)+1) to min(x,floor((sqrt(1+4*(2*N-x^2-x-z^2-z))-1)/2)) do
                    p:=[op(p),z*(z+1)/2+y*(y+1)/2+x*(x+1)/2]
                od
            od
        od;
        return seq(numboccur(p,i),i=0..N)
    end proc;
    A385736(87);

Formula

Trivial upper bound: a(n) <= A005044(n).
a(A385737(n)) >= 1.

A005041 A self-generating sequence.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 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, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18
Offset: 0

Views

Author

Keywords

Comments

See A008620 for run lengths: each k occurs A008620(k+2) times. - Reinhard Zumkeller, Mar 16 2012

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a005041 n = a005041_list !! n
    a005041_list = 1 : f 1 1 (tail ts) where
       f y i gs'@((j,a):gs) | i < j  = y : f y (i+1) gs'
                            | i == j = a : f a (i+1) gs
       ts = [(6*k + 3*k*(k-1) `div` 2 + r*(k+2), 3*k+r+1) |
             k <- [0..], r <- [0,1,2]]
    -- Reinhard Zumkeller, Mar 16 2012
  • Mathematica
    Table[n+1, {n, 0, 20}, {Ceiling[(n+1)/3]+1}] // Flatten (* Jean-François Alcover, Dec 10 2014 *)

Formula

For any k in {0, 1, 2, ...} and r in {0, 1, 2}, we have: if n = 6*k + (3/2)*k*(k-1) + r*(k+2), then a(n) = 3*k + r + 1. E.g., for k=3 and r=1, we have n = 6*3 + (3/2)*3*(3-1) + 1*(3+2) = 32 and so a(32) = 3*3 + 1 + 1 = 11. - Francois Jooste (phukraut(AT)hotmail.com), Mar 12 2002

Extensions

More terms from Samuel Hilliard (sam_spade1977(AT)hotmail.com), Apr 11 2004

A069981 Hermite's problem: number of positive integral solutions to x + y + z = n subject to x <= y + z, y <= z + x and z <= x + y.

Original entry on oeis.org

0, 0, 0, 1, 3, 3, 7, 6, 12, 10, 18, 15, 25, 21, 33, 28, 42, 36, 52, 45, 63, 55, 75, 66, 88, 78, 102, 91, 117, 105, 133, 120, 150, 136, 168, 153, 187, 171, 207, 190, 228, 210, 250, 231, 273, 253, 297, 276, 322, 300, 348, 325, 375, 351, 403, 378, 432
Offset: 0

Views

Author

N. J. A. Sloane, May 06 2002

Keywords

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I, Springer-Verlag, Part I, Chap. 1, Problem 31.

Crossrefs

Cf. A005044.

Programs

  • Magma
    [0] cat [(2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16: n in [1..60]]; // G. C. Greubel, Jun 10 2018
  • Mathematica
    f[n_]:=If[EvenQ[n],((n+8)(n-2))/8,(n^2-1)/8];Join[{0},Array[f,60]] (* Harvey P. Dale, Jul 26 2011 *)
  • PARI
    for(n=0, 60, print1(if(n==0, 0, (2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16), ", ")) \\ G. C. Greubel, Jun 10 2018
    

Formula

G.f.: x^3*(1 + 2*x - 2*x^2)/(1 - x)/(1 - x^2)^2.
a(n) = (n+8)*(n-2)/8 for n even, (n^2-1)/8 for n odd.
a(n) = (2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16 for n>0. - Luce ETIENNE, Jun 29 2015
E.g.f.: (16 + (x^2 + x - 16)*cosh(x) + (x^2 + 7*x - 1)*sinh(x))/8. - Stefano Spezia, May 09 2022
Previous Showing 61-70 of 126 results. Next