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.

A083237 First order recursion: a(0)=5; a(n)=prime(n)-a(n-1).

Original entry on oeis.org

5, -3, 6, -1, 8, 3, 10, 7, 12, 11, 18, 13, 24, 17, 26, 21, 32, 27, 34, 33, 38, 35, 44, 39, 50, 47, 54, 49, 58, 51, 62, 65, 66, 71, 68, 81, 70, 87, 76, 91, 82, 97, 84, 107, 86, 111, 88, 123, 100, 127, 102, 131, 108, 133, 118, 139, 124, 145, 126, 151, 130, 153, 140, 167, 144, 169, 148, 183, 154, 193, 156, 197, 162, 205, 168, 211, 172
Offset: 0

Views

Author

Labos Elemer, Apr 23 2003

Keywords

Comments

Same function as in A083236 but initial value = 5.

Crossrefs

Programs

  • Maple
    A083237 := proc(n)
        option remember ;
        if n = 0 then
            5 ;
        else
            ithprime(n)-procname(n-1) ;
        end if;
    end proc:
    seq(A083237(n),n=0..100) ; # R. J. Mathar, Jun 20 2021
  • Mathematica
    RecursionLimit$=10000; f[x_] := Prime[x]-f[x-1]; f[0]=5; Table[f[w], {w, 1, 100}]

Formula

Same implicit relationship: a(n-1)+a(n)=prime(n), the n-th prime;
It follows also that A001223(n)=a(n+1)-a(n-1).

Extensions

a(0) preprended. - R. J. Mathar, Jun 20 2021