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

  Рет қаралды 4,947

nextProgram

nextProgram

4 жыл бұрын

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.

Пікірлер: 15
@StarNova9
@StarNova9 4 жыл бұрын
I paused at 0:45 to try and figure it out myself in C++. Interesting idea!
@nextProgram
@nextProgram 4 жыл бұрын
Cool! Not many people watched this video so I'm glad you liked it haha
@amaarquadri
@amaarquadri 4 жыл бұрын
Try plotting x versus the number of digits in the xth term of the sequence. It's pretty interesting.
@erikaordog8288
@erikaordog8288 4 жыл бұрын
Is this an intellectual exercise, or are there applications for this sequence?
@nextProgram
@nextProgram 4 жыл бұрын
Erika Ordog it was just for fun. I don’t think the sequence has any applications. I don’t think it even has a name
@immathiasyde
@immathiasyde 4 жыл бұрын
Some compression algorithms use this logic of counting how many 1 and 0 are in order with each other. Like 00000111 would become 5:0, 3:1 where the prefix is the count of the suffix
@amaarquadri
@amaarquadri 4 жыл бұрын
@@nextProgram It's called the look and say sequence
@Leo-rm4qq
@Leo-rm4qq 4 жыл бұрын
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)
@nextProgram
@nextProgram 4 жыл бұрын
Leo Interesting!
@jakehffn
@jakehffn 4 жыл бұрын
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 groupby(it))))) return it Obviously much less readable lol
@teddieo7647
@teddieo7647 4 жыл бұрын
How do I get enough processing power for that?
@nextProgram
@nextProgram 4 жыл бұрын
Hi, maybe getting a good computer
@teddieo7647
@teddieo7647 4 жыл бұрын
How about a laptop?
@nextProgram
@nextProgram 4 жыл бұрын
@@teddieo7647 Yeah, that's what I'm using
@surnthedog
@surnthedog 4 жыл бұрын
Is it bad that I knew the answer as soon as I looked at the thumbnail lol
I made a neural network to classify fake animals || Devlog
8:03
nextProgram
Рет қаралды 4,1 М.
Python Tensor Flow Tutorial - Predicting Numbers
13:02
Consulting Joe
Рет қаралды 29 М.
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 50 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 3,8 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
I Made a Weird Chess AI from Scratch
6:38
nextProgram
Рет қаралды 286 М.
Python user input ⌨️
7:18
Bro Code
Рет қаралды 214 М.
Slow Reading of a French Poem "Demain, dès l'aube" +🔎 Easy Explanations
9:06
Simple Password Generator in Python
7:51
NeuralNine
Рет қаралды 86 М.
[Algorithme] - 81. Suite de Conway (Count and say) [Python]
15:17
Foxxpy - Mathématiques et algorithmie
Рет қаралды 2,1 М.
Wait for the last one! 👀
0:28
Josh Horton
Рет қаралды 107 МЛН
The joker's house has been invaded by a pseudo-human#joker #shorts
0:39
Untitled Joker
Рет қаралды 8 МЛН
Papa yeh dila do ajse mein aapki behen 😢😊 #shorts
0:30
Sikha shorts and vlogs
Рет қаралды 33 МЛН