

A274648


A variation on Recamán's sequence (A005132): a(n) is the first positive number of the form a(n1)n*k, k>0 not already in the sequence; and if no such number exits, then a(n) is the first number of the form a(n1)+n*k, k>0 not already in the sequence.


3



0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 5, 45, 66, 44, 67, 19, 69, 17, 71, 15, 73, 103, 72, 40, 106, 38, 108, 36, 110, 34, 112, 32, 114, 30, 116, 28, 118, 26, 120, 168, 119, 169, 16, 68, 121, 175, 65, 177, 63, 179, 61, 181, 59, 183
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Is this a permutation of the natural numbers?
The inverse is: 0, 1, 4, 2, 164, 19, 3, 5, 16, 14, 12, 10, 8, 6, 8228, 28, 51, 26, 158, 24, 7, 9, 11, 13, 15, 17, 46, 90, ..., . Robert G. Wilson v, Sep 07 2016
After 3.2*10^11 terms, the smallest number which has not appeared is 154.  Benjamin Chaffin, Oct 05 2016


LINKS

Robert G. Wilson v, Table of n, a(n) for n = 0..10000
Index entries for sequences related to Recamán's sequence


MATHEMATICA

f[s_List] := Block[{k = 1, l = s[[1]], n = Length@ s}, While[ MemberQ[s, l  k*n] && l > k*n, k++]; If[l > k*n, Append[s, l  k*n], k = 1; While[ MemberQ[s, l + k*n], k++]; Append[s, l + k*n]]]; Nest[f, {0}, 60] (* Robert G. Wilson v, Sep 07 2016 *)


CROSSREFS

Cf. A273148 (inverse), A005132, A274647 (another variant).
Sequence in context: A065232 A074170 A076543 * A277558 A005132 A064388
Adjacent sequences: A274645 A274646 A274647 * A274649 A274650 A274651


KEYWORD

nonn


AUTHOR

Max Barrentine, Aug 12 2016


STATUS

approved



