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.

A364236 a(1) = 1. For n > 1, if a(n-1) is a novel term, a(n) = d(a(n-1)), else if a(n-1) is a repeat term seen k (>1) times, a(n) = a(n-1) + d(k-1), where d is the divisor counting function A000005.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 3, 4, 5, 2, 4, 6, 4, 6, 7, 2, 5, 6, 8, 4, 7, 8, 9, 3, 5, 7, 9, 10, 4, 6, 8, 10, 11, 2, 4, 8, 10, 12, 6, 9, 11, 12, 13, 2, 6, 8, 11, 13, 14, 4, 6, 10, 12, 14, 15, 4, 8, 10, 13, 15, 16, 5, 7, 9, 11, 13, 15, 17, 2, 4, 7, 10, 12, 14, 16, 17, 18
Offset: 1

Views

Author

David James Sycamore, Jul 14 2023

Keywords

Comments

In other words the appearance of a novel term m introduces d(m) as next term, whereas the appearance of repeat term m introduces m + the number of divisors of the number of repetitions of m.
1 is seen only twice, but all other numbers appear infinitely many times.
Prime terms may appear in 3 different ways: consequent to the second appearance of p-1, to the first appearance of m where d(m) = p, or to a repeat term m seen k (>1) times, where m + d(k-1) = p.
The plot consists of consecutive strictly increasing trajectories starting d(r(k)) after the k_th record term r(k), and ending with r(k+1) = r(k)+1, meaning that records are given by A000027. This behavior, which determines the smooth whaleback shape of the plot is open to explanation.

Examples

			a(1) = 1 is a novel term so a(2) = d(a(1)) = d(1) = 1.
Since 1 has been repeated once, a(3) = 1 + d(1) = 2.
a(3) = 2 introduces a(4) = d(2) = 2 and so on.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] := 0; a[1] = j = 1; f[x] := DivisorSigma[0, x]; Do[k = If[# == 0, f[j], j + f[#] ] &[c[j]]; c[j]++; Set[{a[n], j}, {k, k}], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Jul 14 2023 *)
  • PARI
    lista(nn) = {my(va=vector(nn)); va[1] = 1; for (n=2, nn, my(vv = Vec(va, n-1)); my(k = #select(x->(x==va[n-1]), vv)); if (k==1, va[n] = numdiv(va[n-1]), va[n] = va[n-1] + numdiv(k-1));); va;} \\ Michel Marcus, Jul 14 2023

Extensions

More terms from David A. Corneth, Jul 14 2023