Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I...display the series 1,2,4,7,44,45,47,50,216........N using c# technique
Posted
Comments
Wendelius 24-Jan-15 14:57pm    
What is the formula that would produce this series?
Zoltán Zörgő 24-Jan-15 15:00pm    
I guess that is the real question... :)
Sergey Alexandrovich Kryukov 24-Jan-15 15:47pm    
And what is "C# technique"?
The example of data is not the definition. I could proof that there can be infinite number of sequences with the same starting members. So, the guesswork is possible but pointless.
—SA

1 solution

My guess work:
a0 = 1

a4k = 30 + a4(k-1) + a4(k-1)+1 + a4(k-1)+3 + a4(k-1)+6 = 4 (a4(k-1) + 10)
(k = 1, 2, 3, 4, ...)

a4k+1 = a4k + 1
a4k+2 = a4k+1 + 2
a4k+3 = a4k+2 + 3
(k = 0, 1, 2, 3, ...)

Now a C# loop should do the trick.
 
Share this answer
 
v8
Comments
[no name] 24-Jan-15 19:01pm    
You are crazy, wow! My tiny 5, do you think also a c++ Loop can do the trick *lol*?
CPallini 24-Jan-15 19:53pm    
Yes, I think so :-)
By the way, thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900