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.

A259622 Primeth recurrence: a(n) = (a(n-1)+a(n-2))-th prime, with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 2, 5, 17, 79, 503, 4243, 45823, 612809, 9903031, 189244327, 4203344543, 106963067069, 3081230793857, 99460155441599, 3566360917197283, 140987300677114811, 6104597616658111069, 287835273618906460259
Offset: 0

Views

Author

Christopher Halverson, Jul 01 2015

Keywords

Programs

  • Mathematica
    RecurrenceTable[{a[n] == Prime[a[n - 1] + a[n - 2]], a[0] == 0,
    a[1] == 1}, a, {n, 0, 14}] (* Michael De Vlieger, Jul 01 2015 *)
  • PARI
    a(n)=if(n<3,n,prime(a(n-1)+a(n-2))) \\ Charles R Greathouse IV, Jul 13 2015
    
  • PARI
    main(size)={my(v=vector(size),i);v[1]=0;v[2]=1;for(i=3,size,v[i]=prime(v[i-1]+v[i-2]));return(v);} /* Anders Hellström, Jul 13 2015 */
    
  • Perl
    use bignum;
    use Math::Prime::Util ':all';
    $|=1;
    my $a=0, $b=1;
    while(1){
      ($a,$b)=($b,nth_prime($a+$b));
      print("$b, ")
    } # Charles R Greathouse IV, Jul 13 2015

Extensions

a(7)-a(14) from Michael De Vlieger, Jul 01 2015
a(15)-a(18) from Charles R Greathouse IV, Jul 13 2015
a(19) from Charles R Greathouse IV, Jul 14 2015