%I #50 Sep 08 2022 08:45:03
%S 1,3,5,7,9,11,13,15,17,19,315,115,75,135,319,31,33,35,37,39,533,559,
%T 135,517,539,51,53,55,57,59,793,315,195,335,759,71,73,75,77,79,1377,
%U 913,595,957,979,91,93,95,97,99,1111,515,315,535,1199,111,113,115,117
%N a(n) is the smallest number with all digits odd that is divisible by 2n-1.
%C From _Yang Haoran_, Dec 02 2017: (Start)
%C Record value for a(n) = (2n-1) * A296009(n).
%C (1, 3, 5, ..., 19) * 1 = (1, 3, 5, ..., 19)
%C 21 * 15 = 315
%C 29 * 11 = 319
%C 41 * 13 = 533
%C 43 * 13 = 559
%C 61 * 13 = 793
%C 81 * 17 = 1377
%C 127 * 11 = 1397
%C 129 * 15 = 1935
%C 149 * 13 = 1937
%C 167 * 19 = 3173
%C 169 * 33 = 5577
%C 201 * 155 = 31155
%C 299 * 105 = 31395
%C 401 * 133 = 53333
%C 601 * 119 = 71519
%C 633 * 283 = 179139
%C (the list above is complete)
%C ...
%C 990001 * 12121113 = 11999913991113 (the first A296009(n) > 2n-1).
%C (End)
%H Robert Israel, <a href="/A061808/b061808.txt">Table of n, a(n) for n = 1..10000</a>
%H Mathematical Excalibur, <a href="https://www.math.ust.hk/excalibur/v13_n1.pdf"> Problem 300</a>, Vol. 1 No. 3 p. 3, 2008.
%p Ad[1]:= [1,3,5,7,9]:
%p for n from 2 to 9 do Ad[n]:= map(t -> seq(10*t+j,j=[1,3,5,7,9]), Ad[n-1]) od:
%p Aod:= [seq(op(Ad[i]),i=1..9)]:
%p f:= proc(n) local k;
%p for k from 1 to nops(Aod) do
%p if Aod[k] mod (2*n-1) = 0 then return(Aod[k]) fi
%p od;
%p NotFound
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Feb 15 2017
%t Table[Block[{k = 2 n - 1}, While[Nand[AllTrue[IntegerDigits@ k, OddQ], Divisible[k, 2 n - 1]], k += 2]; k], {n, 59}] (* _Michael De Vlieger_, Dec 02 2017 *)
%o (Magma) a:=[]; for n in [1..120 by 2] do k:=1; while not Set(Intseq(n*k)) subset {1,3,5,7,9} do k:=k+2; end while; Append(~a,k*n); end for; a; // _Marius A. Burtea_, Sep 20 2019
%o (PARI) isoddd(n) = #select(x->((x%2) == 0), digits(n)) == 0;
%o a(n) = {my(m = 2*n-1, k = 1); while(!isoddd(k*m), k++); k*m;} \\ _Michel Marcus_, Sep 20 2019
%Y Cf. A061807, A014261.
%Y Equals A296009 * (2n-1).
%K base,nonn,look
%O 1,2
%A _Amarnath Murthy_, May 28 2001
%E Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 30 2001