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.

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

This page as a plain text file.
%I A350536 #45 Jan 12 2022 01:02:06
%S A350536 3,9,15,35,99,33,39,75,51,57,315,115,75,135,319,93,99,175,111,117,533,
%T A350536 559,135,517,539,153,159,715,171,177,793,315,195,335,759,355,511,375,
%U A350536 539,395,1377,913,595,957,979,1911,1395,1995,3395,9999,1111,515,315,535,1199,333
%N A350536 a(n) is the smallest proper multiple of 2n+1 which contains only odd digits, or -1 if no such multiple exists.
%C A350536 Generalization of the problem 1/2 of International Mathematical Talent Search, round 2 (see link and 2nd example).
%C A350536 If the escape clause is used, it will be necessarily for terms coming from n = 12 + 25*k, k >= 0.
%H A350536 Chai Wah Wu, <a href="/A350536/b350536.txt">Table of n, a(n) for n = 0..10000</a>
%H A350536 International Mathematical Talent Search, <a href="https://www2.cms.math.ca/Competitions/IMTS/imts2.html">Problem 1/2</a>, Round 2.
%H A350536 <a href="/index/O#Olympiads">Index to sequences related to Olympiads and other Mathematical Competitions</a>.
%e A350536 a(10) = 315 = 21 * 15 is the smallest multiple of 21 which contains only odd digits.
%e A350536 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.
%t A350536 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 *)
%o A350536 (PARI) isok(k) = my(d=digits(k)); #d == #select(x->((x%2)==1), d);
%o A350536 a(n) = my(k=6*n+3); while (!isok(k), k+=4*n+2); k; \\ _Michel Marcus_, Jan 04 2022
%o A350536 (Python)
%o A350536 from itertools import product, count
%o A350536 def A350536(n):
%o A350536     m = 2*n+1
%o A350536     for l in count(len(str(m))):
%o A350536         for s in product('13579',repeat=l):
%o A350536             k = int(''.join(s))
%o A350536             if k > m and k % m == 0:
%o A350536                 return k # _Chai Wah Wu_, Jan 11 2022
%Y A350536 Cf. A061810, A061829, A078221, A296009, A350538.
%Y A350536 Terms belong to A014261.
%K A350536 nonn,base
%O A350536 0,1
%A A350536 _Bernard Schott_, Jan 04 2022
%E A350536 More terms from _Michel Marcus_, Jan 04 2022