A 'Recaman' on the primes

Neil Fernandez primeness at borve.demon.co.uk
Tue Sep 25 20:36:39 CEST 2001


A 'Recaman transform' on the primes yields a sequence where
a(1) = p(1) = 2, and a(n) = a(n-1)-p(n) if positive and new, otherwise
a(n) = a(n-1)+p(n).

The sequence runs:
2, 5, 10, 3, 14, 1, 18, 37, 60, 31, 62, 25, 66, 23, 70, 17, 76, 15, 82,
11, 84, 163, 80, 169, 72, 173, 276, 383, 274, 161, 34, 165, 28, 167,
316, 467, 310, 147, 314, 141, 320, 139, 330, 137, 334, 135, 346, 123,
350, 121, ...

(Note: this is similar to Clark Kimberling's A022831, with the added
requirement that there be no repeated terms - in other words, A022831
has the above definition with the words 'and new' deleted).

I haven't got access to great number-crunching capability. Have got list
of the first 10^4 terms only. Indices of terms in which n appears are:

6, 1, 4, ?, 2, ?, ?, 879, ?, 3, 20, ?, ?, 5, 18, ?, 16, 7, ?, ?, ?, ?,
14, ?, 12, ?, ?, 33, ?, ?, 10, ?, 82, 31, 80, ?, 8, 875, ?, 4615, ?, ?,
78, ?, ?, ?, ?, ?, ?, ?, 76, ?, ?, 4613, 74, ?, ?, ?, ?, 9, ...

Are there some values of n that do not occur at all?

Have submitted the first sequence to the OEIS. Would be grateful for
some number-crunching help with the second sequence!

Best regards,

Neil
-- 
Dr Neil C Fernandez





More information about the SeqFan mailing list