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.

A341679 a(1) = 1; for n > 1, a(n) = n divided by the most recently appearing divisor of n in all previous terms.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 4, 3, 2, 11, 6, 13, 7, 5, 8, 17, 3, 19, 4, 7, 2, 23, 12, 5, 13, 9, 14, 29, 6, 31, 16, 11, 17, 7, 6, 37, 19, 3, 8, 41, 14, 43, 4, 15, 2, 47, 24, 7, 25, 17, 26, 53, 27, 5, 8, 19, 29, 59, 12, 61, 31, 9, 8, 13, 33, 67, 4, 23, 14, 71, 18, 73, 37, 15, 19, 11, 6, 79, 20, 9, 41, 83
Offset: 1

Views

Author

Scott R. Shannon, Feb 17 2021

Keywords

Comments

From Michael De Vlieger, Mar 03 2021: (Start)
Records are 1 and the primes, i.e., A008578.
1 is the minimum, with occasions of the term 2 local minima.
a(p)=p since a(1)=1, the empty product, is the only available divisor in a(n) for 1 <= n <= p for any prime p, since p itself does not yet appear in the sequence, and p is coprime to all smaller n, i.e., gcd(p, n) = 1 for all n < p. As a consequence of a(p) = p, a(1) = 1 is the only appearance of 1 in the sequence.
a(p^2) = p, and generally, a(p^k) = p^e, 1 <= e < k, 1 < a(c) < c for composite c.
Trajectories visible in the scatterplot of a(n) pertain to d = n/a(n) and have origin (d, 1) and slope 1/d. Noncomposite trajectories d appear more continuous than composite trajectories, which exhibit a quasi-regular, exponential pattern of interruptions.
The plot of n at (x,y) = (a(n), n/a(n)) "unfolds" the scatterplot of this sequence. (End)

Examples

			a(4) = 2 as a(2) = 2 is the most recently occurring divisor of 4, thus a(4) = 4/2 = 2.
a(5) = 5 as the only divisor of 5 in the sequence is 1, thus a(5) = 5/1 = 5.
a(10) = 2 as a(5) = 5 is the most recently occurring divisor of 10, thus a(10) = 10/5 = 2.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {1}, k}, Do[k = 1; While[Mod[i, a[[-k]]] != 0, k++]; AppendTo[a, i/a[[-k]] ], {i, 2, 83}]; a] (* Michael De Vlieger, Feb 17 2021 *)
    (* Second, faster program with memoized last indices of d | n *)
    Block[{a = {1}, c, k}, c[1] = 1; Monitor[Do[AppendTo[a, Set[k, i/MaximalBy[Map[If[! IntegerQ@ c[#], {#, 0}, {#, c[#]}] &, Divisors[i]], Last][[1, 1]] ]]; c[k] = i , {i, 2, 10^4}], i]; a] (* Michael De Vlieger, Mar 03 2021 *)

Formula

a(n) = n if n is prime.