473,654 Members | 3,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find the series problem

Given an arbitrary number series, how do I identify the series and find the
Nth number...
for e.g 1,3,5,7 is an AP and the next number will be 9
1,8,27,64 is the series of cubes and the next will be 125
1,1,2,3,5,8 is the Fibonacci series
The thing is I'll be given the series only...I have to identify the series
and find the next number. Pointers on how to do this please ...
Regards,
Sriram
Nov 22 '05 #1
2 4094
It is theoretically impossible for a computer to determine the pattern
of an arbitrary number series. The only patterns it will recognize
are the patterns you program it to detect. So to detect a Fibonacci
series, just read each value, do the math, and compare to the actual
sequence. THe formula for Fibonnaci is N_t+2 = N_t+1 + N_t for t=0 to
inifinity with N_0 = 1.

Sriram Krishnan [at] gmx [dot] net wrote:
Given an arbitrary number series, how do I identify the series and find
the Nth number...
for e.g 1,3,5,7 is an AP and the next number will be 9
1,8,27,64 is the series of cubes and the next will be 125
1,1,2,3,5,8 is the Fibonacci series
The thing is I'll be given the series only...I have to identify the
series and find the next number. Pointers on how to do this please ...
Regards,
Sriram


Nov 22 '05 #2
It is theoretically impossible for a computer to determine the pattern
of an arbitrary number series. The only patterns it will recognize
are the patterns you program it to detect. So to detect a Fibonacci
series, just read each value, do the math, and compare to the actual
sequence. THe formula for Fibonnaci is N_t+2 = N_t+1 + N_t for t=0 to
inifinity with N_0 = 1.

Sriram Krishnan [at] gmx [dot] net wrote:
Given an arbitrary number series, how do I identify the series and find
the Nth number...
for e.g 1,3,5,7 is an AP and the next number will be 9
1,8,27,64 is the series of cubes and the next will be 125
1,1,2,3,5,8 is the Fibonacci series
The thing is I'll be given the series only...I have to identify the
series and find the next number. Pointers on how to do this please ...
Regards,
Sriram


Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
459
by: Sriram Krishnan [at] gmx [dot] net | last post by:
Given an arbitrary number series, how do I identify the series and find the Nth number... for e.g 1,3,5,7 is an AP and the next number will be 9 1,8,27,64 is the series of cubes and the next will be 125 1,1,2,3,5,8 is the Fibonacci series The thing is I'll be given the series only...I have to identify the series and find the next number. Pointers on how to do this please ... Regards, Sriram
4
5534
by: ryu | last post by:
Hi all, I have a xml document where I have to replace the value of node type that is text. For example, if the value of a node whose type is 'text' is 'Toyota', I would like it to be replaced with 'Honda'. Is there a way to do this?
4
1784
by: aW | last post by:
I have an interesting dilemma. I have a table with the following records: =================================================== Box | Series Start | Series End ========+=======================+================== 1 | 0001 | 0025 --------------------------------------------------- 2 | 0026 | 0050
1
1854
by: Sriram Krishnan [at] gmx [dot] net | last post by:
Given an arbitrary number series, how do I identify the series and find the Nth number... for e.g 1,3,5,7 is an AP and the next number will be 9 1,8,27,64 is the series of cubes and the next will be 125 1,1,2,3,5,8 is the Fibonacci series The thing is I'll be given the series only...I have to identify the series and find the next number. Pointers on how to do this please ... Regards, Sriram
4
3004
by: geoffp | last post by:
I need to generate reproducible random number series. I've done the obvious - use mt_srand with the same seed. This supposedly will create the same series every time. Is this true? Its not working for me. By the way, seeding mt_srand with different integers doesn't necessarily produce different series. I've done a little testing and every pair of consecutive even and odd numbers produces the same series. eg. seed 0 and 1
8
10970
by: srinpraveen | last post by:
I know to write a program to print the fibonacci series. But the problem is my teacher has asked us to write a program to print the natural numbers that are not involved in the fibonacci series. For example if the user gives 7 terms of the series to be displayed, then the display of the fibonacci series is 0, 1,1, 2, 3, 5, 8. But the natural numbers not involved are 4, 6 and 7. That's what my teacher wants. But I am struggling to write a...
5
1514
by: tinie | last post by:
I am just starting in c++ programming in Linux and currently, I have a 2d vector of characters, what function (or functions )can i use to find a series of characters in my vector? For example, I want to find 'h' 'e' 'l' 'p' within the 2d vector.
4
5897
by: keirnus | last post by:
Hello, I've been coding in Access VBA to create an Excel Graph and it was good. Until I got this error: Please check the code below: Private Sub TestGraph3()
2
1768
by: pbd22 | last post by:
Hi Folks. I have two columns, for simplicity: Input and Output. Output reflects the incremental difference of two chronolgocially consecutive inputs. problem: If a given input in the series is zero, then the result of the subtraction is not going to be incremental, but will add the full amount of the input into the output field
3
2810
by: sedaw | last post by:
hello ! i need to find the longest sub series by recursion , without use loops . for example : if the series: arr = 45 1 21 3 33 6 53 9 18 the sub series are:
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.