cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A061808 a(n) is the smallest number with all digits odd that is divisible by 2n-1.

This page as a plain text file.
%I A061808 #57 Mar 06 2025 11:06:16
%S A061808 1,3,5,7,9,11,13,15,17,19,315,115,75,135,319,31,33,35,37,39,533,559,
%T A061808 135,517,539,51,53,55,57,59,793,315,195,335,759,71,73,75,77,79,1377,
%U A061808 913,595,957,979,91,93,95,97,99,1111,515,315,535,1199,111,113,115,117,119,1331,1353,375,1397,1935
%N A061808 a(n) is the smallest number with all digits odd that is divisible by 2n-1.
%C A061808 From _Yang Haoran_, Dec 02 2017, edited by _M. F. Hasler_, Mar 05 2025: (Start)
%C A061808 Record value for a(n) = (2n-1) * A296009(n):
%C A061808    (1, 3, 5, ..., 19) * 1 = (1, 3, 5, ..., 19)
%C A061808    21 *  15 =    315
%C A061808    29 *  11 =    319
%C A061808    41 *  13 =    533
%C A061808    43 *  13 =    559
%C A061808    61 *  13 =    793
%C A061808    81 *  17 =   1377
%C A061808   127 *  11 =   1397
%C A061808   129 *  15 =   1935
%C A061808   149 *  13 =   1937
%C A061808   167 *  19 =   3173
%C A061808   169 *  33 =   5577
%C A061808   201 * 155 =  31155
%C A061808   299 * 105 =  31395
%C A061808   401 * 133 =  53333
%C A061808   601 * 119 =  71519
%C A061808   633 * 283 = 179139
%C A061808   (complete up to here)
%C A061808   ...
%C A061808   990001 * 12121113 = 11999913991113 (the first A296009(n) > 2n-1).
%C A061808 (End)
%C A061808 All terms must be odd. - _M. F. Hasler_, Mar 05 2025
%H A061808 Robert Israel, <a href="/A061808/b061808.txt">Table of n, a(n) for n = 1..10000</a>
%H A061808 Mathematical Excalibur, <a href="https://www.math.ust.hk/excalibur/v13_n1.pdf">Problem 300</a>, Vol. 1 No. 3 (2008), p. 3.
%F A061808 From  _M. F. Hasler_, Mar 05 2025: (Start)
%F A061808 a(n) = (2n-1)*A296009(n).
%F A061808 a(n) == 1 (mod 2) for all n. (End)
%p A061808 Ad[1]:= [1,3,5,7,9]:
%p A061808 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 A061808 Aod:= [seq(op(Ad[i]),i=1..9)]:
%p A061808 f:= proc(n) local k;
%p A061808    for k from 1 to nops(Aod) do
%p A061808        if Aod[k] mod (2*n-1) = 0 then return(Aod[k]) fi
%p A061808      od;
%p A061808      NotFound
%p A061808 end proc:
%p A061808 map(f, [$1..100]); # _Robert Israel_, Feb 15 2017
%t A061808 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 A061808 (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 A061808 (PARI) isoddd(n) = #select(x->((x%2) == 0), digits(n)) == 0;
%o A061808 a(n) = {my(m = 2*n-1, k = 1); while(!isoddd(k*m), k++); k*m;} \\ _Michel Marcus_, Sep 20 2019
%o A061808 (PARI) apply( {A061808(n)=forstep(k=n*2-1,oo,n*4-2,vecmin(digits(k)%2)&& return(k))}, [1..99])
%o A061808 (Python) A061808 = lambda n: next(m for m in range(2*n-1,9<<99,4*n-2) if all(int(d)&1 for d in str(m))) # _M. F. Hasler_, Mar 05 2025
%Y A061808 Cf. A061807, A014261.
%Y A061808 Equals A296009 * (2n-1).
%K A061808 base,nonn,look
%O A061808 1,2
%A A061808 _Amarnath Murthy_, May 28 2001
%E A061808 Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 30 2001