Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A051519
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A051519 Exactly n integer-sided triangles of perimeter a(n) have integer area. +0
1
12, 32, 48, 36, 64, 98, 160, 84, 128, 168, 144, 108, 416, 196, 192, 216, 288, 256, 780, 336, 294, 612, 396, 378, 1026, 392, 448, 420, 512, 324, 600, 792, 800, 432, 484, 540, 1000, 810, 676, 576, 1760, 2842, 1250, 648, 726, 924, 980, 2484, 1134, 864, 1210, 784 (list; graph; listen)
OFFSET

1,1

LINKS

Randall L Rathbun (randyr(AT)nethere.com), Jan 29 2007, Table of n, a(n) for n = 1..229

PROGRAM

#include <stdio.h> /* printf() */ #include <math.h> /* sqrt() round() */ unsigned int is_triangle(a, b, c) int a, b, c; { double s, A, B; s = (a+b+c)/2.0; A = s*(s-a)*(s-b)*(s-c); B = floor(sqrt(A)+0.1); if ( B*B == A && A > 0.0 ) return 1; else return 0; } int main() { int set; int a, b, c, p; for (p=1; p<15001; p++) { printf("%d ", p); set = 0; for (a=1; a<p; a++) { for (b=a; b<p; b++) { c = p-a-b; if (c >=b && c < a+b && b < a+c && a < b+c ) { if (is_triangle(a, b, c)) { set += 1; printf("[%d %d %d] ", a, b, c); } } } } printf(" "); printf("perimeter %d = %d ", p, set); } return 0; } - Randall L. Rathbun (randyr(AT)nethere.com), Jan 26 2007

CROSSREFS

Sequence in context: A031118 A118785 A071336 this_sequence A166959 A134582 A081268

Adjacent sequences: A051516 A051517 A051518 this_sequence A051520 A051521 A051522

KEYWORD

nonn

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net)

EXTENSIONS

More terms from Randall L. Rathbun (randyr(AT)nethere.com), Jan 26 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research