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.

A039935 Smallest k for which k, 2k, ... nk all contain the digit 4.

This page as a plain text file.
%I A039935 #14 Apr 24 2021 10:26:10
%S A039935 4,24,47,471,487,1248,1249,6248,6249,6249,12493,12493,12493,12493,
%T A039935 12498,31249,62499,62499,62499,62499,62499,62499,62499,62499,62499,
%U A039935 62499,62499,62499,62499,62499,62499,312497,312497,312497,624984,624984,624984,624984,624984
%N A039935 Smallest k for which k, 2k, ... nk all contain the digit 4.
%H A039935 Giovanni Resta, <a href="/A039935/b039935.txt">Table of n, a(n) for n = 1..2047</a>
%e A039935 a(3) = 47 since 47, 94 and 141 all contain a 4.
%o A039935 (Python)
%o A039935 def aupton(terms):
%o A039935   k, n, alst = 1, 1, []
%o A039935   while len(alst) < terms:
%o A039935     while not all(str(i*k).count('4') > 0 for i in range(1, n+1)): k += 1
%o A039935     while str(n*k).count('4') > 0: alst.append(k); n += 1
%o A039935     k += 1
%o A039935   return alst[:terms]
%o A039935 print(aupton(39)) # _Michael S. Branicky_, Apr 24 2021
%Y A039935 Cf. A039932, A039933, A039934, A039936, A039937, A039938, A039939, A039940.
%K A039935 base,nonn
%O A039935 1,1
%A A039935 _Erich Friedman_
%E A039935 More terms from _Patrick De Geest_, Oct 15 1999