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

A359557 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number which has not appeared such that all the distinct prime factors of a(n-2) + a(n-1) are factors of a(n).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 10, 8, 12, 20, 14, 34, 18, 26, 22, 24, 46, 70, 58, 16, 74, 30, 52, 82, 134, 36, 170, 206, 94, 60, 154, 214, 92, 102, 194, 148, 114, 262, 188, 90, 278, 138, 78, 42, 120, 48, 84, 66, 150, 54, 204, 258, 462, 180, 642, 822, 366, 132, 498, 210, 354, 282, 318, 240, 186, 426, 306
Offset: 1

Views

Author

Scott R. Shannon, Jan 05 2023

Keywords

Comments

All terms other than 3 and 5 are even. As a(114) = 510 and a(115) = 570 both contain 2 and 5 as prime factors, all subsequent terms are multiples of 10. Likewise after 1994 terms all terms contain 2, 3, 5, 7, 11 as factors, so all subsequent terms are multiples of 2*3*5*7*11 = 2310.
The terms grow rapidly in size, e.g., a(2459) = 28318290. The smallest number not to appear is 7.
a(n) = k*m such that k = A007947(a(n-2)+a(n-1)) and m >= 1 produces the smallest k*m != a(j), j < n. - Michael De Vlieger, Jan 07 2023

Examples

			a(5) = 4 as a(3) + a(4) = 3 + 5 = 8 which contains 2 as its only distinct prime factor, and 4 is the smallest unused number to contain 2 as a factor.
a(12) = 34 as a(10) + a(11) = 20 + 14 = 34 which contains 2 and 17 as distinct prime factors, and 34 is also the smallest unused number to contain 2 and 17 as factors.
a(13) = 18 as a(11) + a(12) = 14 + 34 = 48 which contains 2 and 3 as distinct prime factors, and 18 is the smallest unused number to contain 2 and 3 as factors.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^7; c[] = False; q[] = 1; f[n_] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; Set[{i, j, k}, {a[1], a[2], f[a[1] + a[2]]}]; Do[m = q[k]; While[c[k m], m++]; m *= k; While[c[k q[k]], q[k]++]; Set[{a[n], c[m], i, j, k}, {m, True, j, m, f[j + m]}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Jan 07 2023 *)
  • Python
    from math import prod
    from sympy import factorint
    from itertools import count, islice
    def agen():
        i, j, aset = 1, 2, {1, 2}; yield from [i, j]
        while True:
            m = prod(factorint(i+j))
            an = next(k*m for k in count(1) if m*k not in aset)
            i, j = j, an; aset.add(an); yield an
    print(list(islice(agen(), 61))) # Michael S. Branicky, Jan 16 2023

A359857 a(1) = 1, a(2) = 2, and let i,j represent a(n-2), a(n-1) respectively. For n > 2: If only one of i,j is prime, a(n) = least novel multiple of i+j. If i,j are both prime, a(n) = least novel multiple of i*j. If both i,j are nonprime, a(n) is least novel k prime to both i and j.

Original entry on oeis.org

1, 2, 3, 6, 9, 5, 14, 19, 33, 52, 7, 59, 413, 472, 11, 483, 494, 17, 511, 528, 13, 541, 7033, 7574, 15, 23, 38, 61, 99, 160, 29, 189, 218, 25, 21, 4, 31, 35, 66, 37, 103, 3811, 3914, 27, 41, 68, 109, 177, 286, 43, 329, 372, 53, 425, 478, 39, 47, 86, 133, 45, 8
Offset: 1

Views

Author

David James Sycamore, Jan 16 2023

Keywords

Comments

A lexicographically earliest sequence. If the "least novel" restrictions on the first two conditions are removed the result is a sequence initially identical to this one, but eventually repeat terms occur, whereas in this constrained version there are no repeats. The plots appear to distinguish three distinct zones, corresponding to the conditions of the Name. The first (upper) relates to terms following the occurrence of two primes (i*j), the middle zone relates to the occurrence of a prime and a nonprime (i+j), and the third (lowest) refers to terms following the occurrence of consecutive nonprime terms, where the coprime condition introduces the least unused numbers, which are initially (until a(25) = 15) all primes. It is not clear if every positive integer appears, but this does seem likely (note the late appearance of 4 at a(36)).

Examples

			a(3) = 3 since only one of a(1), a(2) is prime and i+j = 3 has not occurred previously.
a(4) = 6 since a(2) = 2 and a(3) = 3 are both prime and i*j = 6 has not occurred previously.
a(6) = 5 since a(4) = 6 and a(5) = 9 are both composite, and 5 is the least novel number prime to both.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import isprime
    from itertools import count, islice
    def agen():
        i, j, pi, pj, mink, aset = 1, 2, 0, 1, 3, {1, 2}
        yield from [i, j]
        while True:
            if pi^pj:
                k, m = max(mink//(i+j), 1), i+j
                while m*k in aset: k += 1
            elif pi&pj:
                k, m = max(mink//(i*j), 1), i*j
                while m*k in aset: k += 1
            else:
                k, m = mink, 1
                while k in aset or gcd(k, i) != 1 or gcd(k, j) != 1: k += 1
            an = m*k
            i, j, pi, pj = j, an, pj, int(isprime(an)); yield an; aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 36))) # Michael S. Branicky, Jan 16 2023

Extensions

a(31)=29 inserted and a(38) and beyond from Michael S. Branicky, Jan 16 2023

A361593 a(1) = 1, a(2) = 2, a(3) = 3; for n > 3, a(n) is the smallest positive number which has not appeared such that all the distinct prime factors of a(n-3) + a(n-2) + a(n-1) are factors of a(n).

Original entry on oeis.org

1, 2, 3, 6, 11, 10, 9, 30, 7, 46, 83, 34, 163, 70, 267, 20, 357, 322, 699, 1378, 2399, 2238, 6015, 5326, 13579, 6230, 25135, 106, 31471, 14178, 45755, 15234, 75167, 68078, 8341, 151586, 228005, 193966, 573557, 248882, 1016405, 306474, 1571761, 361830, 2240065, 1043414, 3645309, 3464394
Offset: 1

Views

Author

Keywords

Comments

This is a variation of A359557 where the previous three terms are added instead of two. Unlike A359557 the terms here do no rapidly reach a regime where all terms share one or more prime factors, and it is unknown if this ever occurs.

Examples

			a(6) = 10 as a(3) + a(4) + a(5) = 3 + 6 + 11 = 20 = 2*2*5, and the smallest unused number containing 2 and 5 as factors is 10.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = False; q[] = 1;
    f[n_] := Times @@ FactorInteger[n][[All, 1]]; t = 3;
    Array[Set[{a[#], c[#]}, {#, True}] &, t]; Set[{i, j, k, x}, {a[t - 2],
       a[t - 1], a[t], f[a[t - 2] + a[t - 1] + a[t]]}];
    Do[m = q[x];
      While[c[x m], m++];
      m *= x; While[c[x q[x]], q[x]++];
      Set[{a[n], c[m], i, j, k, x}, {m, True, j, k, m, f[j + k + m]}], {n,
    t + 1, nn}]; Array[a, nn] (* Michael De Vlieger, Mar 20 2023 *)
Showing 1-3 of 3 results.