cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-14 of 14 results.

A304337 Lexicographically earliest fractal-like sequence such that the erasure of all pairs of contiguous terms of opposite parity leaves the sequence unchanged.

Original entry on oeis.org

1, 2, 4, 3, 1, 5, 6, 2, 4, 8, 7, 3, 1, 5, 9, 10, 6, 2, 4, 8, 12, 11, 7, 3, 1, 5, 9, 13, 14, 10, 6, 2, 4, 8, 12, 16, 15, 11, 7, 3, 1, 5, 9, 13, 17, 18, 14, 10, 6, 2, 4, 8, 12, 16, 20, 19, 15, 11, 7, 3, 1, 5, 9, 13, 17, 21, 22, 18, 14, 10, 6, 2, 4, 8, 12, 16, 20, 24, 23, 19, 15, 11, 7, 3, 1
Offset: 1

Views

Author

Eric Angelini, May 11 2018

Keywords

Comments

The sequence is fractal-like as it embeds an infinite number of copies of itself.
The sequence was built according to these rules (see, in the Example section, the parenthesization technique):
1) no overlapping pairs of parentheses;
2) always start the content inside a pair of parentheses with the smallest integer X not yet present inside another pair of parentheses;
3) always end the content inside a pair of parentheses with the smallest integer Y not yet present inside another pair of parentheses such Y is not of the same parity as X;
4) after a(1) = 1 and a(2) = 2, always try to extend the sequence with a duplicate of the oldest term of the sequence not yet duplicated; if this leads to a contradiction, open a new pair of parentheses.

Examples

			Parentheses are added around each pair of terms of opposite parity:
(1,2),(4,3),1,(5,6),2,4,(8,7),3,1,5,(9,10),6,2,4,8,(12,11),7,3,1,5,9,(13,14),10,6,2,4,8,12,(16,15),11,7,3,1,5,9,13,(17,18),14,10,6,
Erasing all the parenthesized contents yields
(...),(...),1,(...),2,4,(...),3,1,5,(....),6,2,4,8,(.....),7,3,1,5,9,(.....),10,6,2,4,8,12,(.....),11,7,3,1,5,9,13,(.....),14,10,6,
We see that the remaining terms slowly rebuild the starting sequence.
		

Crossrefs

Cf. A303845 (same idea, but pairs of contiguous terms are erased if a prime by concatenation arises), A303948 (if pair has at least one digit in common), A303953 (if pair sums up to a square).

A316272 A fractal-like sequence: erasing all pairs of consecutive terms that include a prime and a composite number (in any order) leaves the sequence unchanged.

Original entry on oeis.org

1, 2, 3, 4, 1, 6, 5, 2, 3, 7, 8, 4, 1, 6, 9, 11, 5, 2, 3, 7, 13, 10, 8, 4, 1, 6, 9, 12, 17, 11, 5, 2, 3, 7, 13, 19, 14, 10, 8, 4, 1, 6, 9, 12, 15, 23, 17, 11, 5, 2, 3, 7, 13, 19, 29, 16, 14, 10, 8, 4, 1, 6, 9, 12, 15, 18, 31, 23, 17, 11, 5, 2, 3, 7, 13, 19, 29, 37, 20, 16, 14, 10, 8, 4, 1
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 28 2018

Keywords

Comments

The sequence is fractal-like as it embeds an infinite number of copies of itself.
The sequence was built according to these rules (see, in the Example section, the parenthesization technique):
1) no overlapping pairs of parentheses;
2) always start the content inside a pair of parentheses either with the smallest prime P > 2 not yet present inside another pair of parentheses or with the smallest composite C > 1 not yet present inside another pair of parentheses ;
3) always end the content inside a pair of parentheses either with the smallest composite C > 1 not yet present inside another pair of parentheses or with the smallest prime > 2 not yet present inside another pair of parentheses;
4) after a(1) = 1 and a(2) = 2, always try to extend the sequence with a duplicate > 1 of the oldest term of the sequence not yet duplicated; if this leads to a contradiction, open a new pair of parentheses.

Examples

			Parentheses are added around each pair of terms made of a composite and a prime number (in any order):
(1,2),(3,4),1,(6,5),2,3,(7,8),4,1,6,(9,11),5,2,3,7,(13,10),8,4,1,6,9,(12,17),11,...
Erasing all the parenthesized contents yields
(...),(...),1,(...),2,3,(...),4,1,6,(....),5,2,3,7,(.....),8,4,1,6,9,(.....),11,...
We see that the remaining terms rebuild the starting sequence.
		

Crossrefs

For other "erasing criteria", see A303845 (prime by concatenation), A274329 (pair summing up to a prime), A303936 (pair not summing up to a prime), A303948 (pair sharing a digit), A302389 (pair having no digit in common), A303950 (pair summing up to a Fibonacci), A303951 (pair not summing up to a Fibonacci), A303953 (pair summing up to a square), A303954 (pair not summing up to a square).

A342165 A fractal-like sequence: erase the terms that have a prime index, the non-erased terms rebuild the original sequence.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 4, 3, 6, 5, 7, 2, 4, 3, 8, 6, 9, 5, 7, 2, 10, 4, 3, 8, 6, 9, 11, 5, 12, 7, 2, 10, 4, 3, 13, 8, 6, 9, 14, 11, 15, 5, 12, 7, 16, 2, 10, 4, 3, 13, 17, 8, 6, 9, 14, 11, 18, 15, 19, 5, 12, 7, 16, 2, 20, 10, 4, 3, 21, 13, 22, 17, 8, 6, 9, 14
Offset: 1

Views

Author

Jean-Marc Falcoz and Eric Angelini, Mar 03 2021

Keywords

Comments

To build the sequence, we start with a(1) = 1 and always extend it with the smallest integer not yet used, except in the case where the number is imposed by the constraint (i.e. if the index is nonprime). This fractal-like sequence takes arbitrarily large values.

Examples

			Original sequence: 1,2,3,2,4,3,5,2,4,3,6,5,7,2,4,3,8,6,9,5,7,2,10,4,3
Erasing: 1,(2,3,)2,(4,)3,(5,)2,4,3,(6,)5,(7,)2,4,3,(8,)6,(9,)5,7,2,(10,)4,3
Non-erased: 1,( )2,(  )3,(  )2,4,3,(  )5,(  )2,4,3,(  )6,(  )5,7,2,(   )4,3
The non-erased terms rebuild the original sequence.
		

Crossrefs

Cf. A303845.

Programs

  • PARI
    a(n) = while(n>1 && !isprime(n), n-=primepi(n)); primepi(n)+1; \\ Kevin Ryde, Mar 03 2021
  • Python
    from sympy import isprime
    def aupton(terms):
      alst, idx = [1], 1
      for n in range(2, terms+1):
        if isprime(n): an = max(alst) + 1
        else: an, idx = alst[idx], idx + 1
        alst.append(an)
      return alst
    print(aupton(78)) # Michael S. Branicky, Mar 03 2021
    

Formula

a(prime(i)) = i + 1. - Michael S. Branicky, Mar 04 2021

Extensions

a(26) and beyond from Michael S. Branicky, Mar 03 2021

A351329 A fractal-like sequence: erase all triples of adjacent terms that have an even sum; the remaining terms rebuild the starting sequence.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 1, 2, 10, 5, 7, 3, 9, 11, 12, 4, 13, 14, 15, 6, 8, 1, 2, 10, 5, 16, 18, 20, 7, 22, 24, 26, 3, 28, 30, 32, 9, 34, 36, 38, 11, 12, 4, 13, 14, 40, 17, 19, 15, 21, 23, 42, 6, 25, 44, 27, 8, 46, 29, 31, 1, 33, 35, 48, 2, 37, 50, 39, 10, 52, 41, 43, 5, 45, 47, 54, 16, 49, 56, 51, 18, 20, 7, 22
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 07 2022

Keywords

Comments

This is the lexicographically earliest such sequence starting with a(1) = 1 and showing no duplicate term in any triple to be erased.
The sequence is fractal-like as it embeds an infinite number of copies of itself.
The sequence was built according to these rules (see, in the Example section, the parenthesization technique):
1) no overlapping triple of parentheses; a triple is made of integers X, Y and Z;
2) always start the content inside a pair of parentheses with the smallest integer X > 1 not yet present inside another pair of parentheses and not leading to a contradiction;
3) always follow X with the smallest integer Y > 1 not yet present inside another pair of parentheses and not leading to a contradiction;
4) always end the content inside a pair of parentheses with the smallest integer Z > 1 not yet present inside another pair of parentheses and not leading to a contradiction such that X + Y + Z is even;
5) after a(1) = 1, a(2) = 2 and a(3) = 3, always try to extend the sequence with a duplicate > 2 of the oldest term of the sequence not yet duplicated; if this leads to a contradiction, open a new pair of parentheses.

Crossrefs

For other erasing criteria, cf. A303845 (prime by concatenation), A303948 (pair sharing a digit), A274329 (pair summing up to a prime), A351330 (triples having an odd sum).

Formula

Parentheses are added around each triple of terms that have an even sum:
(1, 2, 3), (4, 6, 8), 1, 2, (10, 5, 7), 3, (9, 11, 12), 4, (13, 14, 15), 6, 8, 1, 2, 10, 5, (16, 18, 20), 7, (22, 24, 26), 3, (28, 30, 32), 9, (34, 36, 38), 11, 12, 4, 13, 14, (40, 17, 19), 15, (21, 23, 42), 6, (25, 44, 27), 8, (46, 29, 31), 1, ...
Erasing all the parenthesized contents yields
(...), (...), 1, 2, (...), 3, (...), 4, (...), 6, 8, 1, 2, 10, 5, (...), 7, (...), 3, (...), 9, (...), 11, 12, 4, 13, 14, (...), 15, (...), 6, (...), 8, (...), 1, ...
We see that the remaining terms slowly rebuild the starting sequence.
Previous Showing 11-14 of 14 results.