login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A269968
Index of first occurrence of n in A269783.
3
0, 2, 8, 12, 25, 32, 36, 60, 71, 76, 80, 119, 134, 143, 148, 152, 210, 231, 242, 249, 254, 258, 339, 366, 381, 392, 399, 404, 408, 516, 549, 568, 581, 590, 597, 602, 606, 745, 786, 811, 826, 839, 848, 855, 860, 864, 1038, 1085, 1114, 1135, 1150, 1161, 1170
OFFSET
0,2
COMMENTS
Sequence A269783 is defined by A269783(0)=0 and A269783(n+1) = A269783(n) + (-1)^(k+e)*floor(k/2), where k = #{ j<=n | A269783(j)=A269783(n) } and e=1 for A269783(n)>0, else e=0. That is, the 1st, 2nd, 3rd, 4th... occurrence of any positive integer n is followed by n resp. n-1 resp. n+1 resp. n-2, etc., and for zero or negative integers the same with opposite sign.
LINKS
Rémy Sigrist, PARI program
PROG
(PARI) See Links section.
CROSSREFS
Cf. A269783 (main sequence), A269967 (indices of zeros), A269969 (index of first occurrence of -n).
Sequence in context: A359964 A277804 A108978 * A135957 A107755 A268836
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 08 2016
EXTENSIONS
More terms from Rémy Sigrist, May 21 2023
STATUS
approved