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-4 of 4 results.

A366111 a(1) = 1; a(2) = 2; for n > 2, a(n) is the smallest positive number that has not yet appeared such that |a(n) - a(n-1)| is a divisor of a(n)*a(n-1), and where |a(n) - a(n-1)| > 1.

Original entry on oeis.org

1, 2, 4, 6, 3, 12, 8, 10, 5, 30, 15, 18, 9, 36, 20, 16, 14, 7, 56, 24, 21, 28, 26, 13, 182, 84, 35, 40, 32, 34, 17, 306, 102, 51, 42, 33, 22, 11, 132, 44, 46, 23, 552, 138, 69, 60, 45, 48, 39, 52, 50, 25, 150, 75, 66, 54, 27, 108, 72, 63, 70, 65, 78, 74, 37, 1406, 684, 171, 90, 80, 55, 110, 85
Offset: 1

Views

Author

Scott R. Shannon, Sep 29 2023

Keywords

Comments

Many of the terms lie just above the line a(n) = n, although this is not true of the prime-valued terms. Any prime factor of the difference |a(n) - a(n-1)| must be a factor of both a(n) and a(n-1), therefore if a term p is prime then the other term is a multiple of that prime, a*p. By the definition of the sequence a(n)*a(n-1) = a*p^2 must be a multiple of a*p - p = p*(a-1). This can only be true if a = 2 or a = p+1, thus the difference between the terms must be p or p^2. As a prime p cannot appear as a term if it has not previously appeared as a factor of a term, if a term is prime then the previous term must be 2*p and the following term must be p+p^2. Thus primed-valued terms force the following term to be O(p^2).
In the first 10000 terms the fixed points are 16, 21, 48, 98, 105, 322, 3088, 7659, although more likely exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 12 as |12 - 3| = 9, and 9 is a divisor of 12*3 = 36. No smaller unused number has this property.
		

Crossrefs

A361314 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number which has not appeared that shares a factor with a(n-2) + a(n-1) while the sum a(n) + a(n-1) is distinct from all previous sums a(i) + a(i-1), i=2..n-1.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 8, 7, 9, 10, 19, 29, 12, 41, 53, 14, 67, 15, 16, 31, 47, 13, 20, 18, 22, 24, 26, 25, 17, 27, 28, 11, 21, 36, 30, 32, 38, 34, 39, 73, 35, 33, 42, 45, 48, 51, 44, 40, 46, 43, 89, 50, 139, 49, 52, 101, 54, 55, 109, 56, 57, 113, 58, 60, 59, 63, 61, 62, 66, 64, 65, 69, 68, 137, 70
Offset: 1

Views

Author

Scott R. Shannon, Mar 08 2023

Keywords

Comments

In the first 100000 terms the fixed points are 1, 2, 3, 6, 9, 10, 39, 91, 112; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(23) = 20 as a(21) + a(22) = 47 + 13 = 60, and 20 is the smallest unused number that shares a factor with 60 while the sum a(22) + 20 = 13 + 20 = 33 is distinct from all previous sums. Note that 18 is unused and shares a factor with 60 but the sum a(22) + 18 = 13 + 18 = 31 is the same as a(18) + a(19) = 15 + 16 = 31. This is the first term that differs from A337136.
		

Crossrefs

A365984 Starting with a(1) = 2, the lexicographically earliest infinite sequence of distinct positive integers such that |a(n) - a(n-1)| is a divisor of a(n), and where |a(n) - a(n-1)| > 1.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 9, 18, 15, 20, 16, 14, 21, 24, 22, 33, 30, 25, 50, 40, 32, 28, 26, 39, 36, 27, 54, 45, 42, 35, 70, 56, 48, 44, 46, 69, 66, 55, 60, 57, 38, 76, 72, 63, 84, 77, 88, 80, 64, 62, 93, 90, 75, 78, 52, 65, 130, 104, 91, 98, 96, 92, 94, 141, 138, 115, 110, 99, 102, 51, 34, 68, 85, 170
Offset: 1

Views

Author

Scott R. Shannon, Sep 24 2023

Keywords

Comments

For the sequence to be infinite no term can be a prime except for a(1) = 2. One can easily show that if a(n) is a prime p, then the only possible value for a(n-1) or a(n+1) is 2p. If a(n) = p was a term then the difference between it and the previous term must also be p, implying the previous term is a multiple of p, so it must be 2p. As 2p has now already appeared the term after p would not exist, thus terminating the sequence.
The first term that is not a prime power that cannot be used even though it satisfies being divisible by the difference between it and the previous term is 175, which appears to be a valid value for a(214) since a(213) = 350. However the next term after 175 would have to be one of 140, 150, 168, 170, 180, 182, 200, 210, 350, but all of those values have already appeared as previous terms, so 175 can never appear else it would terminate the sequence.

Crossrefs

A366047 Starting with a(1) = 2, the lexicographically earliest infinite sequence of distinct positive integers such that |a(n) - a(n-1)| is a divisor of a(n)*a(n-1), where |a(n) - a(n-1)| is not a prime and greater than 1.

Original entry on oeis.org

2, 6, 10, 14, 18, 9, 36, 12, 4, 8, 16, 20, 24, 15, 30, 21, 42, 28, 32, 40, 44, 22, 26, 52, 48, 39, 78, 60, 35, 70, 45, 54, 27, 108, 72, 56, 64, 68, 34, 38, 76, 80, 55, 110, 66, 33, 132, 84, 63, 90, 65, 130, 104, 88, 92, 46, 50, 25, 150, 75, 100, 96, 87, 174, 58, 62, 124, 116, 112, 98, 49, 392
Offset: 1

Views

Author

Scott R. Shannon, Sep 27 2023

Keywords

Comments

For the sequence to be infinite no term can be a prime except for a(1) = 2. One can show that if a(n) is a prime p, then the only possible value for a(n-1) is 2p or p + p^2 since, if a term is prime, the preceding term must be a multiple of that prime. However the preceding term cannot be 2p since the difference between the terms would then be prime, therefore it must be p + p^2. However the only possible value for the term after a prime p is likewise p + p^2, but that has already been used, thus allowing a term to be prime would terminate the sequence.

Examples

			a(9) = 4 as |4 - a(8)| = |4 - 12| = 8, and 8 is a divisor of 4*12 = 48 and is not a prime. Note that |3 - 12| = 9 is a divisor of 3*12 = 36 and is not a prime, but as shown above a prime term will terminate the sequence so is not permitted.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] := False; s = {2, 6};
    f[x_] := Times @@ FactorInteger[x][[All, 1]];
    MapIndexed[Set[{a[First[#2]], c[#1]}, {#1, True}] &, s];
    Set[{j, u}, {s[[-1]], 4}];
    Do[k = u;
        While[Or[c[k], #1 < 4, PrimeQ[#1],
              ! Divisible[j*k, #1], ! Divisible[j, #2], ! Divisible[k, #2]] & @@
              {#, f[#]} &@ Abs[j - k], k++];
        Set[{a[n], c[k], j}, {k, True, k}];
        If[k == u, While[Or[c[u], PrimeQ[u]], u++]], {n, Length[s] + 1, nn}];
    Array[a, nn] (* Michael De Vlieger, Sep 29 2023 *)
Showing 1-4 of 4 results.