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-10 of 13 results. Next

A341492 Inverse permutation to A088178.

Original entry on oeis.org

1, 2, 5, 3, 6, 4, 17, 8, 10, 7, 18, 9, 45, 20, 11, 13, 46, 15, 83, 12, 16, 19, 84, 14, 24, 48, 30, 21, 169, 25, 170, 22, 31, 47, 28, 26, 181, 86, 49, 23, 182, 27, 193, 32, 29, 85, 194, 33, 37, 35, 50, 52, 205, 41, 43, 38, 87, 172, 206, 34, 533, 171, 56, 39, 44
Offset: 1

Views

Author

Rémy Sigrist, Feb 13 2021

Keywords

Examples

			A088178(5) = 3, so a(3) = 5.
		

Crossrefs

Cf. A088178.

A348439 Where prime(n) appears for the first time in A088178.

Original entry on oeis.org

2, 5, 6, 17, 18, 45, 46, 83, 84, 169, 170, 181, 182, 193, 194, 205, 206, 533, 534, 561, 562, 585, 586, 784, 785, 1040, 1041, 1068, 1069, 1096, 1097, 1126, 1127, 1150, 1151, 1932, 1933, 1986, 1987, 2022, 2023, 2062, 2063, 2090, 2091, 2118, 2119, 2146, 2147, 2178, 2179, 2206, 2207, 3929, 3930, 3965, 3966
Offset: 1

Views

Author

N. J. A. Sloane, Oct 19 2021

Keywords

Comments

If n is odd, a(n) = A348438(n)-1; if n is even, a(n) = A348438(n).

Crossrefs

A348442 Records in A088178.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 15, 20, 24, 28, 32, 40, 42, 45, 48, 60, 70, 72, 78, 84, 98, 104, 108, 110, 120, 132, 143, 144, 147, 152, 160, 168, 189, 190, 198, 204, 209, 228, 234, 240, 256, 272, 280, 300, 304, 306, 323, 342, 360, 364, 378, 392, 420, 425, 450, 456, 460, 475, 500, 504, 506, 525, 550, 552, 575
Offset: 1

Views

Author

N. J. A. Sloane, Oct 21 2021

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    def A348442(): # generator of terms
        yield 1
        c, p, a = 1, {1}, 1
        while True:
            n, na = 1, a
            while na in p:
                n += 1
                na += a
            p.add(na)
            a = n
            if c < na:
                c = na
                yield c
    A348442_list = list(islice(A348442(),100)) # Chai Wah Wu, Oct 21 2021

A348443 Indices of records in A088178.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 11, 12, 14, 21, 22, 23, 27, 29, 33, 34, 36, 40, 53, 54, 55, 63, 65, 67, 69, 70, 72, 77, 93, 96, 99, 100, 101, 108, 111, 119, 121, 122, 124, 130, 131, 132, 140, 147, 149, 151, 153, 154, 156, 217, 237, 238, 239, 257, 258, 260, 263, 265, 266, 268, 272, 274, 275, 277, 279, 280
Offset: 1

Views

Author

N. J. A. Sloane, Oct 21 2021

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    def A348443(): # generator of terms
        yield 1
        c, p, a, i = 1, {1}, 1, 1
        while True:
            n, na = 1, a
            while na in p:
                n += 1
                na += a
            p.add(na)
            a = n
            i += 1
            if c < na:
                c = na
                yield i
    A348443_list = list(islice(A348443(),100)) # Chai Wah Wu, Oct 21 2021

A307730 a(n) = A307720(n) * A307720(n+1).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 6, 4, 4, 4, 4, 6, 6, 6, 6, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 15, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 14, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 14, 14, 14
Offset: 1

Views

Author

Rémy Sigrist, Apr 25 2019

Keywords

Comments

For all positive integers n, n appears n times.

Examples

			The first terms in this sequence and in A307720 are:
  n   a(n)  A307720(n)
  --  ----  ----------
   1     1           1
   2     2           1
   3     2           2
   4     3           1
   5     3           3
   6     3           1
   7     6           3
   8     4           2
   9     4           2
  10     4           2
		

Crossrefs

Cf. A348579 (indices of occurrence of each number), A348246 (first occurrence of each number), A348409 (last occurrence).

Programs

  • PARI
    \\ See Links section.
    
  • Python
    from itertools import islice
    from collections import Counter
    def A307730(): # generator of terms. Greedy algorithm
        c, b = Counter(), 1
        while True:
            k, kb = 1, b
            while c[kb] >= kb:
                k += 1
                kb += b
            c[kb] += 1
            b = k
            yield kb
    A307730_list = list(islice(A307730(),100)) # Chai Wah Wu, Oct 21 2021

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

A348440 Records in A088177.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 11, 12, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

N. J. A. Sloane, Oct 21 2021

Keywords

Comments

Apparently the terms agree with the prime numbers A000040, beginning at 29. - Hugo Pfoertner, Oct 21 2021

Crossrefs

Programs

  • Mathematica
    Block[{c, m = 1, n}, Union@ FoldList[Max, {1}~Join~Reap[Do[n = 1; While[IntegerQ[c[m n]], n++]; Sow[n]; Set[c[m n], 1]; m = n, 2^12]][[-1, -1]]]] (* Michael De Vlieger, Oct 21 2021 *)
  • Python
    from itertools import islice
    def A348440(): # generator of terms
        yield 1
        c, p, a = 1, {1}, 1
        while True:
            n, na = 1, a
            while na in p:
                n += 1
                na += a
            p.add(na)
            a = n
            if c < n:
                c = n
                yield c
    A348440_list = list(islice(A348440(),100)) # Chai Wah Wu, Oct 21 2021

A348438 Where prime(n) appears for the first time in A088177.

Original entry on oeis.org

3, 5, 7, 17, 19, 45, 47, 83, 85, 169, 171, 181, 183, 193, 195, 205, 207, 533, 535, 561, 563, 585, 587, 784, 786, 1040, 1042, 1068, 1070, 1096, 1098, 1126, 1128, 1150, 1152, 1932, 1934, 1986, 1988, 2022, 2024, 2062, 2064, 2090, 2092, 2118, 2120, 2146, 2148, 2178, 2180, 2206, 2208, 3929, 3931, 3965, 3967
Offset: 1

Views

Author

N. J. A. Sloane, Oct 19 2021

Keywords

Crossrefs

A308058 Lexicographically earliest sequence of positive terms such that for any distinct m and n, a(m) * a(m+1)^2 <> a(n) * a(n+1)^2.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 3, 2, 2, 3, 3, 4, 4, 5, 1, 5, 2, 4, 6, 1, 7, 1, 9, 5, 3, 5, 4, 7, 2, 5, 5, 6, 2, 6, 3, 6, 4, 8, 4, 9, 7, 3, 7, 4, 10, 1, 11, 1, 13, 1, 17, 1, 19, 1, 22, 1, 23, 1, 24, 3, 8, 5, 7, 5, 8, 6, 5, 9, 9, 10, 2, 7, 6, 7, 7, 8, 7, 9, 11, 2, 9, 12
Offset: 1

Views

Author

Rémy Sigrist, May 10 2019

Keywords

Comments

This sequence has similarities with A088178; here we consider a(n)*a(n+1)^2, there we consider a(n)*a(n+1).

Examples

			The first terms, alongside a(n)*a(n+1)^2, are:
  n   a(n)  a(n)*a(n+1)^2
  --  ----  -------------
   1     1              1
   2     1              4
   3     2              2
   4     1              9
   5     3              3
   6     1             16
   7     4             36
   8     3             12
   9     2              8
  10     2             18
		

Crossrefs

See A308057 for an additive variant.
Cf. A088178.

Programs

  • PARI
    s=0; v=1; for(n=1, 83, print1(v", "); for (w=1, oo, if (!bittest(s,x=v*w^2), s+=2^x; v=w; break)))

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-10 of 13 results. Next