login
A086911
a(n) = abs(prime(n)-a(n-1)) + abs(prime(n)-a(n-2)).
0
1, 1, 8, 7, 7, 12, 15, 11, 20, 27, 15, 32, 35, 19, 40, 47, 31, 44, 59, 39, 48, 71, 47, 60, 87, 55, 64, 95, 59, 72, 123, 67, 84, 127, 87, 88, 139, 99, 96, 151, 111, 100, 171, 115, 108, 175, 139, 132, 183, 143, 140, 195, 147, 160, 207, 159, 172, 211, 171, 180, 215, 191
OFFSET
1,3
MATHEMATICA
RecurrenceTable[{a[1]==a[2]==1, a[n]==Abs[Prime[n]-a[n-1]]+Abs[Prime[n]- a[n-2]]}, a, {n, 70}] (* Harvey P. Dale, Oct 05 2012 *)
CROSSREFS
Cf. A005185.
Sequence in context: A177218 A342374 A319462 * A327854 A263179 A180311
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 24 2003
STATUS
approved