%I #40 Mar 07 2023 07:40:43
%S 0,1,2,53,91,182,194,273,546,582,948,1092,1236,2184,2527,9373,19238,
%T 28119,57714,84357,173142,185640,452807,21774372,48833136,65323116,
%U 1145127998,3435383994,4804366457,11296002941,14224061544,18500792316,28413081060,33888008823
%N When expressed in base 3 and then interpreted in base 4, is a multiple of the original number.
%C From _Jon E. Schoenfield_, Mar 06 2023: (Start)
%C Let u(k) be the result of expressing an integer k in base 3 and interpreting the result as a base-4 number, and define the ratio r(k) = u(k)/k. Then (after the initial term 0) the sequence consists of the integers k > 0 such that r(k) is an integer.
%C Note that, among all numbers k in any interval [m*3^j, (m+1)*3^j - 1] where m > 0, r(k) is maximized at k = m*3^j and minimized at (m+1)*3^j - 1. Consequently, there cannot be any terms in that interval unless there is at least one integer in the interval [r((m+1)*3^j - 1), r(m*3^j)]. (This observation is implemented in the Magma program below, which, when run on the Magma Calculator, computes the first 34 terms in about 0.5 seconds.) (End)
%C Numbers k such that A023717(k) is a multiple of k. - _Michel Marcus_, Mar 07 2023
%H Jon E. Schoenfield, <a href="/A062853/b062853.txt">Table of n, a(n) for n = 1..55</a> (all terms < 3^48).
%e 53 = 1222_3; 1222_4 = 106 = 2*53.
%t fQ[n_] := Mod[ FromDigits[ IntegerDigits[n, 3], 4], n] == 0;
%t k = 1; lst = {};
%t While[k < 10^10/8, If[ fQ@k, AppendTo[ lst, k]; Print@k]; k++ ];
%t lst (* _Robert G. Wilson v_, Feb 24 2010 *)
%o (Magma)
%o N := 34; // max # of terms
%o A := [0];
%o D := [1]; // base-3 dgts (reversed) at curr srch point
%o j := 1; // pointer (at ones place)
%o while #A lt N do
%o if j eq 1 then // test a single integer (k)
%o k := Seqint(D, 3);
%o if Seqint(D, 4) mod k eq 0 then
%o A[#A+1] := k;
%o end if;
%o D[j] +:= 1;
%o else // test the interval [k0, k1]
%o k0 := Seqint(D, 3);
%o k1 := k0 + 3^(j - 1) - 1;
%o u0 := Seqint(D, 4);
%o u1 := Seqint(Intseq(k1, 3), 4);
%o if u0 div k0 gt (u1 - 1) div k1 then
%o // at least 1 integer in interval [u1/k1, u0/k0]
%o j -:= 1; // test its 3 subintervals
%o else
%o D[j] +:= 1;
%o end if;
%o end if;
%o while D[j] eq 3 do // all 3 subintervals tested
%o D[j] := 0; // reset
%o j +:= 1; // move up to larger interval
%o if j gt #D then
%o D[j] := 1; // add a digit
%o break;
%o end if;
%o D[j] +:= 1;
%o end while;
%o end while;
%o A; // _Jon E. Schoenfield_, Mar 05 2023
%Y Cf. A023717.
%K base,nonn
%O 1,3
%A _Erich Friedman_, Jul 21 2001
%E a(21)-a(27) from _Robert G. Wilson v_, Feb 24 2010
%E Offset changed to 1 and a(28), a(29) from _Georg Fischer_, Mar 03 2023
%E a(30)-a(34) from _Jon E. Schoenfield_, Mar 05 2023