login
A277549
Numbers k such that k/4^m == 1 (mod 4), where 4^m is the greatest power of 4 that divides k.
3
1, 4, 5, 9, 13, 16, 17, 20, 21, 25, 29, 33, 36, 37, 41, 45, 49, 52, 53, 57, 61, 64, 65, 68, 69, 73, 77, 80, 81, 84, 85, 89, 93, 97, 100, 101, 105, 109, 113, 116, 117, 121, 125, 129, 132, 133, 137, 141, 144, 145, 148, 149, 153, 157, 161, 164, 165, 169, 173
OFFSET
1,2
COMMENTS
Positions of 1 in A065882.
This is one sequence in a 3-way splitting of the positive integers; the other two are A036554 and A055050, as in the Mathematica program.
The asymptotic density of this sequence is 1/3. - Amiram Eldar, Mar 08 2021
MAPLE
filter:= n -> n/2^(2*floor(padic:-ordp(n, 2)/2)) mod 4 = 1:
select(filter, [$1..1000]); # Robert Israel, Oct 20 2016
MATHEMATICA
z = 160; a[b_] := Table[Mod[n/b^IntegerExponent[n, b], b], {n, 1, z}];
p[b_, d_] := Flatten[Position[a[b], d]];
p[4, 1] (* A277549 *)
p[4, 2] (* A036554 *)
p[4, 3] (* A055050 *)
PROG
(PARI) isok(n) = n/4^valuation(n, 4) % 4 == 1; \\ Michel Marcus, Oct 20 2016
(Python)
from itertools import count, islice
def A277549_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:(n>>((~n&n-1).bit_length()&-2))&3==1, count(max(startvalue, 1)))
A277549_list = list(islice(A277549_gen(), 30)) # Chai Wah Wu, Jul 09 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 20 2016
STATUS
approved