login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A370408 Lexicographically earliest sequence of positive integers such that no three equal terms appear at distinct indices that are the side lengths of a triangle. 3
1, 1, 1, 2, 1, 2, 3, 1, 3, 2, 4, 4, 1, 5, 5, 2, 3, 6, 6, 7, 1, 7, 4, 8, 8, 2, 3, 9, 5, 9, 10, 10, 11, 1, 4, 11, 6, 12, 12, 13, 13, 2, 7, 3, 5, 14, 14, 15, 8, 15, 16, 16, 17, 17, 1, 6, 18, 4, 9, 18, 19, 19, 10, 20, 7, 20, 21, 2, 11, 21, 3, 22, 22, 5, 8, 23, 12, 23, 24, 24, 13, 25, 25, 26, 26, 27, 27, 28, 1, 9, 28, 29, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
In a triangle, the sum of any two side lengths is greater than that of the third, so that x + y > z.
So if x < y and a(x) = a(y) = t then we cannot have a(z) = t for any z in the range y < z < x+y.
Another way to construct the sequence: Place 1's at the earliest permitted positions (in this case, at Fibonacci indices). Each subsequent value (2’s, 3’s, etc.) is placed at the earliest permitted indices not already occupied by a smaller value. For example, 3's could be placed in a Fibonacci pattern beginning with 7, 9 (7, 9, 16, 25, etc.), but i=7+9=16 is already occupied by the value 2, so 3 gets the next smallest position i=17. i=9+17=26 is again occupied by a 2, so we give 3 the next smallest unoccupied position i=27.
LINKS
MATHEMATICA
list={1}; Do[k=1; While[lst=Join[list, {k}]; !And@@(And@@(({a, b, c}=#; (-a+b+c)(a-b+c)(a+b-c))<=0&/@Subsets[Flatten[Position[lst, #]], {3}])&/@Union@lst), k++]; AppendTo[list, k], {n, 92}]; list (* Giorgos Kalogeropoulos, Feb 20 2024 *)
PROG
(Python)
from itertools import combinations as C, count, islice
def agen(): # generator of terms
yield from [1, 1, 1]
sides = {1: [1, 2, 3]}
for n in count(4):
an = next(an for an in count(1) if an not in sides or all(not all((n<b+c, b<n+c, c<n+b)) for b, c in C(sides[an], 2)))
yield an
if an not in sides: sides[an] = []
sides[an].append(n)
print(list(islice(agen(), 93))) # Michael S. Branicky, Feb 24 2024
CROSSREFS
Cf. A367196, A107572 (triangle side lengths), A100480.
Sequence in context: A352964 A209278 A326921 * A358090 A286343 A368399
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Feb 17 2024
EXTENSIONS
More terms from Giorgos Kalogeropoulos, Feb 20 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 12:38 EDT 2024. Contains 375456 sequences. (Running on oeis4.)