OFFSET
1,1
COMMENTS
Start with prime numbers, their differences and the absolute values of their differences:
2,.3,.5,.7,.11,.13,.17,.19,.23,.29
..1..2..2..4...2...4...2...4...6
....1..0..2..2...2...2...2...2
and sum the triangles:
a(1)=..2,3,5. = 2+3+5+1+2+1 = 14
........1,2
.........1
a(2)=..3,5,7. = 3+5+7+2+2+0 = 19
........2,2
.........0
etc.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
difs[n_]:=Total[Flatten[{n, Abs[Differences[n]], Abs[Differences[n, 2]]}]]; difs/@Partition[Prime[Range[60]], 3, 1] (* Harvey P. Dale, Dec 19 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jorge Coveiro, Apr 14 2004
EXTENSIONS
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 24 2004
STATUS
approved