Home The Project Blog Plans Mission
Login Register
Home
The numbers to make triangular pizza slices

The numbers to make triangular pizza slices

The n-th triangular number can be obtained with Gauss' formula, the formula bears the name of the mathematician for a mere matter of historical convention but, according to the canons of priority assignment in use in mathematics, given its simplicity and the antiquity of the subject, it should certainly be attributed to others:
T_{n}={\frac {n(n+1)}{2}}.
here is the JAVA code to insert triangular numbers into an array of integers insert the java code into an editor like netbeans in the main.
package triangolari; public class Triangolari { public static void main(String[] args) { int triangolari[]= new int[100]; inizializzaArrayConTriangolari(triangolari); } public static int GetTriangolare(int n) { return (n*(n+1))/2; } public static void inizializzaArrayConTriangolari(int a[]) { for(int i=0;i<a.length;i++) { a[i]=GetTriangolare(i); System.out.println(a[i]); } } }
Follows the Java code to graphically draw the triangular numbers. here is the reference site on numerical sequences http://oeis.org/A000217
🤖

Studio Assistito con l'Intelligenza Artificiale

Vuoi padroneggiare al meglio i concetti di questo articolo? Avvia lo studio assistito per generare riassunti automatici, mappe concettuali o farti interrogare con il metodo socratico.

🎯 Scegli l'Agente AI

Come preferisci studiare questo articolo?

📝
Riassuntore
Genera un riassunto strutturato dell'articolo
🧠
Schematizzatore
Crea mappe concettuali e schemi gerarchici
🎓
Tutor Socratico
Ti interroga sull'articolo con domande progressive

Contact us for a free trial