User Name Remember Me? Password

 Real Analysis Real Analysis Math Forum

 February 12th, 2013, 05:17 PM #1 Newbie   Joined: Feb 2013 Posts: 1 Thanks: 0 Translating Algorithm into Math? Hello. This is my first posting here, so I am not sure this is in the correct place. I have this math problem: Find the number of distinct integers in this set: [ (1^2) / 5012 ] , [ (2^2) / 5012 ] , ...... , [ (5012^2) / 5012 ] where [ x ] denotes the greatest integer less than or equal to x. I am not very familiar with the mathematical notation involved with this problem, so I wrote a computer program that solves it (in Java): Code: double t[] = new double; Set distinct = new HashSet(); for (int i = 1; i <= 5012; i++) { double q = Math.pow(i, 2); int l = (int) Math.floor(q / 5012); //gets "X" (greatest integer <= x) t[i] = l; distinct.add(l); } System.out.println(distinct); System.out.println("SIZE: " + distinct.size()); I get the correct answer: 3760, and I get the entire set of distinct integers. But I do not know how to represent this mathematically. Any help is appreciated! Thank you. Tags algorithm, math, translating ### content

Click on a term to search for related topics.
 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post forkconfig Applied Math 1 February 6th, 2014 02:25 PM yogazen2013 Algebra 4 October 7th, 2013 06:53 AM najken Computer Science 3 September 1st, 2012 02:30 PM IDoNotLikeMath Algebra 7 June 19th, 2012 07:19 PM yogazen2013 Calculus 0 December 31st, 1969 04:00 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top      