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.

A062853 When expressed in base 3 and then interpreted in base 4, is a multiple of the original number.

Original entry on oeis.org

0, 1, 2, 53, 91, 182, 194, 273, 546, 582, 948, 1092, 1236, 2184, 2527, 9373, 19238, 28119, 57714, 84357, 173142, 185640, 452807, 21774372, 48833136, 65323116, 1145127998, 3435383994, 4804366457, 11296002941, 14224061544, 18500792316, 28413081060, 33888008823
Offset: 1

Views

Author

Erich Friedman, Jul 21 2001

Keywords

Comments

From Jon E. Schoenfield, Mar 06 2023: (Start)
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.
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)
Numbers k such that A023717(k) is a multiple of k. - Michel Marcus, Mar 07 2023

Examples

			53 = 1222_3; 1222_4 = 106 = 2*53.
		

Crossrefs

Cf. A023717.

Programs

  • Magma
    N := 34; // max # of terms
    A := [0];
    D := [1]; // base-3 dgts (reversed) at curr srch point
    j := 1; // pointer (at ones place)
    while #A lt N do
       if j eq 1 then // test a single integer (k)
          k := Seqint(D, 3);
          if Seqint(D, 4) mod k eq 0 then
             A[#A+1] := k;
          end if;
          D[j] +:= 1;
       else // test the interval [k0, k1]
          k0 := Seqint(D, 3);
          k1 := k0 + 3^(j - 1) - 1;
          u0 := Seqint(D, 4);
          u1 := Seqint(Intseq(k1, 3), 4);
          if u0 div k0 gt (u1 - 1) div k1 then
             // at least 1 integer in interval [u1/k1, u0/k0]
             j -:= 1; // test its 3 subintervals
          else
             D[j] +:= 1;
          end if;
       end if;
       while D[j] eq 3 do // all 3 subintervals tested
          D[j] := 0; // reset
          j +:= 1; // move up to larger interval
          if j gt #D then
             D[j] := 1; // add a digit
             break;
          end if;
          D[j] +:= 1;
       end while;
    end while;
    A; // Jon E. Schoenfield, Mar 05 2023
  • Mathematica
    fQ[n_] := Mod[ FromDigits[ IntegerDigits[n, 3], 4], n] == 0;
    k = 1; lst = {};
    While[k < 10^10/8, If[ fQ@k, AppendTo[ lst, k]; Print@k]; k++ ];
    lst (* Robert G. Wilson v, Feb 24 2010 *)

Extensions

a(21)-a(27) from Robert G. Wilson v, Feb 24 2010
Offset changed to 1 and a(28), a(29) from Georg Fischer, Mar 03 2023
a(30)-a(34) from Jon E. Schoenfield, Mar 05 2023