|
|
A225850
|
|
Inverse of permutation in A167151.
|
|
8
|
|
|
0, 1, 2, 3, 4, 6, 8, 5, 10, 12, 14, 16, 7, 18, 20, 22, 24, 26, 9, 28, 30, 32, 34, 36, 38, 40, 11, 42, 44, 46, 48, 50, 52, 54, 56, 13, 58, 60, 62, 64, 66, 68, 70, 72, 74, 15, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 17, 96, 98, 100, 102, 104, 106, 108, 110, 112
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
nmax = 100; A5228 = {1};
Module[{d = 2, k = 1}, Do[While[MemberQ[A5228, d], d++]; k += d; d++; AppendTo[A5228, k], {n, 1, nmax}]];
a46[n_] := For[k = 1, True, k++, If[A5228[[k]] > n, Return[k - 1]]];
a47[n_] := If[n == 1, 1, a46[n] (a46[n] - a46[n - 1])];
a48[n_] := a48[n] = If[n == 1, 0, a48[n-1] + (1 - (a46[n] - a46[n-1]))];
a49[n_] := If[n == 1, 0, a48[n] (a48[n] - a48[n - 1])];
a[n_] := If[n < 3, n, 2 (a47[n] + a49[n]) - (a46[n] - a46[n - 1])];
|
|
PROG
|
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a225850 = fromJust . (`elemIndex` a167151_list)
(Scheme)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|