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.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 315, 115, 75, 135, 319, 31, 33, 35, 37, 39, 533, 559, 135, 517, 539, 51, 53, 55, 57, 59, 793, 315, 195, 335, 759, 71, 73, 75, 77, 79, 1377, 913, 595, 957, 979, 91, 93, 95, 97, 99, 1111, 515, 315, 535, 1199, 111, 113, 115, 117, 119, 1331, 1353, 375, 1397, 1935
Offset: 1

Views

Author

Amarnath Murthy, May 28 2001

Keywords

Comments

From Yang Haoran, Dec 02 2017, edited by M. F. Hasler, Mar 05 2025: (Start)
Record value for a(n) = (2n-1) * A296009(n):
(1, 3, 5, ..., 19) * 1 = (1, 3, 5, ..., 19)
21 * 15 = 315
29 * 11 = 319
41 * 13 = 533
43 * 13 = 559
61 * 13 = 793
81 * 17 = 1377
127 * 11 = 1397
129 * 15 = 1935
149 * 13 = 1937
167 * 19 = 3173
169 * 33 = 5577
201 * 155 = 31155
299 * 105 = 31395
401 * 133 = 53333
601 * 119 = 71519
633 * 283 = 179139
(complete up to here)
...
990001 * 12121113 = 11999913991113 (the first A296009(n) > 2n-1).
(End)
All terms must be odd. - M. F. Hasler, Mar 05 2025

Crossrefs

Equals A296009 * (2n-1).

Programs

  • 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
    
  • Maple
    Ad[1]:= [1,3,5,7,9]:
    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:
    Aod:= [seq(op(Ad[i]),i=1..9)]:
    f:= proc(n) local k;
       for k from 1 to nops(Aod) do
           if Aod[k] mod (2*n-1) = 0 then return(Aod[k]) fi
         od;
         NotFound
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 15 2017
  • Mathematica
    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 *)
  • PARI
    isoddd(n) = #select(x->((x%2) == 0), digits(n)) == 0;
    a(n) = {my(m = 2*n-1, k = 1); while(!isoddd(k*m), k++); k*m;} \\ Michel Marcus, Sep 20 2019
    
  • PARI
    apply( {A061808(n)=forstep(k=n*2-1,oo,n*4-2,vecmin(digits(k)%2)&& return(k))}, [1..99])
    
  • 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

Formula

From M. F. Hasler, Mar 05 2025: (Start)
a(n) = (2n-1)*A296009(n).
a(n) == 1 (mod 2) for all n. (End)

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 30 2001