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.

Showing 1-3 of 3 results.

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

A350536 a(n) is the smallest proper multiple of 2n+1 which contains only odd digits, or -1 if no such multiple exists.

Original entry on oeis.org

3, 9, 15, 35, 99, 33, 39, 75, 51, 57, 315, 115, 75, 135, 319, 93, 99, 175, 111, 117, 533, 559, 135, 517, 539, 153, 159, 715, 171, 177, 793, 315, 195, 335, 759, 355, 511, 375, 539, 395, 1377, 913, 595, 957, 979, 1911, 1395, 1995, 3395, 9999, 1111, 515, 315, 535, 1199, 333
Offset: 0

Views

Author

Bernard Schott, Jan 04 2022

Keywords

Comments

Generalization of the problem 1/2 of International Mathematical Talent Search, round 2 (see link and 2nd example).
If the escape clause is used, it will be necessarily for terms coming from n = 12 + 25*k, k >= 0.

Examples

			a(10) = 315 = 21 * 15 is the smallest multiple of 21 which contains only odd digits.
a(4998) = 33339995 = 9997 * 3335 is the smallest multiple of 9997 which contains only odd digits, so this is the answer to the IMTS problem.
		

Crossrefs

Terms belong to A014261.

Programs

  • Mathematica
    a[n_] := Module[{m = 2*n + 1, k}, k = 3*m; While[!AllTrue[IntegerDigits[k], OddQ], k += 2*m]; k]; Array[a, 50, 0] (* Amiram Eldar, Jan 04 2022 *)
  • PARI
    isok(k) = my(d=digits(k)); #d == #select(x->((x%2)==1), d);
    a(n) = my(k=6*n+3); while (!isok(k), k+=4*n+2); k; \\ Michel Marcus, Jan 04 2022
    
  • Python
    from itertools import product, count
    def A350536(n):
        m = 2*n+1
        for l in count(len(str(m))):
            for s in product('13579',repeat=l):
                k = int(''.join(s))
                if k > m and k % m == 0:
                    return k # Chai Wah Wu, Jan 11 2022

Extensions

More terms from Michel Marcus, Jan 04 2022

A350537 Smallest number m > 1 such that (2n+1)*m = A350536(n) contains only odd digits.

Original entry on oeis.org

3, 3, 3, 5, 11, 3, 3, 5, 3, 3, 15, 5, 3, 5, 11, 3, 3, 5, 3, 3, 13, 13, 3, 11, 11, 3, 3, 13, 3, 3, 13, 5, 3, 5, 11, 5, 7, 5, 7, 5, 17, 11, 7, 11, 11, 21, 15, 21, 35, 101, 11, 5, 3, 5, 11, 3, 3, 5, 3, 3, 11, 11, 3, 11, 15, 3, 3, 13, 7, 7, 11, 5, 11, 5, 13, 5, 9, 5, 47, 5
Offset: 0

Views

Author

Bernard Schott, Jan 12 2022

Keywords

Comments

Record values of a(n) are 3, 5, 11, 15, 17, 21, 35, 101, 155, ...

Examples

			The smallest proper multiple of 21 = 2*10+1 with only odd digits is A350536(10) = 315, as 315 = 21 * 15, a(10) = 15.
		

Crossrefs

Programs

  • Mathematica
    Table[m=2;While[Or@@EvenQ[IntegerDigits[(2n+1)*++m]]];m,{n,0,79}] (* Giorgos Kalogeropoulos, Jan 12 2022 *)
  • PARI
    isok(k) = my(d=digits(k)); #d == #select(x->((x%2)==1), d);
    a(n) = my(k=6*n+3); while (!isok(k), k+=4*n+2); k/(2*n+1); \\ Michel Marcus, Jan 12 2022

Formula

a(n) = A350536(n) / (2n+1).

Extensions

More terms from Michel Marcus, Jan 12 2022
Showing 1-3 of 3 results.