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).
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
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.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing records in red, highlighting composite prime powers in gold, squarefree semiprimes in large green, 5-smooth numbers that are not p-smooth, p > 5, in small green, 7-smooth numbers that are not p-smooth, p > 7, in magenta, 11-smooth numbers that are not p-smooth, p > 11, in cyan, and 13-smooth numbers that are not p-smooth, p > 13, in blue.
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
Comments