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.

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