login
A182991
Numbers with property that their divisors are odd, even, odd, even, and so on.
3
1, 2, 6, 10, 14, 18, 22, 26, 34, 38, 42, 46, 50, 54, 58, 62, 66, 74, 78, 82, 86, 94, 98, 102, 106, 110, 114, 118, 122, 130, 134, 138, 142, 146, 158, 162, 166, 170, 174, 178, 186, 190, 194, 202, 206, 214, 218, 222, 226, 230, 238, 242, 246, 250, 254, 258, 262
OFFSET
1,2
COMMENTS
Are there terms that are not congruent to 2 (mod 4) for n > 1?
Answer from R. J. Mathar, Jul 21 2013: (Start)
For an odd number C to be in the sequence, the divisors must be odd, even, odd,..,odd. So only C=1 is possible, because odd numbers do not have even divisors. This excludes numbers ==1 (mod 4) and == 3 (mod 4) from the sequence (with 1 the only exception).
If some number C (a candidate for the sequence) is a multiple of 4, C=4*k, it surely has divisors {1, 2, 3, 4 , ..., k, ..., 2k, 4k} because 1, 2 and 4 are divisors (also 3 sandwiched between 2 and 4). The two largest divisors would be 2k and 4k, both even, and this violates the odd-even rule. So no C ==0 (mod 4) exists in the sequence, and the sequence contains 1 plus a subsequence of A016825.
(End)
LINKS
EXAMPLE
18 is in the sequence because its divisors are 1, 2, 3, 6, 9, 18 and then we can see that 1 is odd, 2 is even, 3 is odd, 6 is even, 9 is odd and 18 is even.
MATHEMATICA
OddEvenQ[a_List] := Module[{b = Mod[a, 2]}, Union[b[[1 ;; ;; 2]]] == {1} && Union[b[[2 ;; ;; 2]]] == {0}]; Join[{1}, Select[Range[2, 400], OddEvenQ[Divisors[#]] &]] (* T. D. Noe, Aug 04 2011 *)
oeQ[n_]:=Module[{c=Boole[OddQ[Divisors[n]]]}, c==PadRight[{}, Length[c], {1, 0}]]; Select[Range[300], oeQ] (* Harvey P. Dale, Jul 10 2016 *)
PROG
(Haskell)
a182991 n = a182991_list !! (n-1)
a182991_list = filter f [1..] where
f x = all (== 1) $ zipWith (+) dps $ tail dps where
dps = map (flip mod 2) $ a027750_row' x
-- Reinhard Zumkeller, Jun 23 2015, Aug 04 2011
(PARI) isok(n) = my(d = divisors(n)) ; sum(i=1, #d, (d[i]%2) == (i%2)) == #d; \\ Michel Marcus, May 18 2014
CROSSREFS
Cf. A027750.
Sequence in context: A103747 A333662 A290490 * A278568 A250198 A260084
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Aug 04 2011
STATUS
approved