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

A070088 Number of integer-sided triangles with perimeter n and prime sides.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 2, 0, 1, 0, 1, 0, 1, 1, 2, 0, 3, 1, 3, 0, 2, 0, 2, 0, 3, 1, 3, 0, 5, 1, 5, 0, 4, 0, 3, 0, 5, 1, 5, 0, 4, 0, 4, 0, 2, 0, 3, 0, 5, 1, 3, 0, 6, 1, 8, 0, 5, 0, 5, 0, 4, 0, 3, 0, 5, 1, 6, 0, 6, 0, 4, 0, 7, 1, 7, 0, 9, 1, 10, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Examples

			For n=15 there are A005044(15)=7 integer triangles: [1,7,7], [2,6,7], [3,5,7], [3,6,6], [4,4,7], [4,5,6] and [5,5,5]: two of them consist of primes, therefore a(15)=2.
		

Crossrefs

Programs

  • Mathematica
    triangleQ[sides_] := With[{s = Total[sides]/2}, AllTrue[sides, # < s&]];
    a[n_] := Select[IntegerPartitions[n, {3}, Select[Range[Ceiling[n/2]], PrimeQ]], triangleQ] // Length; Array[a, 90] (* Jean-François Alcover, Jul 09 2017 *)
    Table[Sum[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[k] - PrimePi[k - 1]) (PrimePi[n - i - k] - PrimePi[n - i - k - 1]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}] (* Wesley Ivan Hurt, May 13 2019 *)

Formula

a(n) = A070090(n) + A070092(n) = A070095(n) + A070103(n).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * c(i) * c(k) * c(n-i-k), where c = A010051. - Wesley Ivan Hurt, May 13 2019

A070092 Number of isosceles integer triangles with perimeter n and prime side lengths.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 2, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 1, 3, 0, 2, 0, 3, 0, 1, 1, 3, 0, 3, 0, 2, 0, 1, 0, 3, 0, 1, 1, 2, 0, 3, 1, 4, 0, 2, 0, 4, 0, 1, 0, 1, 0, 4, 1, 3, 0, 2, 0, 3, 0, 1, 1, 3, 0, 4, 1, 4, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Examples

			For n=17 there are A005044(17)=8 integer triangles: [1,8,8], [2,7,8], [3,6,8], [3,7,7], [4,5,8], [4,6,7], [5,5,7] and [5,6,6]: four are isosceles: [1<8=8], [3<7=7], [5=5<7] and [5<6=6], but only two of them consist of primes, therefore a(17)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[k] - PrimePi[k - 1]) (PrimePi[n - i - k] - PrimePi[n - i - k - 1]) (KroneckerDelta[i, k] + KroneckerDelta[i, n - i - k] - KroneckerDelta[k, n - i - k]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}] (* Wesley Ivan Hurt, May 14 2019 *)

Formula

a(n) = A070088(n) - A070090(n).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * ([i = k] + [i = n-i-k] - [k = n-i-k]) * A010051(i) * A010051(k) * A010051(n-i-k), where [] is the Iverson bracket. - Wesley Ivan Hurt, May 14 2019

A070105 Number of integer triangles with perimeter n and prime side lengths which are obtuse and scalene.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 3, 0, 1, 0, 3, 0, 4, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 1, 0, 5, 0, 4, 0, 5, 0, 5, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = 0 if n is even. - Robert Israel, Jul 26 2024

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b,q,bmin,bmax,t;
      t:= 0;
      if n::even then return 0 fi;
      for a from 1 to n/3 by 2 do
        if not isprime(a) then next fi;
        bmin:= max(a+1,(n+1)/2-a); if bmin::even then bmin:= bmin+1 fi;
        q:= (n^2-2*n*a)/(2*(n-a));
        if q::integer then bmax:= min((n-a)/2, q-1) else bmax:= min((n-a)/2, floor(q)) fi;
        t:= t + nops(select(b -> isprime(b) and isprime(n-a-b), [seq(b,b=bmin .. bmax,2)]))
      od;
      t
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 26 2024

A070097 Number of integer triangles with perimeter n and prime side lengths which are both acute and scalene.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Crossrefs

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

Original entry on oeis.org

30, 101, 153, 193, 240, 328, 334, 392, 444, 454, 519, 544, 603, 621, 771, 777, 795, 799, 878, 911, 1005, 1123, 1135, 1262, 1508, 1526, 1538, 1568, 1694, 1818, 1848, 1858, 1999, 2023, 2037, 2066, 2193, 2223, 2253, 2454
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Examples

			a(2)=101: [A070080(101), A070081(101), A070082(101)]=[5<7<11].
		

Crossrefs

Showing 1-5 of 5 results.