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.

Showing 1-3 of 3 results.

A088177 a(1)=1, a(2)=1; for n>2, a(n) is the smallest positive integer such that the products a(i)*a(i+1), i=1..n-1, are all distinct.

Original entry on oeis.org

1, 1, 2, 2, 3, 1, 5, 2, 4, 3, 3, 5, 4, 4, 6, 3, 7, 1, 11, 2, 7, 4, 8, 5, 5, 6, 6, 7, 5, 9, 3, 11, 4, 12, 5, 10, 7, 7, 8, 8, 9, 6, 11, 5, 13, 1, 17, 2, 13, 3, 17, 4, 13, 6, 14, 7, 9, 9, 10, 8, 11, 7, 13, 8, 12, 9, 11, 10, 10, 12, 11, 11, 13, 9, 14, 8, 16, 9
Offset: 1

Views

Author

John W. Layman, Sep 22 2003

Keywords

Comments

A088178 is the sequence of distinct products a(i)a(i+1), i=1,2,3,... and appears to be a permutation of the natural numbers.
It appears that for k>2 the k-th occurrence of 1 lies between the first occurrences of primes p(2*k-4) and p(2*k-3). For instance, the 5th occurrence of 1 lies between the first occurrences of 13 and 17, the 6th and 7th primes, respectively. - John W. Layman, Nov 16 2011
Note that a(n) = 1 for infinitely many n, because the sequence a(n) is not bounded and beside every new prime number must be the number 1. - Thomas Ordowski, Sep 04 2014. [This seems a rather sketchy argument, but I have a more complete proof using arguments similar to those we used in A098550. - N. J. A. Sloane, Oct 18 2021]
Example: ..., 5, 13, 1, 17, 2, 13, 3, 17, 4; ...
General: ..., k, p, 1, q, 2, p, 3, q, ..., k-1; ...
- Thomas Ordowski, Sep 08 2014

Examples

			Given that the sequence begins 1,1,2,2,... then a(5)=3, since either of the choices a(5)=1 or a(5)=2 would lead to a repetition of one of the previous products 1,2,4 of adjacent pairs of terms.
		

Crossrefs

Programs

  • Maple
    A[1]:= 1: A[2]:= 1: S:= {1}:
    for n from 3 to 100 do
      Sp:= select(type,map(s -> s/A[n-1],S),integer);
      if nops(Sp) = Sp[-1] then A[n]:= Sp[-1]+1
      else A[n]:= min({$1..Sp[-1]} minus Sp)
      fi;
      S:= S union {A[n-1]*A[n]};
    od:
    seq(A[n],n=1..100); # Robert Israel, Aug 28 2014
  • Mathematica
    t = {1, 1}; Do[AppendTo[t, 1]; While[Length[Union[Most[t]*Rest[t]]] < n - 1, t[[-1]]++], {n, 3, 100}]; t (* T. D. Noe, Nov 16 2011 *)
  • Python
    from itertools import islice
    def A088177(): # generator of terms
        yield 1
        yield 1
        p, a = {1}, 1
        while True:
            n = 1
            while n*a in p:
                n += 1
            p.add(n*a)
            a = n
            yield n
    A088177_list = list(islice(A088177(),20)) # Chai Wah Wu, Oct 21 2021

Formula

a(n)*gcd(a(n-1),a(n+1)) = gcd(A088178(n-1),A088178(n)). - Thomas Ordowski, Jun 29 2015

A088178 Sequence of distinct products b(n)*b(n+1), n=1,2,3,..., of the terms b(n) of A088177.

Original entry on oeis.org

1, 2, 4, 6, 3, 5, 10, 8, 12, 9, 15, 20, 16, 24, 18, 21, 7, 11, 22, 14, 28, 32, 40, 25, 30, 36, 42, 35, 45, 27, 33, 44, 48, 60, 50, 70, 49, 56, 64, 72, 54, 66, 55, 65, 13, 17, 34, 26, 39, 51, 68, 52, 78, 84, 98, 63, 81, 90, 80, 88, 77, 91, 104, 96, 108, 99, 110, 100, 120, 132
Offset: 1

Views

Author

John W. Layman, Sep 22 2003

Keywords

Comments

This is a permutation of the natural numbers (see the following comments).
Comments from Thomas Ordowski, Aug 24 2014 to Sep 07 2014: (Start)
If a(n) is a prime then a(m) > a(n) for m > n.
Conjecture: the term a(n) is a prime if and only if every number < a(n) belongs to the set {a(1), a(2), ..., a(n-1)}.
The numbers in A033476 appear in increasing order.
It seems that the squarethe terms in s of the natural numbers also appear in increasing order, but A087811 are not strictly increasing.
Lemma: the sequence a(n) is a permutation of all natural numbers iff b(n) = 1 for infinitely many n, where b(n) = A088177(n), because after every b(n) = 1 is the smallest missing number in the sequence a(n).
Theorem: the sequence a(n) is a permutation of the natural numbers. Proof: see my note to A088177.
At most two consecutive terms can form a decreasing subsequence.
(End)
An equivalent definition. At step n, choose a(n) to be the smallest unused multiple of the auxiliary number r, which is initially 1 and is changed to a(n)/r after each step. - Ivan Neretin, May 04 2015
Considered as a permutation of the positive integers, there are finite cycles (1), (2), (3, 4, 6, 5), (8), (11, 18, 15), (52), and probably others. The cycle containing 7, on the other hand, is ( ..., 85, 46, 17, 7, 10, 9, 12, 20, 14, 24, 25, 30, 27, 42, 66, 99, 160, 308, 343, 430, 517, 902, ... ), and may be infinite. The inverse permutation is A341492. - N. J. A. Sloane, Oct 19 2021

Crossrefs

Programs

  • Mathematica
    a088177[n_Integer] := Module[{t = {1, 1}}, Do[AppendTo[t, 1]; While[Length[Union[Most[t]*Rest[t]]] < i - 1, t[[-1]]++], {i, 3, n}]; t]; a088178[n_Integer] := Last[a088177[n]]*Last[a088177[n + 1]]; a088178 /@ Range[120] (* Michael De Vlieger, Aug 30 2014, based on T. D. Noe's script at A088177 *)
  • Python
    from itertools import islice
    def A088178(): # generator of terms
        yield 1
        p, a = {1}, 1
        while True:
            n, na = 1, a
            while na in p:
                n += 1
                na += a
            p.add(na)
            a = n
            yield na
    A088178_list = list(islice(A088178(),20)) # Chai Wah Wu, Oct 21 2021

Formula

a(n) = A088177(n)* A088177(n+1).
a(m) < a(n)^2 for m < n. - Thomas Ordowski, Sep 02 2014

Extensions

Edited by N. J. A. Sloane, Oct 18 2021

A348437 Where n appears for the first time in A088177.

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 17, 23, 30, 36, 19, 34, 45, 55, 79, 77, 47, 111, 83, 99, 93, 143, 85, 247, 165, 231, 229, 239, 169, 329, 171, 353, 333, 417, 227, 503, 181, 465, 349, 457, 183, 463, 193, 686, 515, 203, 195, 856, 309, 848, 623, 217, 205, 988, 553, 920, 449, 213, 207, 1012, 533, 840, 842, 896
Offset: 1

Views

Author

N. J. A. Sloane, Oct 18 2021

Keywords

Crossrefs

Showing 1-3 of 3 results.