A343336 Factors of alternators which produce least alternating proper multiples.
2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 11, 3, 4, 4, 2, 2, 2, 2, 2, 0, 3, 19, 3, 3, 2, 2, 2, 2, 2, 3, 11, 3, 5, 7, 2, 2, 2, 2, 2, 0, 3, 5, 3, 14, 2, 2, 2, 2, 2, 5, 11, 8, 4, 4, 3, 11, 8, 4, 4, 0, 3, 7, 3, 4, 5, 13, 10, 4, 4, 3, 11, 3, 4, 4, 6, 6, 5, 3, 6, 0, 7, 5, 6, 3, 9, 3, 8, 7, 10
Offset: 1
Examples
a(14) = 4 because the successive proper multiples of 14 are 28, 42 that are not alternating, then, 4*14 = 56 is alternating because 5 is odd and 6 is even.
Links
- The IMO Compendium, Problem 6, 45th IMO 2004.
Programs
-
Maple
f:= proc(n) local k,L; if n mod 20 = 0 then return 0 fi; if n <= 4 then return 2 fi; for k from 2 do L:= convert(k*n,base,10) mod 2; if convert(L[1..-2]+L[2..-1],set) = {1} then return k fi; od end proc: map(f, [$1..100]); # Robert Israel, Apr 15 2021
-
Mathematica
altQ[n_] := (r = Mod[IntegerDigits[n], 2]) == Split[r, UnsameQ][[1]]; a[n_] := If[Divisible[n, 20], 0, Module[{k = 2*n}, While[! altQ[k], k += n]; k/n]]; Array[a, 100] (* Amiram Eldar, Apr 15 2021 *)
Formula
a(n) >= A110305(n).
Extensions
Name edited by Michel Marcus, May 12 2021
Comments