login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A064829
Smallest number greater than 1 which ends in an odd digit in bases 2 through n.
0
3, 7, 7, 13, 13, 31, 31, 43, 43, 73, 73, 271, 271, 271, 271, 313, 313, 313, 313, 313, 313, 421, 421, 421, 421, 1303, 1303, 1303, 1303, 1303, 1303, 23563, 23563, 35803, 35803, 187003, 187003, 187003, 187003, 936703, 936703, 1426003, 1426003, 1426003, 1426003
OFFSET
2,1
EXAMPLE
13 = 1101 in base 2, 231 in base 3, 31 in base 4, 23 in base 5, 21 in base 6 but 16 in base 7, so 13 ends in an odd digit from bases 2 to 6.
MAPLE
a:= proc(n) option remember; local k; for k by 2 from `if`(n=2, 3,
a(n-1)) while ormap(b-> irem(k, b)::even, [$2..n]) do od; k
end:
seq(a(n), n=2..52); # Alois P. Heinz, Jul 30 2023
MATHEMATICA
a[n_] := Module[{k = 3}, While[!AllTrue[Range[2, n], OddQ[Mod[k, #]] &], k += 2]; k]; Array[a, 45, 2] (* Amiram Eldar, Jul 30 2023 *)
CROSSREFS
Sequence in context: A073881 A137315 A139795 * A290649 A118259 A060845
KEYWORD
base,nonn
AUTHOR
Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 23 2001
EXTENSIONS
Data corrected by Sean A. Irvine, Jul 30 2023
STATUS
approved