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.

A261088 Number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 10, 10, 19, 15, 19, 21, 24, 28, 39, 33, 53, 44, 49, 53, 60, 61, 69, 72, 79, 82, 92, 93, 117, 108, 115, 115, 140, 121, 174, 146, 205, 155, 233, 217, 267, 192, 295, 209, 225, 222, 238, 249, 267, 270, 299, 290, 336, 313, 373, 328, 411, 347, 451, 380, 486, 400, 534, 422, 447, 441, 460, 460, 511, 479, 496, 504, 545, 529, 602, 553, 579, 577, 626, 612, 681, 632, 747, 665, 796, 695
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,n^2,#!= 0&]]-1;f/@Range[0,85] (* Ivan N. Ianakiev, Sep 25 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 2^25;
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%65536),print1(i,", ")););
    A155043 = n -> if(!n,n,v155043[n]);
    A261088 = n -> A155043(n^2);
    for(n=0, 5792, write("b261088.txt", n, " ", A261088(n)));
    
  • Scheme
    (define (A261088 n) (A155043 (A000290 n)))

Formula

a(n) = A155043(A000290(n)) = A155043(n^2).