Some ideas (math seq)

Unfortunately, I don't have too much time to discuss all this — just droping here some recent emails (Math-Fun & private)


Gavin L.:

> I recently saw your "An impossible infinite (Morse) sequence?" post, and it has piqued my interest. However, I am having trouble understanding how the first few terms are generated...Would you mind explaining (...)?

_________________________________________________________
Éric A.

On Tue, May 23, 2023, 8:11 AM Éric Angelini <eric.angelini@skynet.be> wrote:
Hi again Gavin, the impossible morse seq fate is also illustrated by the hereunder msg I’ve sent to Math-Fun last week.
Best,
É.
- - - - - - - - - - - - - - 

> Hello Math-Fun,
> I guess this is also a «floating between two waters» sequence (never true, never false) as a lot of backgnikcart is needed to compute S:

«Concatenate to any digit _d_ of S the next _d_ digits; the result is prime».

(as always, S should be the lexicographically earliest sequence of distinct positive terms with the above property — but...)

S = 1, 3, 2, 5, 7, 4, 6, 8, 77, 9, 19, 61, 71, …

We see that:
1 & 3 = 13 is prime
3 & 257 = 3257 is prime
2 & 57 = 257 is prime
5 & 74687 =  574687 is prime
7 & 4687791 = 74687791 is prime
4 & 6877 = 46877 is prime
6 & 877919 = 6877919 is prime
8 & 77919617 = 877919617 is prime
7 & 7919617 = 77919617 is prime
7 & 9196171 = 79196171 is prime, etc.

I have to admit I regret a bit that such "ideas" cannot enter the OEIS just because we fear that many present terms might be erased by future terms. Is it possible to handle that? One might add in the Comments section that «The sequence is probably not the earliest one with this property, because of the well-known 'backtracking paradox' but it deserves an entry in the OEIS».

_________________________________________________________
Gavin L.:

> Hello Eric! Aha! Okay, much clearer now :), thank you! I have starting working on an algorithm to try and produce the terms (...) Will update you soon.

_________________________________________________________
Gavin's update came quick:

> Update! I got the program working faster than I thought! Here's some more terms!

2, 6, 8, 9, 15, 18, 20, 26, 29, 36, 40, 47, 56, 60, 67, 73, 78, 80, 86, 89, 93, 97, 99, 105, 108, 110, 116, 119, 126, 135, 141, 148, 157, 166, 170, 177, 183, 188, 194, 198, 200, 206, 209, 216, 225, 234, 242, 249, 258, 267, 276, 280, 287, 295, 299, 306, 315, 324, 333, 342, 353, 364, 375, 381, 388, 396, 405, 414, 423, 432, 441, 452, 463, 474, 485, 495, 504, 513, 522, 531, 540, 551, 562, 575, 586, 596, 605, 614, 623, 632, 641, 652, 663, 674, 685, 693, 699, 706, 715, 724, 733, 742, 750, 759, 768, 777, 786, 792, 798, 800, 806, 809, 816, 825, 834, 842, 849, 858, 867, 876, 880, 887, 895, 899, 905, 908...

So it looks as if the sequence can be continued, however the catch is that you must allow enough attempts to find a suitable new integer. It's a bit difficult to tell a program "It's an infinite loop, so iterate". I found if you don't leave enough attempts, the sequence will pretty much delete itself because it will remove all previous integers that were valid. 

I allow for 10*a(n-1) attempts to find a new integer. For example, If S = [2, 6, 8, 9], the next integer I try is 10. We know this integer does not work, but the program needs to know this too. It gets 10*10 = 100 attempts to try and find the next integer. If it can't (and it won't), it will delete 10 and append 11 and try again and so on...

I know you said you're not a programmer, but...if you're feeling adventurous:

#Start of code
from itertools import count, filterfalse
morse = [0, 1, 2, 3, 4, 5, 4, 3, 2, 1]
total_dits = [2]
a = [2]
for _ in range(100):  #<-- Change the number "range(###)" in the range to whatever you want!
    smallest = next(filterfalse(set(a).__contains__, count(2)))
    attempts = 0
    while True:
        split = [int(k) for k in str(abs(smallest))]
        small_dits = [morse[split[j]] for j in range(len(split))]
        if sum(small_dits) + sum(total_dits) == smallest:
            a.append(smallest)
            total_dits.append(sum(small_dits))
            break
        else:
            smallest += 1
            attempts += 1
            if attempts >= 10*a[-1]:
                last_added = a.pop()
                total_dits.pop()
                smallest = last_added + 1
                attempts = 0
print(a)
#End of code

Here's the code!. If you copy that program from "#Start of code" to "#End of code" (you can include those statements) and paste into this website:

All you gotta do is hit the run button and boom! There's your terms! Just for fun :) Not the best code, but matches your terms that you provided.

Very interesting sequence indeed. I think this could be submitted to the OEIS, but I am not sure if the editors would want a proof showing the terms provided and 100% final answers. I'll generate as many terms as I can and I'll see what happens (...)

Éric A.

> Hello Math-Fun,
> Pick any digit D of a(n); D must be the absolute difference of two adjacent digits of a(n+1).
Starting with a(1) = 0, I guess we have (S being the lexicographically earliest sequence of distinct
non negative terms):
S = 0,11,10,100,110,122,102,1002,1102,1200,1220,1224,1026,10028,10086,10082,…
Example:
—> why 11?
because 11 is the smallest integer producing a(1) as 1-1 =0, etc.
(I’ll stop there because S is now too difficult to compute by hand).
Best,
É.
_________________________________________________________
Hans H.:

>EA: "Pick any digit D of a(n); D must be the absolute difference of two adjacent digits of a(n+1)."
... Instead of "pick any digit D of a(n)", perhaps "for each/every digit D of a(n)" is clearer (more in line with your intent).
>EA: "S = 0,11,10,100,110,122, ..."
... S = 0,11,10,100,110,112, ... ?

_________________________________________________________
Hans again, later:

I get S = 0, 11, 10, 100, 110, 112, 102, 1002, 1022, 1102, 1120, 1124, 1026, 10028, 10086, 10082, 10866, 10822, 10886, 10882, 11086, 11082, 11208, 11976, 10928, 100913, ...

I think a(24) = 11976 is the first term containing a digit 9, so this dooms all subsequent terms to containing a digit 9 with an adjacent digit 0. That zero will doom all terms, starting with a(26), to containing at least one instance of identical adjacent digits. So, in addition to the known occurrences (<1000) of 0, 10, 11, 100, 102, 110, and 112, it seems possible that 900 or 990 might eventually appear, but there may be constraints that prevent them from ever so doing.

_________________________________________________________
Éric A.

Thank you Hans! I had the same conclusion for 9 (I didn’t think about zero, you opened my eyes). Would you submit this to the OEIS? The graph might be interesting (if not climbing regularly).
_________________________________________________________
Hans (conclusion):

>EA: "Would you submit this to the OEIS?"
... If it is accepted, it will be A362335.
Éric A.

> Hello Math-Fun,
> NAME: Lexicographicaly earliest sequence of distinct integers >0 such that a(n)+a(n+1) always ends in n.

DATA:
S=1,10,2,11,3,12,4,13,5,14,96,15,97,16,98,17,99,18,100, …

EXAMPLE:
The addition #1 must end in 1; indeed 1+10=11 ends in 1;
The addition #2 must end in 2; indeed 10+2=12 ends in 2;
The addition #3 must end in 3; indeed 2+11=13 ends in 3;
The addition #4 must end in 4; indeed 11+3=14 ends in 4;
The addition #5 must end in 5; indeed 3+12=15 ends in 5;
The addition #6 must end in 6; indeed 12+4=16 ends in 6;
The addition #7 must end in 7; indeed 4+13=17 ends in 7;
The addition #8 must end in 8; indeed 13+5=18 ends in 8;
The addition #9 must end in 9 indeed 5+14=19 ends in 9;
The addition #10 must end in 10; indeed 14+96=110 ends in 10;
The addition #11 must end in 11; indeed 96+15=111 ends in 11;
The addition #12 must end in 12; indeed 15+97=112 ends in 12;
The addition #13must end in 13; indeed 97+16=113 ends in 13;
The addition #14 must end in 14; indeed 16+98=114 ends in 14;
The addition #15 must end in 15; indeed 98+17=115 ends in 15;
The addition #16 must end in 16; indeed 17+99=116 ends in 16;
The addition #17 must end in 17; indeed 99+18=117 ends in 17;
The addition #18 must end in 18; indeed 18+100=118 ends in 18;
etc.
QUESTION:
Will the integer 6 appear at some point in S — or never? (...)
_________________________________________________________
Michael B. was quick to answer (and make me blush):

> Eric,
I get a(30) = 6, with S continuing as
[1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 96, 15, 97, 16, 98, 17, 99, 18, 100, 19, 101, 20, 102, 21, 103, 22, 104, 23, 105, 24, 6, ...]
_________________________________________________________
Éric A.

> On Mon, May 29, 2023 at 6:40 PM Éric Angelini <eric.angelini@skynet.be> wrote:
Many thanks Michael! — This 6 suggests that S is a permutation of the natural numbers, don’t you think?
_________________________________________________________
Michael B.

> Looks like a good bet.
Reporting at k*1000, the lowest number not yet appearing follows k*500 + 10
(except for a large jump to 14991 at 21000 that plateaus there until 30000)
I've run it to 100000 so far. If pattern holds, there should be a next jump then plateau at 210000.
_________________________________________________________
math-fun mailing list -- math-fun@mailman.xmission.com
To unsubscribe send an email to math-fun-leave@mailman.xmission.com

(All pictures on this page were taken a few days ago at the Vuitton Foundation by the author)


























Commentaires

Posts les plus consultés de ce blog

A square for three (chess)

Le tripalin se présente

Some strings au cinéma Galeries