|
|
A051203
|
|
Least inverse of A005210.
|
|
2
|
|
|
3, 1, 4, 5, 35, 10, 8, 26, 15, 38, 20, 13, 55, 78, 27, 70, 68, 53, 36, 282, 44, 73, 75, 69, 64, 34, 32, 585, 51, 30, 139, 165, 72, 121, 535, 97, 83, 253, 67, 469, 168, 61, 147, 146, 59, 93, 123, 286, 815, 1398, 112, 294, 119, 129, 347, 138, 124, 81, 144, 194, 256, 142
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
It seems likely that every number eventually appears in A005210, so this sequence is probably well-defined. - N. J. A. Sloane, Apr 16 2015
|
|
REFERENCES
|
Popular Computing (Calabasas, CA), Z-Sequences, Vol. 4 (No. 42, Sep 1976), pp. 12-16.
|
|
LINKS
|
Popular Computing (Calabasas, CA), Z-Sequences, continued. Annotated and scanned copy of pages 14, 15, 16, 18 of Vol. 5 (No. 56, Nov 1977).
|
|
MAPLE
|
b:= proc(n) option remember;
`if`(n<3, 1, abs(b(n-1)+2*b(n-2)-n))
end:
a:= proc() local t, a; t, a:= 0, proc() -1 end;
proc(n) local h;
while a(n) = -1 do
t:= t+1; h:= b(t);
if a(h) = -1 then a(h):= t fi
od; a(n)
end
end():
|
|
MATHEMATICA
|
nMax = 100; bMax = 2000;
b[n_] := b[n] = If[n < 3, 1, Abs[b[n-1] + 2*b[n-2] - n]];
a[n_] := (For[k = 1, k <= bMax, k++, If[b[k] == n, Return[k]]]; -1);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|