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.

Previous Showing 51-60 of 127 results. Next

A352968 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with min(a(n-2),a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 12 2022

Keywords

Comments

Although all primes likely appear they do not occur in their natural order, e.g., 17 appears before 13. In the range studied each time a prime appears, beyond the initial 2 and 3, the next term is a multiple of the same prime. The largest multiple in the first 500000 terms is eight, first occurring at a(446271) = 64403, a(446272) = 515224. It is unknown if this ratio is unbounded for large n. Similarly the smaller of the two terms before a prime is a multiple of the prime. The largest ratio found being seven, first occurring at a(446271) = 64403, the same term as above.
In the first 500000 terms there are thirty-eight fixed points - 1, 2, 3, 4, 14, 32, 85, ..., 3277, 8651, 9223. It is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 4 as min(a(2),a(3)) = min(2,3) = 2, and 4 is the smallest unused number that shares a factor with 2.
a(5) = 6 as min(a(3),a(4)) = min(3,4) = 3, and 6 is the smallest unused number that shares a factor with 3.
		

Crossrefs

Programs

A352976 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with max(a(n-2),a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 13 2022

Keywords

Comments

Although all primes likely appear they do not occur in their natural order, e.g., 37 appears before 31. In the range studied each time a prime appears, beyond the initial 2, the previous term is a multiple of the same prime. The largest multiple in the first 500000 terms is six, first occurring at a(7782) = 8286, a(7783) = 1381. It is unknown if this ratio is unbounded for large n. As a prime term is less than its previous term the term following the prime will share a factor with previous multiple of the prime. This factor appears to always be a factor of the multiple and thus the term is not another multiple of the prime.
In the first 500000 terms the fixed points are 1, 2, 15, 25, 35. It is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(4) = 6 as max(a(2),a(3)) = max(2,4) = 4, and 6 is the smallest unused number that shares a factor with 4.
a(5) = 3 as max(a(3),a(4)) = max(4,6) = 6, and 3 is the smallest unused number that shares a factor with 6.
		

Crossrefs

Programs

A353239 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 2, a(n) has either a common factor with a(n-1) but not with a(n-2), or with a(n-2) but not with a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 08 2022

Keywords

Comments

This sequence is a hybrid of the selection rules of the Yellowstone permutation A098550 and the Enots Wolley sequence A336957. As in the latter, to ensure the sequence is infinite an additional rule is applied: a(n) cannot have the same set of prime divisors as a(n-1).
Like the EKG sequence A064413, the primes p appear in natural order, and 2p precedes p. However, unlike A064413, the term following p is not 3p, but rather a term close to 2p, typically 2p+2.
The sequence is conjectured to be a permutation of the positive integers. Because of the selection rule at most two consecutive terms can be even, although the number of consecutive odd terms is likely arbitrarily large.
In the first 100000 terms the fixed points are 1,2,3,4,12. It is likely no more exist.

Examples

			a(4) = 4 as a(2) = 2, a(3) = 3, and 4 is the smallest unused number that has a common factor with 2 but not with 3.
a(5) = 9 as a(3) = 3, a(4) = 4, and 9 is the smallest unused number that is coprime to 4 but not to 3. Note that 8 also meets the selection criteria, but its only prime factor, 2, is shared with a(4) = 4, so 8 cannot be chosen as a(5) because then a(6) would not exist.
		

Crossrefs

Programs

  • MATLAB
    function a = A353239( max_n )
        a = [1 2 3];
        m = [1:max_n];
        b = cell(1,max_n); b{1} = [1]; b{2} = [2]; b{3} = [3];
        for n = 4:max_n
            j = 4; k = m(j); f = factor(k);
            while ((isempty(intersect(b{n-2},f)) ~= ~isempty(intersect(b{n-1},f)))...
                    ||isequal(unique(b{n-1}),unique(f)))
                j = j+1;
                k = m(j);
                f = factor(k);
            end
            a(n) = k;
            b{n} = f;
            m(m==k) = []; m(end+1) = m(end)+1;
        end
    end % Thomas Scheuerle, Apr 12 2022

A356850 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number not occurring earlier such that a(n) is coprime to the previous Omega(a(n)) terms.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 10, 11, 13, 6, 17, 19, 14, 15, 23, 22, 21, 25, 26, 29, 27, 31, 8, 33, 35, 34, 37, 39, 38, 41, 43, 45, 28, 47, 51, 46, 49, 53, 55, 12, 59, 61, 57, 20, 67, 69, 58, 65, 71, 62, 63, 73, 74, 77, 75, 79, 52, 83, 85, 81, 44, 89, 87, 82, 91, 93, 86, 95, 97, 94, 99, 101, 103, 50, 107
Offset: 1

Views

Author

Scott R. Shannon, Aug 31 2022

Keywords

Comments

The terms are concentrated along lines that contain numbers with a lowest prime factor of 2 or 3. Two of these lines are initially separated but join after approximately 130000 terms. This combined line then joins the uppermost line, which contains numbers with all prime factors and has a gradient of ~1.59, after approximately 680000 terms at which point a new series of smaller values appears. See the linked images.
Numbers with a larger number of prime divisors relative to the numbers close to it appear much later in the sequence. For example a(4014) = 16, a(14219) = 40, while even more delayed are a(685301) = 24 and a(704634) = 36. These last two appear after the above mentioned line merging after 680000 terms.
The lower lines containing terms with prime factors of 2 and 3 visible in the image of terms up to 1000000 are curving upward, possibly repeating the earlier behavior seen where similar lines eventually join with the uppermost line. If these do in fact eventually reach the uppermost line it is plausible this will once again signal the start of a new series of much lower valued terms.
The two lowest unseen numbers after 1000000 terms are 32 and 48, for former indicating that the longest run of consecutive odd values is only four after 1000000 terms. Although the sequence is conjectured to be a permutation of the positive integers, if these missing terms, especially those of the form 2^k, only appear after the recombination of the lower lines with the upper line then it may take an extraordinarily large number of terms for some values, like 2^k for large k, to eventually appear.
In the first 1000000 terms the only fixed points are the first three terms along with 14 and 15. It is possible more exist if the above mentioned upward trend of smaller values does occur.

Examples

			a(7) = 9 as Omega(9) = A001222(9) = 2, and 9 is coprime to the previous two terms, namely a(6) = 7 and a(5) = 4.
		

Crossrefs

Programs

A337490 a(0)=1; for n > 0, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 6, 13, 21, 30, 10, 21, 33, 46, 14, 29, 45, 62, 18, 37, 57, 78, 22, 45, 69, 94, 26, 53, 81, 110, 140, 171, 203, 236, 270, 305, 341, 378, 416, 39, 79, 120, 162, 205, 249, 294, 340, 387, 3, 52, 102, 17, 69, 122, 176, 231, 287, 344, 402, 461, 521, 582, 644, 707, 771, 836, 902, 969
Offset: 0

Views

Author

Scott R. Shannon, Aug 29 2020

Keywords

Comments

The sequence displays the unusual behavior of decreasing 53 times in the first 1975 terms, due to the existence of a GCD which has not previously appeared in the sequence, but then not decreasing again for n up to at least 100 million. In this period there are 37 repeated terms, the first being 21 at n=11 and the last 161202 at n=2054. In the same range many values do not appear, for example 16,23,28,32,36. It is unknown when the sequence decreases again, or if all values eventually appear. The 100 millionth term is 4999999948050717.
See the companion sequence A333980 for the sum of the terms from a(0) to a(n).

Examples

			a(2) = 4 as the sum of all previous terms is a(0)+a(1) = 3, and the GCD of 3 and 2 is 1, which has already appeared in the sequence. Therefore a(2) = a(1) + n = 2 + 2 = 4.
a(4) = 11 as the sum of all previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11.
a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previous appeared a(5) = 5.
		

Crossrefs

Cf. A333980, A333826 (same rules but starting a(1)=1), A165430, A064814, A082299, A005132, A336957.

Programs

  • PARI
    lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n-1, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n-1, va[n] = g); s += va[n];); va;} \\ Michel Marcus, Sep 05 2020

A339107 a(1) = 3; for n>1, a(n) = the smallest positive number not occurring earlier such that a(n-1)*a(n) is divisible by a(n-1)+a(n), where a(n) is not a prime or 4.

Original entry on oeis.org

3, 6, 12, 24, 8, 56, 42, 21, 28, 70, 30, 15, 10, 40, 60, 20, 80, 48, 16, 112, 84, 14, 35, 140, 105, 120, 72, 9, 18, 36, 45, 90, 135, 108, 54, 27, 216, 270, 180, 144, 240, 160, 96, 32, 224, 168, 126, 63, 378, 189, 252, 315, 210, 231, 132, 44, 77, 462, 22, 99, 198, 165, 110, 374, 204, 68, 221, 2652
Offset: 1

Views

Author

Scott R. Shannon, Nov 23 2020

Keywords

Comments

Given a(n-1) the candidates for a(n) are k*a(n-1)/(a(n-1)-k), where 1<=kA063647(n). The values of a(n-1)*a(n)/(a(n-1)+a(n)) are given by the companion sequence A339133.
The first term is 3 as one can easily show 1 and 2 cannot occur in the sequence; if a(n-1)=1 then 1*a(n)/(1+a(n)) has no integer solution while if a(n-1)=2 then 2*a(n)/(2+a(n)) has the one integer solution a(n)=2, but that is a(n-1).
One can also show that a(n) can never be a prime. The only way a(n)=p can be produced is if a(n-1) = p*(p-1). However the only candidate for a(n+1) if a(n)=p is the number p*(p-1), but that is a(n-1). Thus allowing a(n) to be a prime will halt the sequence; if a number of the form p*(p-1) occurs in the sequence the smallest candidate other than p must be chosen for the next term.
Likewise to avoid halting the sequence the number 4 cannot be chosen; if a(n-1)=4 the only candidates for a(n) would be 4 and 12, but a(3)=12 and 4 cannot occur again, thus a(n-1)=4 would halt the sequence.
It is likely all numbers other than 1,2,4 and the primes appear in the sequence, although this is unknown. The smallest composite not to have appeared after 100 thousand terms is 794. The one fixed point in the first 100 thousand terms is a(20572) = 20572.

Examples

			a(2) = 6. The only candidate for a(2) that satisfies 3*a(2) being divisible by 3+a(2) is a(2) = 6.
a(3) = 12. The candidates for a(3) given a(2) = 6 are 3,6,12,30, all of which satisfy 6*a(3) being divisible by 6+a(3). 3 and 6 have already appeared so the next smallest candidate is chosen, being 12.
a(4) = 24. The candidates for a(4) given a(3) = 12 are 4,6,12,24,36,60,132, all of which satisfy 12*a(4) being divisible by 12+a(4). 4 is not allowed as there would be no candidates for a(5), and 6 and 12 have already appeared, so the next smallest candidate is chosen, being 24.
a(5) = 8. There are 10 candidates for a(5) given a(4) = 24, the smallest that has not appeared is 8.
		

Crossrefs

Programs

  • Maple
    R:= 3: a:= 3: S:= {4,3}:
    for i from 2 to 100 do
      Cands:= remove (t -> t < 1 or isprime(t), map(`-`,numtheory:-divisors(a^2),a) minus S);
      a:= min(Cands); R:= R, a; S:= S union {a};
    od:
    R; # Robert Israel, Mar 23 2023

A361103 a(n) = k such that A360519(k) = A361102(n), or -1 if A361102(n) never appears in A360519.

Original entry on oeis.org

1, 2, 3, 6, 11, 14, 10, 7, 5, 16, 19, 28, 20, 23, 9, 24, 4, 27, 32, 18, 15, 31, 36, 34, 40, 35, 39, 30, 44, 68, 8, 52, 42, 48, 64, 51, 26, 22, 72, 56, 41, 47, 76, 55, 46, 43, 12, 80, 60, 59, 63, 38, 84, 49, 88, 87, 21, 92, 50, 96, 33, 91, 67, 13, 71, 95, 100, 53, 104, 99, 75, 54, 112, 108
Offset: 0

Views

Author

Keywords

Comments

Conjectured to be a permutation of the natural numbers (and if so, -1 will never appear). See A361104 for the putative inverse permutation.

Crossrefs

A361133 a(n) = n for n <= 3. Let h, i, j represent a(n-3), a(n-2), a(n-1) respectively. For n > 3, if there is a symmetric difference in the sets of distinct primes dividing h and j, with greatest member p then a(n) is the least novel multiple of p. Otherwise, a(n) is the least novel k such that (k,i) > 1.

Original entry on oeis.org

1, 2, 3, 6, 9, 4, 12, 8, 10, 5, 15, 18, 20, 21, 7, 14, 24, 28, 16, 27, 35, 42, 49, 25, 56, 22, 11, 33, 30, 44, 36, 40, 55, 66, 77, 63, 88, 70, 45, 99, 110, 121, 39, 13, 26, 48, 52, 32, 51, 17, 34, 54, 68, 38, 19, 57, 60, 76, 69, 23, 46, 72, 92, 50, 65, 115, 138, 161, 84, 184
Offset: 1

Views

Author

David James Sycamore, Mar 02 2023

Keywords

Comments

In other words if there are primes p which divide h but not j or primes q which divide j but not h then a(n) is the least novel multiple of the greatest of all such primes p, q. If there are no such primes (rad(h) = rad(j)), then a(n) is the least unused number sharing a divisor with i.
When an odd prime p appears it is immediately preceded and followed by multiples m*p and r*p of p respectively, thus m*p, p, r*p where if m = 2 then b is 3, and m > 2 forces r = 2 (compare with A064413 where m = 2, and r = 3 throughout).
The scatterplot resembles a fine-toothed comb, wherein it seems that the "teeth" represent consecutive multiples of certain distinct primes, which become compacted closer and closer together as the sequence progresses.
Conjectured to be a permutation of the natural numbers, with primes in natural order.

Examples

			a(4) = 6 because the symmetric difference for 1 and 3 contains only one prime (3) and 6 is the least multiple of 3 that has not occurred already.
a(5) = 9 since h,j = 2,6 with difference 3, and 9 is the least novel multiple of 3.
a(6) = 4 since h,i,j = 3,6,9 (3,9 have no symmetric difference), and 4 is least novel number sharing a divisor with i = 6.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^10; c[] = False; q[] = 1;
    f[n_] := f[n] = FactorInteger[n][[All, 1]];
    Array[Set[{a[#], c[#]}, {#, True}] &, 3];
    Set[{h, i, j, R, S, T}, {a[1], a[2], a[3], f[a[1]], f[a[2]],
      f[a[3]]}]; u = 4;
    Do[If[R == T,
       k = u; While[Or[c[k], CoprimeQ[i, k]], k++],
       (k = q[#]; While[c[k #], k++]; k *= #; While[c[# q[#]], q[#]++]) &[
        Max@ SymmetricDifference[R, T] ] ];
      Set[{a[n], c[k], h, i, j}, {k, True, i, j, k}];
      Set[{R, S, T}, {S, T, f[k]}];
      If[k == u, While[c[u], u++]], {n, 4, nn}];
    Array[a, nn] (* Michael De Vlieger, Mar 05 2023 *)

A363576 a(1) = 1, a(2) = 6; for n > 2, a(n) is the smallest positive number that has not yet appeared such that a(n) has a common factor with a(n-1), has no common factor with a(n-2), while the difference |a(n) - a(n-1)| is distinct from all previous differences |a(i) - a(i-1)|, i=2..n-1.

Original entry on oeis.org

1, 6, 10, 35, 21, 12, 20, 55, 33, 18, 28, 77, 143, 26, 14, 105, 51, 34, 40, 95, 57, 24, 22, 187, 85, 15, 36, 52, 65, 45, 42, 68, 221, 39, 63, 56, 38, 171, 75, 115, 46, 74, 111, 69, 92, 44, 165, 87, 58, 88, 99, 135, 50, 82, 123, 183, 122, 70, 133, 209, 66, 93, 155, 80, 114, 153, 391, 161, 84
Offset: 1

Views

Author

Scott R. Shannon, Jun 10 2023

Keywords

Comments

This is a variation of A360519 where the difference between consecutive terms is distinct. See A360519 for further details.
In the first 100000 terms the only fixed points are 1, 585 and 3619, although it is possible more exist.

Examples

			a(11) = 28 as 28 shares 2 as a common factor with a(10) = 18 while sharing no common factor with a(9) = 33. Also the difference |28 - 18| = 10 is distinct from all previous differences. This is the first term to differ from A360519.
		

Crossrefs

A333980 Partial sums of A337490.

Original entry on oeis.org

1, 3, 7, 14, 25, 30, 36, 49, 70, 100, 110, 131, 164, 210, 224, 253, 298, 360, 378, 415, 472, 550, 572, 617, 686, 780, 806, 859, 940, 1050, 1190, 1361, 1564, 1800, 2070, 2375, 2716, 3094, 3510, 3549, 3628, 3748, 3910, 4115, 4364, 4658, 4998, 5385, 5388, 5440, 5542, 5559, 5628, 5750
Offset: 0

Views

Author

Scott R. Shannon, Sep 04 2020

Keywords

Comments

See A337490 for an explanation of the sequence.

Crossrefs

Previous Showing 51-60 of 127 results. Next