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.

A082097 a(n) = d(a(n-1)) + n = A000005(a(n-1)) + n, with a(1)=1.

Original entry on oeis.org

1, 1, 1, 5, 7, 8, 11, 10, 13, 12, 17, 14, 17, 16, 20, 22, 21, 22, 23, 22, 25, 25, 26, 28, 31, 28, 33, 32, 35, 34, 35, 36, 42, 42, 43, 38, 41, 40, 47, 42, 49, 45, 49, 47, 47, 48, 57, 52, 55, 54, 59, 54, 61, 56, 63, 62, 61, 60, 71, 62, 65, 66, 71, 66, 73, 68, 73, 70, 77, 74
Offset: 1

Views

Author

Labos Elemer, Apr 11 2003

Keywords

Crossrefs

Programs

  • GAP
    a:= function(n)
        if n<4 then return 1;
        else return Tau(a(n-1)) + n;
        fi;
      end;
    List([1..70], n-> a(n) ); # G. C. Greubel, Aug 31 2019
  • Magma
    a:= func< n | n lt 4 select 1 else n + NumberOfDivisors(Self(n-1)) >;
    [a(n): n in [1..70]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    with(numtheory);
    a:= proc(n) option remember;
       if n < 4 then 1
       else tau(a(n-1)) + n
       fi
     end:
    seq(a(n), n=1..70); # G. C. Greubel, Aug 31 2019
  • Mathematica
    a[n_]:= If[n<4, 1, DivisorSigma[0, a[n-1]] + n]; Table[a[n], {n, 70}] (* modified by G. C. Greubel, Aug 31 2019 *)
    nxt[{n_,a_}]:={n+1,DivisorSigma[0,a]+n+1}; Join[{1,1},NestList[nxt,{3,1},70][[;;,2]]] (* Harvey P. Dale, Mar 28 2024 *)
  • PARI
    a(n) = if(n<4,1, numdiv(a(n-1)) + n); \\ G. C. Greubel, Aug 31 2019
    
  • Sage
    def a(n):
        if n<4: return 1
        else: return sigma(a(n-1), 0) + n
    [a(n) for n in (1..70)] # G. C. Greubel, Aug 31 2019