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

A352188 When n appears in A352187, or -1 if n never appears.

Original entry on oeis.org

1, 2, 5, 3, 10, 4, 14, 8, 6, 9, 22, 7, 27, 13, 11, 17, 33, 12, 40, 18, 15, 21, 52, 16, 19, 26, 24, 30, 61, 20, 67, 31, 23, 32, 36, 25, 76, 39, 28, 43, 88, 29, 93, 48, 35, 51, 101, 42, 37, 55, 34, 56, 111, 47, 44, 38, 41, 60, 127, 54, 131, 66, 46, 70, 64, 50, 136, 71, 53, 80, 144, 59, 149, 75, 63, 74, 45, 69, 162, 84, 78, 87
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2022

Keywords

Crossrefs

A352189 Index of n-th prime in A352187.

Original entry on oeis.org

2, 5, 10, 14, 22, 27, 33, 40, 52, 61, 67, 76, 88, 93, 101, 111, 127, 131, 136, 144, 149, 162, 170, 182, 194, 207, 211, 223, 227, 235, 255, 269, 283, 287, 308, 312, 320, 332, 345, 360, 372, 376, 395, 399, 408, 416, 440, 456, 472, 476, 490, 502, 510, 522, 535, 547, 556, 560, 572, 580, 588, 605, 634, 642, 646, 658
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2022

Keywords

Comments

Conjecture: This sequence, prefixed by 1, lists the numbers that take a record length of time to appear in A352188. That is, it appears that this sequence (prefixed by 1) and A352190 together give the RECORDS transform of A352188.

Crossrefs

A352192 Indices of records in A352187.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 11, 12, 15, 16, 19, 20, 23, 25, 28, 29, 34, 38, 41, 45, 49, 82, 141, 216, 219, 239, 266, 273, 420, 610, 666, 756, 841, 928, 1199, 1216, 1271, 2023, 2050, 2584, 3090, 3818, 4934, 5744, 5752, 5780, 6040, 6052, 6155, 7559, 9006, 9419, 9611, 10114, 10205, 10605, 10818, 13539, 17136, 17992, 18172
Offset: 1

Views

Author

N. J. A. Sloane, Mar 13 2022

Keywords

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import count, islice
    from sympy import primefactors
    def A352192_gen(): # generator of terms
        bset, blist, mmax, c = {1,2}, [1,2], 3, 2
        yield from blist
        for n in count(3):
            for m in count(mmax):
                if gcd(m,blist[-1]) > 1 and m not in bset:
                    if all(blist[-2] % p == 0 for p in primefactors(blist[-1])) or gcd(m,blist[-2]) == 1:
                        if m > c:
                            yield n
                            c = m
                        blist = [blist[-1],m]
                        bset.add(m)
                        while mmax in bset:
                            mmax += 1
                        break
    A352192_list = list(islice(A352192_gen(),30)) # Chai Wah Wu, Mar 14 2022

A352191 Records in A352187.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 15, 18, 21, 24, 25, 30, 33, 36, 39, 42, 51, 56, 57, 77, 121, 207, 333, 345, 371, 391, 469, 871, 1111, 1121, 1341, 1557, 1719, 2043, 2051, 2367, 3421, 3951, 4527, 6127, 6849, 10307, 11007, 11061, 11079, 11133, 11511, 14113, 16753, 16839, 16911, 17973, 18153, 19161, 27731, 28831, 29447, 36949, 46783, 49093, 49577
Offset: 1

Views

Author

N. J. A. Sloane, Mar 13 2022

Keywords

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import count, islice
    from sympy import primefactors
    def A352191_gen(): # generator of terms
        bset, blist, mmax, c = {1,2}, [1,2], 3, 2
        yield from blist
        while True:
            for m in count(mmax):
                if gcd(m,blist[-1]) > 1 and m not in bset:
                    if all(blist[-2] % p == 0 for p in primefactors(blist[-1])) or gcd(m,blist[-2]) == 1:
                        if m > c:
                            yield m
                            c = m
                        blist = [blist[-1],m]
                        bset.add(m)
                        while mmax in bset:
                            mmax += 1
                        break
    A352191_list = list(islice(A352191_gen(),30)) # Chai Wah Wu, Mar 14 2022

A352193 It seems that the n-th prime p will appear in A352187 at around position 2*p; if in fact A352187(w) = p then set a(n) = w-2*p, or set a(n) = -1 if p never appears in A352187.

Original entry on oeis.org

-2, -1, 0, 0, 0, 1, -1, 2, 6, 3, 5, 2, 6, 7, 7, 5, 9, 9, 2, 2, 3, 4, 4, 4, 0, 5, 5, 9, 9, 9, 1, 7, 9, 9, 10, 10, 6, 6, 11, 14, 14, 14, 13, 13, 14, 18, 18, 10, 18, 18, 24, 24, 28, 20, 21, 21, 18, 18, 18, 18, 22, 19, 20, 20, 20, 24, 23, 19, 15, 15, 19, 23, 25, 29, 25, 25, 30, 30, 34, 30, 26, 30, 22, 22, 22, 22, 18, 18, 18, 18, 22, 22, 18, 22, 22, 27, 27, 28, 28, 24
Offset: 1

Views

Author

N. J. A. Sloane, Mar 13 2022

Keywords

Comments

This is the amount by which p lags behind its expected position.

Crossrefs

A357963 a(1)=1, a(2)=2. Thereafter, if there are prime divisors p of a(n-1) which do not divide a(n-2), a(n) is the least novel multiple of any such p. Otherwise a(n) is the least novel multiple of the squarefree kernel of a(n-1). See comments.

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 18, 14, 7, 21, 24, 16, 20, 25, 30, 22, 11, 33, 27, 36, 26, 13, 39, 42, 28, 56, 70, 35, 105, 45, 60, 32, 34, 17, 51, 48, 38, 19, 57, 54, 40, 50, 80, 90, 63, 49, 77, 44, 46, 23, 69, 66, 52, 65, 55, 88, 58, 29, 87, 72, 62, 31, 93
Offset: 1

Views

Author

David James Sycamore, Oct 22 2022

Keywords

Comments

In other words, if a(n-1) has k prime divisors p_j, 1 <= j <= k which do not divide a(n-2), where 1 <= k <= omega(a(n-1)), and if m_j*p_j is the least multiple of p_j which is not already a term, then a(n) = Min{m_j*p_j; 1<=j<=k}. Otherwise every prime divisor of a(n-1) also divides a(n-2), in which case a(n) is the least multiple of the squarefree kernel of a(n-1) which is not already a term. If a(n-1) and a(n-2) are coprime the computation of a(n) ranges over all prime divisors of a(n-1). This happens only once (n=3), after which all adjacent terms share a common divisor (as in the EKG sequence, A064413).
Departs from A064413 and A352187 at a(19), a(31) respectively, and apparently shares the way odd primes are proven to appear in the former and conjectured to appear in the latter; namely as 2*p, p, 3*p.
Conjectures: Permutation of the positive integers with primes in natural order, appearing in same way as in EKG.
From Michael De Vlieger, Oct 22 2022 (Start)
An algorithm similar to the Rains algorithm for the EKG sequence efficiently generates the sequence.
Like the EKG sequence, this sequence forces primes into divisibility; Primes divide their predecessors and successors. Consequently they exhibit Lagarias-Rains-Sloane chain 2p -> p -> 3p outside of p = 2, just as in the EKG sequence.
Let us define several quasi-rays conspicuous in the scatterplot. From lowest to highest apparent slope, we have the following:
- beta: local minima, i.e., a(1)=1 and primes p in order.
- gamma: 2p, 4p, and certain other composites.
- alpha-k: k*p from large k to k = 3. This system appears as a series of fine quasi-rays, with 3p generally comprising records.
Records are 3p outside of {1, 2, 4, 12, 18, 24, 25, 30, 36, 42, 56, 70, 105}.
a(33) = 35 behaves like a prime; 70 precedes and 105 follows it. a(34) = 105 is conspicuous as it appears earlier than expected. (End)

Examples

			a(1)=1, a(2)=2 and 2 divides 2 but does not divide 1. Since 2 is the only prime divisor of 2, a(3) = 4, the least unused multiple of 2.
Since every prime divisor of a(3)=4 also divides a(2)=2, a(4) = 6, the least novel multiple of the squarefree kernel of 4.
a(19), a(20)=25, 30, and 30 has two prime divisors (2,3) which do not divide 25. The least multiples of 2, 3 not seen already are 22, 27 respectively, so a(21)=22.
a(29), a(30)=42, 28 and every prime dividing 28 (2,7) also divides 42, so a(31) is 56, the least novel multiple of 14 (squarefree kernel of 28).
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, g, k, m, q, nn}, nn = 68; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; q[2] = 2; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; If[Length[f] == 0, While[Set[k, # q[#]]; c[k], q[#]++] &[Times @@ m], Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Oct 22 2022 *)

Extensions

More terms from Michael De Vlieger, Oct 22 2022

A352190 Indices of records in A352188.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 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, 307, 311, 313, 317, 331, 337, 347
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2022

Keywords

Comments

If conjecture (2) in A352187 is true, this is a duplicate of A008578 (1 together with primes). - R. J. Mathar, Mar 20 2022

Crossrefs

A357992 a(1)=1,a(2)=2,a(3)=3. Thereafter, if there are prime divisors p of a(n-2) which do not divide a(n-1), a(n) is the least novel multiple of any such p. Otherwise a(n) is the least novel multiple of the squarefree kernel of a(n-2).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 5, 14, 15, 7, 18, 21, 16, 24, 20, 27, 22, 30, 11, 25, 33, 35, 36, 28, 39, 26, 42, 13, 32, 52, 34, 65, 17, 40, 51, 38, 45, 19, 48, 57, 44, 54, 55, 46, 50, 23, 56, 69, 49, 60, 63, 58, 66, 29, 62, 87, 31, 72, 93, 64, 75, 68, 70, 85, 74
Offset: 1

Views

Author

David James Sycamore, Oct 23 2022

Keywords

Comments

In other words, if a(n-2) has k prime divisors p_j; 1 <= j <= k which do not divide a(n-1), where 1 <= k <= omega(a(n-2)), and if m_j*p_j is the least multiple of p_j which is not already a term, then a(n) = Min{m_j*p_j; 1 <= j <= k}. Otherwise, every prime divisor of a(n-2) also divides a(n-1), in which case a(n) is the least multiple of the squarefree kernel of a(n-2) which is not already a term.
Unlike in A064413, a prime p occurrence here is not directly flanked by multiples of p, but by numbers x, y sharing divisors other than p. The terms preceding and following x and y are divisible by p. Typically we observe m*p, x, p, y, r*p, where gcd(x, y) > 1, for multiples m,r of p which do not always follow the (2,3) pattern observed in A064413 and elsewhere. The case of p = 13 is remarkable for being preceded and followed by two multiples of itself (the first five multiples of 13 occur within the span of eight consecutive terms).
Conjecture 1: A permutation of the positive integers with primes in natural order.
Conjecture 2: The primes are the slowest numbers to appear (see also A352187).

Examples

			With a(2)=2, and a(3)=3, a(4) must be 4, the least unused multiple of 2.
Likewise, with a(3),a(4) = 3,4 a(5) must be the 6, the least unused multiple of 3.
Since every divisor of 4 also divides 6 a(6) = 8, the least unused multiple of 2, (squarefree kernel of 4).
Since a(8),a(9) = 10,12 and 5 is the only prime dividing 10 but not 12, it follows that a(10) = 5.
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, g, k, m, q, nn}, nn = 68; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; q[2] = 2; Do[m = FactorInteger[a[n - 2]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 1]] &]; If[Length[f] == 0, While[Set[k, #* q[#]]; c[k], q[#]++] &[Times @@ m], Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last]]; Set[{a[n], c[k]}, {k, True}], {n, 3, nn}]; Array[a, nn]] (* Michael De Vlieger, Oct 23 2022 *)

Extensions

More terms from Michael De Vlieger, Oct 23 2022

A357994 a(1)=1, a(2)=2. Thereafter, if there are prime divisors p of a(n-1) which do not divide a(n-2), a(n) is the greatest least multiple of any such p which has not already occurred. Otherwise a(n) is the least novel multiple of the squarefree kernel of a(n-1). (see comments).

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 18, 14, 7, 21, 24, 16, 20, 25, 30, 27, 33, 11, 22, 26, 13, 39, 36, 28, 35, 40, 32, 34, 17, 51, 42, 49, 56, 38, 19, 57, 45, 50, 44, 55, 60, 48, 54, 66, 77, 63, 69, 23, 46, 52, 65, 70, 84, 72, 78, 91, 98, 58, 29, 87, 75, 80, 62
Offset: 1

Views

Author

David James Sycamore, Oct 23 2022

Keywords

Comments

In other words, if a(n-1) has k prime divisors p_j; 1 <= j <= k which do not divide a(n-2), where 1 <= k <= omega(a(n-1)), and if m_j*p_j is the least multiple of p_j which is not already a term, then a(n) = Max{m_j*p_j; 1 <= j <= k}. Otherwise every prime divisor of a(n-1) also divides a(n-2), in which case a(n) is the least multiple of the squarefree kernel of a(n-1) which has not already occurred.
Companion to A357963, (which uses "Min" rather than "Max" in selection of a(n)). The first departure from A357963 occurs at a(21) because a(19),a(20) = 25,30, and 30 has two divisors (2,3) which do not divide 25. Of these the least multiples not occurring already are 22, and 27 respectively. At this point in A357963 22 is the chosen term, whereas here a(21) = 27. This has the effect of temporarily reversing (for the next prime = 11) the normal way primes seem to arrive in this sequence (2p,p,3p, as in A064413). Thus we see 30,27,33,11,22 (3p,p,2p). This may happen elsewhere in the data, consequent to choice of "Max" over "Min".
Conjecture: Permutation of the positive integers; primes being in natural order, and the slowest numbers to appear (as in A352187).

Examples

			a(1),a(2)=1,2 and 2 is the only prime dividing 2 which does not divide 1, therefore a(3)=4, the least multiple of 2 which has not occurred already. In this case (as in all terms up to and including a(20)), "Max" gives the same term as "Min".
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, d, f, g, k, q, u, nn}, nn = 68; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; q[2] = 2; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; If[Length[f] == 0, While[Set[k, # q[#]]; c[k], q[#]++] &[Times @@ m], Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MaximalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Oct 23 2022 *)

Extensions

More terms by Michael De Vlieger, Oct 23 2022

A358267 a(1) = 1, a(2) = 2. Thereafter:(i). If no prime divisor of a(n-1) divides a(n-2), a(n) is the least novel multiple of the squarefree kernel of a(n-1). (ii). If some (but not all) prime divisors of a(n-1) do not divide a(n-2), a(n) is the least of the least novel multiples of all such primes. (iii). If every prime divisor of a(n-1) also divides a(n-2), a(n) = u, the least unused number.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 14, 16, 11, 22, 18, 15, 20, 24, 21, 28, 26, 13, 17, 34, 30, 25, 19, 38, 32, 23, 46, 36, 27, 29, 58, 40, 35, 42, 33, 44, 48, 39, 52, 50, 45, 51, 68, 54, 57, 76, 56, 49, 31, 62, 60, 55, 66, 63, 70, 64, 37, 74, 72, 69, 92, 78, 65
Offset: 1

Views

Author

David James Sycamore, Nov 06 2022

Keywords

Comments

Let a(n-2) = i, a(n-1) = j. The sequence is generated from divisor relationships j->i, ranging from coprime: gcd(i,j) =1, to partial: 1 < gcd(i,j) < j, to total: gcd(i,j) = j, using conditions described in the definition.
The first 26 terms are the same as those of A280864 and A280866.
A prime cannot occur consequent to condition (i). a(n) = prime p either because p|a(n-1) but not a(n-2); see (ii), or because every prime divisor of a(n-1) also divides a(n-2), as when for example a(n-1) is a prime power q^k and q|a(n-2), which forces a(n) = u prime, see (iii).
If a(n) = u = p from condition (iii), a(n+1) = 2*p. If p|a(n-1)-> a(n) = p we see m*p->p->u (and u may of course be prime, as in ...,13,17,...). 13 is the first prime to appear consequent to condition (ii), see Example. Consecutive primes appear often: (13,17); (53,59); (61,67); ... Sequence is conjectured to be a permutation of the positive integers with primes appearing slowest, and in natural order.
Local minima consist of 1 and the primes p, while 4p dominates the maxima as n increases. - Michael De Vlieger, Nov 06 2022

Examples

			a(1) = 1, a(2) = 2 and since 2|a(2) but not a(1), and no other primes are involved, a(3) = 4, the least novel multiple of 2, the squarefree kernel of 2 (by (i)).
Every prime divisor of a(3) = 4 also divides a(2) = 2, thus a(4) = 3, the least unused number (by (iii)).
a(23) = 13 because 13|a(22) = 26, but does not divide a(21) = 28 (by (ii)). Then since every prime divisor of a(23) also divides a(22), a(24) = 17, the least unused term (by (iii)). This is the first occasion of consecutive primes.
a(25) = 34, a(26) = 30 and there are two primes (3,5) which divide 30 but not 34. At this point the least novel multiples of 3 and 5 are 27 and 25 respectively, so a(27) = 25 (by (ii)). This is the first departure from A280864/A280866, which both have a(27) = 45.
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, g, k, m, q, u, nn}, nn = 120; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 3]; q[2] = 2; u = 3; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; If[AllTrue[m, Mod[a[n - 2], #] == 0 &], k = u, Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Nov 06 2022 *)

Extensions

More terms from Michael De Vlieger, Nov 06 2022
Showing 1-10 of 12 results. Next