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 42 results. Next

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

A307632 Index of first occurrence of n-th prime in A307720.

Original entry on oeis.org

3, 5, 47, 53, 1374, 1386, 3738, 3756, 6680, 6704, 84626, 84658, 89480, 89522, 91832, 91880, 173092, 173152, 192882, 192950, 524587, 524661, 865301, 865385, 876543, 876641, 890479, 890583, 904273, 904383, 918859, 918987, 1628979, 1629117, 1647107, 1647257, 1666775
Offset: 1

Views

Author

N. J. A. Sloane, Apr 26 2019

Keywords

Comments

It follows from the definition of A307720 that if p = k-th prime, k>1 and k odd, and q = (k+1)st prime, then the first time p appears in the sequence is at the start of a subsequence (p,1) [(p-1)/2 times], p, (1,q) [(q+1)/2 times].
For example, the fifth prime (11) first appears in A307720 at step 1374 at the start of the subsequence 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13.
So q appears p+1 steps after p, which explains why the terms of the present sequence appear in pairs.
In fact, it appears that one can make a much stronger statement about what happens immediately after the first occurrence of p. Look at the terms in A307720 following the first 11 at step 1374. It may be that the next O(p^2) terms are forced.

Crossrefs

First differences = A348773.

Extensions

More terms from Hans Havermann, Apr 26 2019

A348248 Let d = A307720(n) - A307720(n-1); a(n) = 0 if d = 0; a(n) = 1 if d > 0; a(n) = 2 if d < 0.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 0, 0, 0, 0, 1, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 2

Views

Author

N. J. A. Sloane, Oct 20 2021

Keywords

Comments

If one looks at the graph of A307720 (that entry has a number of versions of this graph besides the one that appears when the "graph" button is clicked), one sees that initially A307720(n) is usually greater than A307720(n-1) if n is odd.
Think of A307720 as a piano score in which normally the right hand (n = 2*i+1) is to the right of the left hand (n = 2*i).
However, as can be seen in William Cheswick's colored plots, sometimes the right and left hands swap. In these plots, the right-hand points (n odd) are blue and the left-points (n even) are red.
A run of terms 121212... in the present sequence is a normal sequence of notes left, right, left, right, ..., where blue is on top.
A run 212121... indicates that the hands have been swapped (red is on top).
A run 000000... indicates that both hands are playing the same note (red and blue are at the same level).
The purpose of the present sequence and related sequences is to study when the hands swap. At present there is no explanation for when this happens.
The sequence of pictures suggests that there will be infinitely many occasions when the hands swap. The upper color in the picture will alternate infinitely often between red and blue, with longer and longer runs before the upper color changes.

Crossrefs

A307630 Index at which n first appears in A307720.

Original entry on oeis.org

1, 3, 5, 27, 47, 99, 53, 137, 177, 1024, 1374, 2474, 1386, 3326, 3662, 5274, 3738, 6290, 3756, 8954, 9374, 12878, 6680, 9682, 9850, 10324, 11010, 14578, 6704, 78506, 84626, 106968, 88474, 127682, 86802, 143544, 84658, 160664, 97850, 274079, 89480, 326195
Offset: 1

Views

Author

N. J. A. Sloane, Apr 25 2019

Keywords

Crossrefs

Extensions

More terms from Hans Havermann, Apr 25 2019

A307631 Indices of record high-points in A307720.

Original entry on oeis.org

1, 3, 5, 27, 47, 53, 137, 177, 1024, 1374, 1386, 3326, 3662, 3738, 3756, 6680, 6704, 78506, 84626, 84658, 89480, 89522, 91832, 91880, 173092, 173152, 192882, 192950, 524587, 524661, 865301, 865385, 876543, 876641, 890479, 890583, 904273, 904383, 918859, 918987
Offset: 1

Views

Author

N. J. A. Sloane, Apr 25 2019

Keywords

Crossrefs

Programs

  • PARI
    See Links section.
    (C++) See Links section.

Extensions

More terms from Rémy Sigrist, Apr 25 2019

A348241 A307720(2*n+1).

Original entry on oeis.org

1, 2, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

N. J. A. Sloane, Oct 15 2021

Keywords

Crossrefs

A348242 A307720(2*n).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
Offset: 1

Views

Author

N. J. A. Sloane, Oct 15 2021

Keywords

Crossrefs

A307633 RUNS transform of bisection {A307720(2k+1): k>=0}.

Original entry on oeis.org

1, 1, 2, 2, 7, 10, 3, 4, 5, 7, 7, 9, 10, 20, 14, 10, 14, 16, 18, 45, 21, 25, 20, 24, 28, 22, 27, 31, 68, 41, 25, 30, 35, 40, 45, 12, 24, 17, 22, 28, 19, 26, 32, 72, 39, 44, 49, 105, 61, 42, 48, 54, 60, 66, 45, 52, 59, 49, 56, 63, 38, 18, 36, 26, 34, 42, 51, 53, 67, 210, 231, 64, 72, 80, 88
Offset: 1

Views

Author

N. J. A. Sloane, Apr 27 2019

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A307634 RUNS transform of bisection {A307720(2k): k>=1}.

Original entry on oeis.org

3, 5, 5, 4, 6, 6, 12, 27, 8, 25, 58, 13, 15, 63, 72, 81, 32, 76, 175, 6, 7, 11, 13, 66, 78, 33, 39, 132, 50, 115, 270, 156, 168, 38, 9, 10, 17, 19, 153, 120, 65, 70, 75, 71, 77, 82, 304, 204, 81, 114, 12, 15, 23, 29, 138, 57, 69, 228, 85, 90, 95, 93, 99, 104, 210, 74, 80, 84, 63, 174, 78, 87
Offset: 1

Views

Author

N. J. A. Sloane, Apr 27 2019

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A348446 a(n) = A307720(2*n-1) - A307220(2*n).

Original entry on oeis.org

0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 6, 6, 6, 5, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 4, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2021

Keywords

Comments

My guess is that this changes signs infinitely often, but is more likely to be positive than negative. Perhaps the behavior is akin to that of A066520, which shows the "great prime race" between primes congruent to 3 mod 4 and primes congruent to 1 mod 4.
See also the graphs in A307720 and A348248.

Crossrefs

Programs

  • Python
    from itertools import islice
    from collections import Counter
    def A348446(): # generator of terms. Greedy algorithm
        a = 1
        c, b = Counter(), 1
        while True:
            k, kb = 1, b
            while c[kb] >= kb:
                k += 1
                kb += b
            c[kb] += 1
            b = k
            a2 = k
            yield a-a2
            k, kb = 1, b
            while c[kb] >= kb:
                k += 1
                kb += b
            c[kb] += 1
            b = k
            a = k
    A348446_list = list(islice(A348446(),100)) # Chai Wah Wu, Oct 23 2021
Showing 1-10 of 42 results. Next