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.

A285743 a(0) = 0, a(1) = 1; a(2*n) = prime(a(n)), a(2*n+1) = prime(a(n)+a(n+1)).

Original entry on oeis.org

0, 1, 2, 5, 3, 17, 11, 19, 5, 71, 59, 107, 31, 113, 67, 89, 11, 383, 353, 733, 277, 983, 587, 787, 127, 827, 617, 1069, 331, 911, 461, 541, 31, 2707, 2647, 5573, 2381, 8713, 5557, 8017, 1787, 10271, 7753, 13187, 4273, 11383, 6037, 7129, 709, 7529, 6353, 12049, 4549, 14389, 8581, 11657, 2221, 10111, 7109, 11353, 3259
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 25 2017

Keywords

Comments

A variation on Stern's diatomic sequence (A002487) and primeth recurrence (A007097).

Examples

			a(0) = 0;
a(1) = 1;
a(2) = a(2*1) = prime(a(1)) = prime(1) = 2;
a(3) = a(2*1+1) = prime(a(1)+a(2)) = prime(3) = 5;
a(4) = a(2*2) = prime(a(2)) = prime(2) = 3;
a(5) = a(2*2+1) = prime(a(2)+a(3)) = prime(7) = 17, etc.
		

Crossrefs

Programs

  • Maple
    A[0]:= 0: A[1]:= 1:
    for n from 1 to 50 do
      A[2*n]:= ithprime(A[n]);
      A[2*n+1]:= ithprime(A[n]+A[n+1]);
    od:
    seq(A[i],i=0..101); # Robert Israel, Apr 25 2017
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], Prime[a[n/2]], Prime[a[(n - 1)/2] + a[(n + 1)/2]]]; Table[a[n], {n, 0, 60}]

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
    

A141477 Sum of southeast diagonals of A141476.

Original entry on oeis.org

1, 1, 3, 7, 29, 129, 763, 5191
Offset: 0

Views

Author

Paul Curtz, Aug 09 2008

Keywords

Crossrefs

Cf. A082096.
Showing 1-3 of 3 results.