Fibonacci functions in java?
139131
Something like this would work (syntax may not be exactly correct here...):\n\npublic class FibonacciNumbers {\n    public int getNthNumber(int n)  {\n        if (n <= 1) {\n            return 1;\n        }\n        int curFib = 1;\n        int lastFib = 0;\n        int temp;\n        for (int i = 2; i < n; i++) {\n            temp = curFib;\n            curFib = curFib + lastFib;\n            lastFib = temp;\n        }\n        return curFib;\n    }\n};\n\n\nYou can also write it recursively (i.e. call getNthNumber() inside the function), but this way is a bit faster due to overhead from function calls.
396671
try www.quickmath.com and www.calculator.com. I have a lot of others if you want them.
326729
nested loops and if..then jump\n\nfor I = 1 to 42\nfor J = I+1 to 43\nfor K = J+1 to 45\nfor L = K+1 to 47\nfor M = L+1 to 48\nfor N = M+1 to 49\nif K-I=2 or L-J=2 or M-K=2 or N-L = 2 then [skip next line]\nprint I,J,K,L,M,N\nnext\nnext\nnext\nnext\nnext\nnext\n\nSomething like that;\nTranslate into your language's syntax
747397
Checking by method of differences\n\n. x ............. f(x) ...... Δ1 ...... Δ2\n. 0 .......... 1104\n. 1 .......... 1104 ........ 0\n. 2 .......... 1100 ........ 4 ....... -4\n. 3 .......... 1092 ........ 8 ....... -4\n. 4 .......... 1080 ...... 12 ....... -4\n. 5 .......... 1064 ...... 16 ....... -4\n. 6 .......... 1044 ...... 20 ....... -4\n. 7 .......... 1020 ...... 24 ....... -4\n. 8 ............ 992 ...... 28 ....... -4\n. 9 ............ 960 ...... 32 ....... -4\n10 ............ 924 ...... 36 ....... -4\n11 ............ 884 ...... 40 ....... -4\n12 ............ 840 ...... 44 ....... -4\n13 ............ 792 ...... 48 ....... -4\n14 ............ 740 ...... 52 ....... -4\n15 ............ 684 ...... 56 ....... -4\n16 ............ 624 ...... 60 ....... -4\n17 ............ 560 ...... 64 ....... -4\n18 ............ 492 ...... 68 ....... -4\n19 ............ 420 ...... 72 ....... -4\n20 ............ 344 ...... 76 ....... -4\n21 ............ 264 ...... 80 ....... -4\n22 ............ 180 ...... 84 ....... -4\n23 .............. 92 ...... 88 ....... -4\n24 ................ 0 ...... 92 ....... -4\n\nSo the relation is quadratic (as Δ2 is constant which imples the 2nd derivative is constant)\n\nSo the relation is of the form\n\nf(x) = ax^2 + bx + c\n\nNow f(0) = c = 1104\nf(1) = a + b + c = 1104\nSo a + b + 1104 = 1104\nie a + b = 0\n\nf(2) = 4a + 2b + c = 1100\n4a + 2b + 1104 = 1100\nSo 4a + 2b = -4\n\nie 2a + 2a + 2b = 2a + 2(a + b) = -4\nSo 2a + 0 = -4\nie a = -2 and b = 2\n\nThus f(x) = -2x^2 + 2x + 1104\n= -2(x^2 - x - 552)\n= -2(x - 24)(x + 23)\n\nTest f(10) = -2*(10 - 24)(10 + 23)\n= -2 * (-14) * (33)\n= 28 * 33\n= 924 YESSSSSSSSSSS!!
681952
Here you go:\nhttp://en.wikipedia.org/wiki/Fibonacci_series
1019687
F(n)=F(n-1)+F(n-2), where F(0) = 0 and F(1) = 1\nn= 2 \nF(2) = F(2-1) + F(2-2)\nF(2) = F(1) + F(0) \nF(2) = 1 + 0 = 1\nn = 3\nF(3) = F(3-1) + F(3-2)\nF(3) = F(2) + F(1)\nF(3) = 1 + 1 \nF(3) = 2\nn = 4\nF(4) = F(4-1) + F(4-2)\nF(4) = F(3) + F(2)\nF(4) = 2 + 1\nF(4) = 3\nn = 5\nF(5) = F(4) + F(3)\nF(5) = 3 + 2\nF(5) = 5
650616
These three sequntal clock wise numbers \n2+3+4 --> 9+4 --> 1 (adding the last no.(4)\nBut not works for all
243446
It's called the Fibonacci sequence, but there's actually a couple more terms at the front: 0,1,1,2,3,5,8,13...  You take the last 2 terms and add them together to get the next term.  So 8+13 = 21; 21+13 = 34, etc.\n\nHere is a good start if you're interested in learning more about it:\n\nhttp://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/
1108199
I'm presently stumped.\n\nKatrina and laddi threw out numbers, but gave no indication of why.  Just guesses, I'm thinking.\n\nDanny offered a site listing some integer sequences.  The problem is that the problem, as stated, suggests only one value between 5 and 224 in this particular series.  Danny should have checked the site--this one isn't there.\n\nTriKri suggested that this is the Fibonacci sequence.  There are three problems with this answer.  First, if it was, it would have begun 1, 1, 2, ...  Since there is only one "1" at the beginning, the suggestion is that this is NOT the Fibonacci sequence.  Second, as in Danny's answer, the problem (as stated) suggests only one value between 5 and 224--not a whole string of values.  Third, the value 224 does not actually appear in the Fibonacci sequence--which TriKri should have verified before suggesting this solution.\n\nAs I say, I'm presently stumped--but the answers offered so far don't do much for me.\n\nAre we sure that 224 is the sixth value in the series?
451055
hehe .. the above answer is funny!!\n\nthe above program simply squares a number and returns.\n\nLet the eqn be of form ax^2 + bx + c =0\n\nprocess is dumb actually.. first find delta (delta = b^2 - (4 *a*c))\n\nroots of equation are : [-(b) + sqrt(delta) ]/(4*a*c) AND [-(b) - sqrt(delta) ]/(2*a)\n\n\nok.. here's a program to solve a quadratic equation :\n\nits in java ..\n\n\nimport java.io.*;\nclass quadra\n{\npublic static void main(String args[])throws\n\nIOException\n{\nint a,b,c;\n\ndouble delta,root1,root2;\nSystem.out.println(" Enter coefficient of x^2 ");\n\nBufferedReader br = new BufferedReader(new\n\nInputStreamReader(System.in));\n\na = Integer.parseInt(br.readLine() );\n\nSystem.out.println(" Enter coefficient of x ");\n\n\nb = Integer.parseInt(br.readLine() );\n\nSystem.out.println(" Enter coefficient of\n\nconstant");\n\nc = Integer.parseInt(br.readLine() );\n\ndelta = (b*b) - (4*a*c);\n\nroot1 = ((-(b)) + Math.sqrt(delta)) / (2*a);\nroot2 = ((-(b)) - Math.sqrt(delta)) / (2*a);\n\nSystem.out.println("roots are"+ root1 +"and"+\n\nroot2);\n\n}\n}\n\n\nhope i have answered ur question\n; )\n\nif u want program in C\nmail me: anand_87123@yahoo.com\nsubject line : Y! answers - programming
740336
1. 101\n2.  There are 2 ones.  The first and last entries of the row.\n3.  Each entry is the sum of the 2 entries above and to     each side of it.\n4.  If the 2'nd entry in a row is a prime, it divides each of the other entries in the row (except for the last entry in the row which is always a 1)\n\nCheck out http://ptri1.tripod.com/ for all manner of kewl sh|t about Pascal's Triangle.  Also Fibonacci Series and other fun things ☺\n\n\nDoug\n\nEDIT:  Give Peter D the points.  He needs 'em worse than I do ☺
1091564
http://mathworld.wolfram.com/SieveofEratosthenes.html
316406
Depends on how fast you're counting...\n\nhttp://hub1.worlded.org/docs/maththing/ny1p5.htm\nhttp://mathforum.org/library/drmath/view/58739.html
697965
every number from 0 to 10\n\nplus placed in alphabetical order
952696
n + (n - 5) + (n + 6) \n3n + 1
410829
The commonly taught method for computing square roots with pencil and paper can be found in the Wikipedia article, "Methods of computing square roots".\n\nScroll down to the heading "An exact long-division-like algorithm".
549823
Add one to everything and see what you get.\n\nYes, a *lot* of research has been done on the Fibonacci sequence. There is even a journal that was devoted to it (The Fibonacci Quarterly), although it has broadened to other number theory topics.