|
|
A284282
|
|
a(n) = the number k such that A030067(2k-1) = n, or 0 if n does not occur in the semi-Fibonacci sequence A030067.
|
|
2
|
|
|
0, 1, 2, 3, 0, 4, 5, 0, 0, 6, 0, 7, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 10, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Otherwise said, a(n) = round(m/2) = (m+1)/2, where m is the smallest index such that A030067(m) = n.
Any integer n which occurs in A030067 first occurs as an odd-indexed term A030067(2k-1) = A030068(k-1), and thereafter at indices (2k-1)*2^j, j=1,2,3,... (Both of these statements follow immediately from the definition of even-indexed terms of A030067.)
It is easy to see that no n can occur a second time as an odd-indexed term in A030067. This follows from the definition of these terms A030067(2k+1) = A030067(2k-1) + A030067(k), which shows that the subsequence of odd-indexed terms (A030068) is strictly increasing, and therefore equal to the range (or: set) of all semi-Fibonacci numbers.
Setting all nonzero terms to 1, this sequence is the characteristic function of A030068 (up to the offset).
|
|
LINKS
|
|
|
MATHEMATICA
|
a[n_] := a[n] = Which[n == 1, 1, EvenQ@ n, a[n/2], True, a[n - 1] + a[n - 2]]; With[{nn = 87}, Function[s, Function[t, {0}~Join~ReplacePart[t, Map[# -> First@ Lookup[s, #] &, TakeWhile[Keys@ s, # <= nn &]]]]@ ConstantArray[0, nn]]@ PositionIndex@ Array[a[2 # - 1] &, 10^3]] (* Michael De Vlieger, Mar 25 2017, Version 10, after Jean-François Alcover at A030067 *)
|
|
PROG
|
|
|
CROSSREFS
|
Cf. A030067 (semi-Fibonacci sequence), A030068 (bisection of odd-indexed terms, also equal to the range = set of all possible values or semi-Fibonacci numbers).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|