Finding the next number in this sequence using Python || Devlog

preview_player
Показать описание
I made a Python program to find any term of this series. This video shows the code I wrote and outlines the basic function of the program.

One thing I want to clarify in this video is that each term also tells you what order all of the digits of the previous term came in, not just the number of each like I said in the video.
Рекомендации по теме
Комментарии
Автор

I paused at 0:45 to try and figure it out myself in C++. Interesting idea!

StarNova
Автор

Try plotting x versus the number of digits in the xth term of the sequence. It's pretty interesting.

amaarquadri
Автор

Is this an intellectual exercise, or are there applications for this sequence?

erikaordog
Автор

Decided to try to solve it and then tried to make it as small as possible.
Ever do coding golf?

I couldn't figure out how to get rid of any more lines, but was able to get 7:

from itertools import groupby
def sequence(num):
it = "1"
for x in range(num):
print(it)
it = "".join(list(map(lambda x: str(len(x)) + x[0], ("".join(group) for key, group in
return it

Obviously much less readable lol

jakehffn
Автор

0:15 i tried to figure it out myself and said the numbers out loud as you said, but in German, I didn’t found it out so I watch further and found out that the problem where that in German are two different types of 1 (that have a slightly difference in meaning)

Leo-rmqq
Автор

How do I get enough processing power for that?

teddieo
Автор

Is it bad that I knew the answer as soon as I looked at the thumbnail lol

surnthedog
visit shbcf.ru