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

A376201 Fixed points in A376198.

Original entry on oeis.org

1, 2, 3, 4, 11, 12, 27, 28, 59, 60, 123, 124, 125, 126, 255, 256, 515, 516, 517, 518, 519, 520, 1043, 1044, 1045, 1046, 1047, 1048, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 4223, 4224, 4225, 4226, 4227, 4228, 8459, 8460, 16923, 16924, 16925, 16926, 33855, 33856, 67715, 67716, 67717, 67718, 67719
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Comments

Conjectures: the terms consist of runs of an even number (>1) of successive numbers that increase by 1 at each step; A376758(n) is one-half of the length of the n-th such run; and the run ends at A376751(n) - 1. - N. J. A. Sloane, Oct 07 2024

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        an, smc, smp = 2, 4, 3
        yield from [1, 2]
        for n in count(3):
            if not isprime(an):
                an = smp if an == 2*smp else smc
            else:
                an = smp if smp < smc else smc
            if an == smp: smp = nextprime(smp)
            else:
                smc += 1
                while isprime(smc): smc += 1
            if n == an: yield an
    print(list(islice(agen(), 59))) # Michael S. Branicky, Oct 03 2024

A376750 Indices n where a run of primes begins in A376198.

Original entry on oeis.org

2, 9, 23, 52, 110, 231, 472, 965, 1958, 3962, 7980, 16029, 32181, 64597, 129574, 259798, 520835, 1043833, 2091473, 4190135, 8392863, 16809322, 33661860, 67402676, 134952624, 270177158, 540861852, 1082667610, 2167106199, 4337519113, 8681255531, 17374202846, 34770433922, 69582458821, 139243546013, 278635987083
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def A376750_4gen(): # generator of terms for A376750..4
        an, smc, smp = 2, 4, 3,
        wasprime = startp = startn = endp = endn = rl = 0
        for n in count(2):
            if not isprime(an):
                if wasprime: # a run has ended
                    endn, endp = n-1, wasprime
                    yield startn, startp, endn, endp, rl
                an = smp if an == 2*smp else smc
                wasprime = 0 # False
            else:
                if not wasprime: # a run has started
                    startn, startp, rl = n, an, 1
                else: rl += 1
                wasprime = an
                an = smp if smp < smc else smc
            if an == smp: smp = nextprime(smp)
            else:
                smc += 1
                while isprime(smc): smc += 1
    print([out[0] for out in list(islice(A376750_4gen(), 15))]) # Michael S. Branicky, Oct 03 2024

Extensions

a(14)-a(33) from Michael S. Branicky, Oct 04 2024
a(34)-a(36) from Michael S. Branicky, Oct 07 2024

A376754 Length of n-th run of primes in A376198.

Original entry on oeis.org

2, 3, 4, 8, 13, 24, 43, 78, 142, 261, 479, 894, 1674, 3118, 5873, 11102, 20992, 39830, 75906, 144652, 276720, 529865, 1016535, 1954167, 3761091, 7250277, 13993031, 27042169, 52313384, 101320082, 196422988, 381154209, 740280217, 1438969498, 2799310690, 5449726356
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Comments

Theorem: a(n) is the number of steps needed for the prime A376751(n) to "double" in the normal sequence of primes. More precisely, if A376751(n) = prime(j), then a(n) = A063124(j). For example, A376751(8) = 521 = prime(98), and A063124(98) = 78 = a(8). (The result seems to be off by 1 at n = 4, for reasons I don't understand yet.) - N. J. A. Sloane, Oct 04 2024

Crossrefs

Programs

Extensions

a(14)-a(33) from Michael S. Branicky, Oct 04 2024
a(34)-a(36) from Michael S. Branicky, Oct 07 2024

A376751 Primes that begin a run of primes in A376198.

Original entry on oeis.org

2, 5, 13, 29, 61, 127, 257, 521, 1049, 2111, 4229, 8461, 16927, 33857, 67723, 135449, 270913, 541831, 1083689, 2167393, 4334791, 8669593, 17339197, 34678421, 69356857, 138713717, 277427441, 554854889, 1109709791, 2219419597, 4438839259, 8877678527, 17755357069, 35510714159, 71021428351, 142042856719
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Crossrefs

Programs

Extensions

a(14)-a(33) from Michael S. Branicky, Oct 04 2024
a(34)-a(36) from Michael S. Branicky, Oct 07 2024

A376752 Indices n where a run of primes ends in A376198.

Original entry on oeis.org

3, 11, 26, 59, 122, 254, 514, 1042, 2099, 4222, 8458, 16922, 33854, 67714, 135446, 270899, 541826, 1083662, 2167378, 4334786, 8669582, 17339186, 34678394, 69356842, 138713714, 277427434, 554854882, 1109709778, 2219419582, 4438839194, 8877678518, 17755357054, 35510714138, 71021428318, 142042856702, 284085713438
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Crossrefs

Programs

Extensions

a(14)-a(33) from Michael S. Branicky, Oct 04 2024
a(34)-a(36) from Michael S. Branicky, Oct 07 2024

A376199 Index where n appears in A376198.

Original entry on oeis.org

1, 2, 3, 4, 9, 5, 10, 6, 7, 8, 11, 12, 23, 13, 14, 15, 24, 16, 25, 17, 18, 19, 26, 20, 21, 22, 27, 28, 52, 29, 53, 30, 31, 32, 33, 34, 54, 35, 36, 37, 55, 38, 56, 39, 40, 41, 57, 42, 43, 44, 45, 46, 58, 47, 48, 49, 50, 51, 59, 60, 110, 61, 62, 63, 64, 65, 111, 66, 67, 68, 112, 69, 113, 70, 71, 72, 73, 74, 114, 75, 76, 77, 115, 78, 79
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        an, smc, smp, adict, n = 2, 4, 3, {1: 1, 2: 2}, 1
        for k in count(3):
            if not isprime(an):
                an = smp if an == 2*smp else smc
            else:
                an = smp if smp < smc else smc
            if an == smp: smp = nextprime(smp)
            else:
                smc += 1
                while isprime(smc): smc += 1
            if an not in adict: adict[an] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 85))) # Michael S. Branicky, Oct 03 2024

A376200 Indices where primes appear in A376198.

Original entry on oeis.org

2, 3, 9, 10, 11, 23, 24, 25, 26, 52, 53, 54, 55, 56, 57, 58, 59, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Comments

The primes appear in order, so a(n) is also the index of prime(n) in A376198.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        an, smc, smp = 2, 4, 3
        for n in count(2):
            if not isprime(an):
                an = smp if an == 2*smp else smc
            else:
                yield n
                an = smp if smp < smc else smc
            if an == smp: smp = nextprime(smp)
            else:
                smc += 1
                while isprime(smc): smc += 1
    print(list(islice(agen(), 71))) # Michael S. Branicky, Oct 03 2024

A376753 Primes that end a run of primes in A376198.

Original entry on oeis.org

3, 11, 23, 59, 113, 251, 509, 1039, 2099, 4219, 8447, 16921, 33851, 67709, 135433, 270899, 541817, 1083659, 2167369, 4334777, 8669543, 17339177, 34678381, 69356839, 138713711, 277427431, 554854873, 1109709709, 2219419577, 4438839173, 8877678499, 17755357051, 35510714137, 71021428277, 142042856611, 284085713419
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Crossrefs

Programs

Extensions

a(14)-a(33) from Michael S. Branicky, Oct 04 2024
a(34)-a(36) from Michael S. Branicky, Oct 07 2024

A376763 Length of n-th run of composite numbers in A376198.

Original entry on oeis.org

5, 11, 25, 50, 108, 217, 450, 915, 1862, 3757, 7570, 15258, 30742, 61859, 124351, 249935, 502006, 1007810, 2022756, 4058076, 8139739, 16322673, 32724281, 65595781, 131463443, 263434417, 527812727, 1057396420, 2118099530, 4242416336, 8496524327, 17015076867, 34071744682, 68222117694, 136593130380
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2024

Keywords

Crossrefs

Formula

a(n) = A376750(n+1) - A376752(n) (a simple consequence of the definition).

A376764 Length of n-th region in A376198.

Original entry on oeis.org

3, 8, 15, 33, 63, 132, 260, 528, 1057, 2123, 4236, 8464, 16932, 33860, 67732, 135453, 270927, 541836, 1083716, 2167408, 4334796, 8669604, 17339208, 34678448, 69356872, 138713720, 277427448, 554854896, 1109709804, 2219419612, 4438839324, 8877678536, 17755357084, 35510714180, 71021428384, 142042856736
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2024

Keywords

Comments

We define a region in A376198 to consist of a maximal string of non-prime terms followed by a string of prime terms.

Examples

			The first two regions in A376198 consist of terms 1 to 3 (of length a(1) = 3) and terms 4 to 11 (of length a(2) = 8).
		

Crossrefs

Formula

Apart from the initial 3, this is the first differences of A376752.
This is also, very approximately, the sum of A376763 and a subsequence of A063124.
Showing 1-10 of 11 results. Next