login
Numbers k such that A005132(k-1) = k.
5

%I #37 Jan 09 2021 21:04:09

%S 3,11,39,248,844,2752,57071,58056875

%N Numbers k such that A005132(k-1) = k.

%C Subtracting 1 from k gives the index of a term A005132(k-1) = k in Recamán's sequence A005132 such that subtracting k would reach 0. This is not permitted, so we must add k instead, obtaining A005132(k) = 2*k.

%C If A005132(k-1) = k, A005132(k) = 2*k. The converse is not always true. For example, A005132(75) = 228 and A005132(76) = 228 - 76 = 152. - _Seiichi Manyama_, May 02 2020

%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>

%e A005132(10)=11, so 11 is a term (and A005132(11)=22).

%o (Python)

%o A333548_list, A005132_set, y = [], {0}, 0

%o for n in range(1,10**10):

%o y -= n

%o if y <= 0 or y in A005132_set:

%o y += 2*n

%o A005132_set.add(y)

%o if y == n+1:

%o A333548_list.append(y) # _Chai Wah Wu_, May 02 2020

%Y Cf. A005132, A064568, A064569, A187921, A187922, A331659.

%K nonn,more

%O 1,1

%A _N. J. A. Sloane_, May 01 2020

%E a(8) from _Chai Wah Wu_, May 02 2020