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.

Showing 1-3 of 3 results.

A082094 A 2nd-order recursion: a(1)=a(2)=1; a(n) = prime(a(n-1)) + primepi(a(n-2)) = A000040(a(n-1)) + A000720(a(n-2)).

Original entry on oeis.org

1, 1, 2, 3, 6, 15, 50, 235, 1498, 12592, 135431, 1806803, 29135476, 555971158, 12336554787, 313733168860, 9034347750986, 291579097035392, 10455240487002922, 413371595329570610
Offset: 1

Views

Author

Labos Elemer, Apr 11 2003

Keywords

Crossrefs

Programs

  • Magma
    a:= func< n | n lt 4 select Fibonacci(n) else NthPrime(Self(n-1)) + #PrimesUpTo(Self(n-2)) >;
    [a(n): n in [1..14]]; // G. C. Greubel, Aug 31 2019
  • Mathematica
    a[n_]:= a[n]= If[n<4, Fibonacci[n], Prime[a[n-1]] + PrimePi[a[n-2]]]; Table[a[n], {n,1,17}] (* modified by G. C. Greubel, Aug 31 2019 *)

Extensions

a(17) from G. C. Greubel, Aug 31 2019
a(18)-a(20) from Chai Wah Wu, Sep 18 2019

A082096 A 2nd order recursion: a(1)=a(2)=1; a(n) = prime(a(n-2)+a(n-1)) = A000040(a(n-2)+a(n-1)).

Original entry on oeis.org

1, 1, 3, 7, 29, 151, 1069, 9887, 115891, 1666421, 28700933, 580669933, 13578126713, 362075579539, 10886955278951, 365589325548857, 13598064388599629, 556220494250764093
Offset: 1

Views

Author

Labos Elemer, Apr 11 2003

Keywords

Crossrefs

Programs

  • Magma
    a:= func< n | n lt 3 select 1 else NthPrime(Self(n-1) + Self(n-2)) >;
    [a(n): n in [1..12]]; // G. C. Greubel, Aug 31 2019
  • Mathematica
    a[n_]:= a[n]= If[n<3, 1, Prime[a[n-1]+a[n-2]]]; Table[a[n], {n,13}] (* modified by G. C. Greubel, Aug 31 2019 *)
    nxt[{a_,b_}]:={b,Prime[a+b]}; Transpose[NestList[nxt,{1,1},13]][[1]] (* Harvey P. Dale, Oct 02 2013 *)

Extensions

a(15) from G. C. Greubel, Aug 31 2019
a(16)-a(18) from Chai Wah Wu, Sep 18 2019

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
    
Showing 1-3 of 3 results.