login
A086910
a(1)=1; a(n) = 1 + abs(prime(n) - a(n-1)).
0
1, 3, 3, 5, 7, 7, 11, 9, 15, 15, 17, 21, 21, 23, 25, 29, 31, 31, 37, 35, 39, 41, 43, 47, 51, 51, 53, 55, 55, 59, 69, 63, 75, 65, 85, 67, 91, 73, 95, 79, 101, 81, 111, 83, 115, 85, 127, 97, 131, 99, 135, 105, 137, 115, 143, 121, 149, 123, 155, 127, 157, 137, 171, 141, 173, 145
OFFSET
1,2
MATHEMATICA
nxt[{n_, a_}]:={n+1, 1+Abs[Prime[n+1]-a]}; NestList[nxt, {1, 1}, 70][[All, 2]] (* Harvey P. Dale, Jan 11 2019 *)
CROSSREFS
Sequence in context: A168053 A222657 A050826 * A101300 A172290 A076524
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 24 2003
STATUS
approved