Generate a sequence by loop nodes

Next
 From:  1mi8
10850.1 
hello

I am a beginner about moi3d

I want to generate a sequence. Like {11,12,13,14} becomes {11,23 (11+12),36 (11+12+13),50 (11+12+13+14).

I'm trying to do that with a loop node. But I never get the best results. That image shows how I did it. But it has many problems. For example, the resulting sequence cannot be cleared.

How do I get the correct sequence?
Image Attachments:
Size: 83.9 KB, Downloaded: 65 times, Dimensions: 753x607px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10850.2 In reply to 10850.1 
The series looks like an arithmetic progression with common difference of 1, combined with a fibonacci recursive formula. Found javascript code for fibonacci recursion. More study needed.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10850.3 
The Progression should have a base of 11, and a Factor of 1.
Going to work, no time to study now.
- Brian

Javascript code:
https://www.geeksforgeeks.org/program-for-nth-fibonacci-number/

The nth term of an arithmetic sequence
https://www.alamo.edu/contentassets/afe30946fa58450c89840c1173f3b9d0/sequences/math1314-arithmetic-sequences.pdf

EDITED: 16 Sep 2022 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
10850.4 
Maybe this can help



Left Click on the Title of the Math node for obtain Edit Properties!

EDITED: 16 Sep 2022 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  1mi8
10850.5 In reply to 10850.3 
Thank you for your detailed reply.

I think I gave a too regular examples. If the sequence is {1,8,20,b,c,... }, becomes {1,9,29,29+b,29+b+c,... }.

The point of the question is, I didn't use the loop node correctly or the loop node has bug.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  1mi8
10850.6 In reply to 10850.4 
Thank you for your detailed reply.

But the sequence I want to generate is not limited to 5 or 8 numbers, and I hope to calculate more numbers.

I think maybe I didn't use the loop node correctly, or the loop node has bug.

When I'm dealing with objects or vectors, the loop node works correctly.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WN
10850.7 
Hi all.

Try this.

https://disk.yandex.ru/d/TxQgdTTMVRMs2g

image host

C:\Users\User\AppData\Roaming\Moi\nodeeditor\nodes\extensions

Copy the file to this location using the link. This is for Windows.

image host

EDITED: 16 Sep 2022 by WN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 10850.8 deleted 16 Sep 2022 by 1MI8

Previous
Next
 From:  1mi8
10850.9 In reply to 10850.7 
That's great. Thanks for sharing.

This is the node I really want.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Frenchy Pilou (PILOU)
10850.10 
Very compact! Excellent!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All