OFFSET
1,1
COMMENTS
LINKS
V. Shevelev, Several results on sequences which are similar to the positive integers, arXiv:0904.2101 [math.NT], 2009.
FORMULA
EXAMPLE
MATHEMATICA
a35263[n_] := 1 - Mod[IntegerExponent[n, 2], 2];
a[1] = 3; a[n_] := a[n] = For[k = a[n - 1] + 1, True, k++, If[a35263[k] == a35263[n], Return[k]]];
Array[a, 66] (* Jean-François Alcover, Jul 28 2018 *)
PROG
(PARI) is(n) = valuation(n, 2)%2==0; \\ A003159
nexta(a, n) = {my(k=a+1, isn = is(n)); while (is(k) != isn, k++); k; };
lista(nn) = {my(a = 3); print1(a, ", "); for (n=2, nn, a = nexta(a, n); print1(a, ", "); ); } \\ Michel Marcus, Dec 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 04 2009
EXTENSIONS
Edited by R. J. Mathar, May 08 2009
STATUS
approved