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.

A286605 Restricted growth sequence computed for number of divisors, d(n) (A000005).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 5, 2, 4, 4, 6, 2, 5, 2, 5, 4, 4, 2, 7, 3, 4, 4, 5, 2, 7, 2, 5, 4, 4, 4, 8, 2, 4, 4, 7, 2, 7, 2, 5, 5, 4, 2, 9, 3, 5, 4, 5, 2, 7, 4, 7, 4, 4, 2, 10, 2, 4, 5, 11, 4, 7, 2, 5, 4, 7, 2, 10, 2, 4, 5, 5, 4, 7, 2, 9, 6, 4, 2, 10, 4, 4, 4, 7, 2, 10, 4, 5, 4, 4, 4, 10, 2, 5, 5, 8, 2, 7, 2, 7, 7, 4, 2, 10, 2, 7, 4, 9, 2, 7, 4, 5, 5, 4, 4
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

For all i, j: A101296(i) = A101296(j) => a(i) = a(j).
For all i, j: a(i) = a(j) <=> A000005(i) = A000005(j).

Crossrefs

Cf. A000005, A007416 (positions of records, and also the first occurrence of each n).

Programs

  • Mathematica
    With[{nn = 119}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Array[DivisorSigma[0, #] &, nn]] (* Michael De Vlieger, May 12 2017, Version 10 *)
  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A000005(n) = numdiv(n);
    write_to_bfile(1,rgs_transform(vector(10000,n,A000005(n))),"b286605.txt");