A116441 Numbers k which when sandwiched between two 6's give a multiple of k.
1, 2, 3, 6, 11, 13, 14, 21, 22, 26, 33, 39, 42, 66, 77, 78, 91, 137, 146, 219, 274, 411, 438, 822, 9091, 19802, 29703, 59406, 909091, 5882353, 10989011, 12145749, 12987013, 13986014, 14354067, 15037594, 20979021, 21978022, 22556391, 24291498, 25974026, 28708134
Offset: 1
Examples
39 belongs to the sequence since 6396 is a multiple of 39 (39*164).
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..6573
Programs
-
Mathematica
f[k_, d_] := Flatten@Table[Select[Divisors[k*(10^(i + 1) + 1)], IntegerLength[ # ] == i &], {i, d}]; f[6, 8] (* Ray Chandler, May 11 2007 *) Select[Range[23000000],Divisible[FromDigits[Join[{6},IntegerDigits[#],{6}]],#]&] (* Harvey P. Dale, Jan 12 2011 *)
-
Python
from sympy import isprime from itertools import count, islice def agen(): # generator of terms yield from [1, 2, 3, 6] for k in count(2): t = 6*(10**(k+1) + 1) yield from (t//i for i in range(600, 60, -1) if t%i == 0) print(list(islice(agen(), 42))) # Michael S. Branicky, Mar 26 2023
Extensions
a(40) and beyond from Michael S. Branicky, Mar 26 2023