login
A025512
Index of n-th 2 in A022300.
2
3, 5, 8, 11, 13, 14, 16, 19, 22, 23, 25, 26, 28, 31, 33, 34, 37, 40, 41, 43, 44, 46, 49, 52, 53, 55, 58, 60, 61, 64, 67, 68, 70, 71, 73, 76, 78, 79, 82, 85, 87, 88, 90, 91, 94, 96, 97, 99, 102, 103, 105, 106, 109, 112, 114, 115, 117, 118, 121, 123, 124, 126, 129, 132, 133, 135
OFFSET
1,1
LINKS
MAPLE
N:= 10^3: # to get all terms <= N
B:= Vector(N):
B[1..4]:= <1, 1, 2, 1>:
m:= 4: t:= 2:
for n from 1 while m < N do
t:= 3-t;
B[m]:= t;
if B[n] = 2 and m+1 < N then
B[m+1]:= t; m:= m+2
else m:= m+1
fi
od:
select(t -> B[t]=2, [$1..N]); # Robert Israel, Nov 02 2016
CROSSREFS
Sequence in context: A184332 A326711 A050098 * A288474 A310026 A213732
KEYWORD
nonn
STATUS
approved