OFFSET
1,1
COMMENTS
a(n+1) - a(n) = 2 or 4 for all n >= 1. See A067395 for the sequence of differences.
From Jianing Song, Sep 21 2018: (Start)
Numbers of the form 2^(3t+1)*s where s is an odd number.
Also positions of 1 in A191255. (End)
The asymptotic density of this sequence is 2/7. - Amiram Eldar, May 31 2024
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Conjecture: a(n) = a(n-1) + 2 if (n = 2a(k) + k + 1) or (n = 2a(k) + k) for some k, otherwise a(n) = a(n-1) + 4. This has been confirmed for several hundred terms.
The above conjecture is correct because there are 2*(a(k+1)-a(k)) terms that are not divisible by 4 in the k-th interval which are determined by terms that are divisible by 4. For example, there are 2*(a(2)-a(1)) = 2*(6-2) = 8 terms between a(5) = 16 and a(14) = 48 because numbers of the form 2*s are always terms where s is an odd number. So first differences of a(n) determine the corresponding intervals and the formula above always holds. - Altug Alkan, Sep 24 2018
EXAMPLE
8 = 2*2*2, but 10 = 2*5 cannot be expressed with factors 2 and 6, so a(3) = 10.
MAPLE
N:= 1000:
A:= {seq(seq(2^(3*k+1)*s, s=1..N/2^(3*k+1), 2), k=0..floor(log[2](N/2)/3))}:
sort(convert(A, list)); # Robert Israel, Jul 23 2019
MATHEMATICA
t = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 3}, 3 -> {0, 1}}] &, {0}, 9] (* A191255 *)
Flatten[Position[t, 0]] (* A005408, the odds *)
a = Flatten[Position[t, 1]] (* this sequence *)
b = Flatten[Position[t, 2]] (* A213258 *)
a/2 (* A191257 *)
b/4 (* a/2 *)
(* Clark Kimberling, May 28 2011 *)
PROG
(PARI) isok(n) = valuation(n, 2)%3==1; \\ Altug Alkan, Sep 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeremiah K. Hower (jhower(AT)vt.edu), Jan 20 2002
EXTENSIONS
Edited by John W. Layman, Jan 23 2002
STATUS
approved