login
A087657
a(n) = abs(prime(n)-a(n-1)) + abs(prime(n)-a(n-2)) + abs(prime(n)-a(n-3))
1
1, 1, 12, 17, 17, 9, 8, 23, 29, 27, 14, 41, 41, 33, 26, 59, 59, 39, 44, 71, 65, 57, 56, 89, 89, 69, 62, 101, 95, 81, 104, 113, 113, 87, 134, 119, 131, 105, 146, 137, 149, 111, 176, 143, 161, 117, 212, 179, 173, 123, 224, 197, 179, 153, 242, 215, 197, 159, 260, 227, 203
OFFSET
1,3
MATHEMATICA
digits=200 P[n_Integer?Positive] := P[n] =Abs[Prime[n]-P[n-1]]+Abs[Prime[n]-P[n-2]]+Abs[Prime[n]-P[n-3]] P[0]=P[1] =P[2]=1 a1=Table[Floor[P[n]], {n, 1, digits}]
CROSSREFS
Cf. A004001.
Sequence in context: A264492 A264485 A278034 * A248478 A059390 A179243
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 26 2003
STATUS
approved