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.

User: Eugen Ionascu

Eugen Ionascu's wiki page.

Eugen Ionascu has authored 2 sequences.

A358432 Nonnegative integers m which can be represented using only 0's and 1's in the complex base 1+i, i.e., m = c(0) + c(1)*(1+i) + c(2)*(1+i)^2 + ... where each coefficient c(k) is either 0 or 1.

Original entry on oeis.org

0, 1, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 30, 31, 34, 35, 36, 37, 40, 41, 86, 87, 90, 91, 92, 93, 96, 97, 102, 103, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 121, 126, 127, 130, 131, 132, 133, 136, 137, 150, 151
Offset: 1

Author

Eugen Ionascu, Nov 15 2022

Keywords

Examples

			6 is in the sequence since 6 = T^2 + T^3 + T^4 + T^5 + T^8, where T=1+i.
		

References

  • Problem 12335, American Mathematical Monthly, Vol. 129, issue 7, August-September 2022.

Crossrefs

Cf. A290884.

Programs

  • Mathematica
    cpol[a_, b_] :=
    Module[{u, uu, v, vv, p, pp, q, L, x, k, W}, u = a; v = b; p = {};
      W = {-2 - I, 0, -1 + 2*I};
      While[(u + 1)^2 + v^2 > 1,
       If[Mod[u + v, 2] ==
         0, {uu = (u + v)/2; vv = (v - u)/2; p = Prepend[p, 0]};,
        {uu = (u - 1 + v)/2; vv = (v + 1 - u)/2; p = Prepend[p, 1]}
        ]; u = uu; v = vv;
       ]; w = u + v*I; q = MemberQ[W, w]; L = Length[p];
      If[q == True, pp[x_] := Sum[p[[k]]*x^(L - k), {k, 1, L}],
       pp[x_] := "No writing"] ; {w, pp[1 + I], pp[T]}]
  • PARI
    is(n)= while (n, if (n==I, return (0), real(n)%2==imag(n)%2, n = n/(1+I), n = (n-1)/(1+I));); return (1); \\ Rémy Sigrist, Nov 16 2022

Extensions

More terms from Charles R Greathouse IV, Nov 15 2022

A342932 The unique sequence {a(1), a(2), a(3), a(4), ...} of digits 1, 2, or 3 such that the number a(n)a(n-1)...a(2)a(1), read in base 6, is divisible by 3^n.

Original entry on oeis.org

3, 1, 2, 3, 3, 1, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 1, 3, 3, 3, 2, 3, 3, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 3, 3, 2, 2, 3, 1, 3, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 1, 2, 1, 3, 2, 2, 3, 1, 1, 1, 1, 1, 3, 2, 2, 2, 3, 3, 2, 1, 3, 1, 1, 2, 2, 3, 1, 3, 2, 3, 2, 3, 1, 1, 3, 1, 2, 3, 3, 2, 3, 2, 3, 1, 1, 2, 3
Offset: 1

Author

Eugen Ionascu, Mar 29 2021

Keywords

Comments

The distribution seems to be uniform but random (empirical observation).
To prove that such a digit sequence exists and is unique is a good (but uncommon) example of a proof by induction.

Examples

			3 is divisible by 3^1;
13_6 = 1*6 + 3 = 9, which is divisible by 3^2,
213_6 = 2*6^2 + 1*6 + 3 = 81, which is divisible by 3^3.
		

Crossrefs

Programs

  • Mathematica
    nd[n_] := Module[{k, i, s, ss, L, a}, L = Array[f, n]; f[1] = 3;
      Do[s = Sum[6^(k - 1)*f[k], {k, 1, i - 1}];
       ss = Mod[2^(i - 1)*s/3^(i - 1), 3];
       If[ss == 0, f[i] = 3, If[ss == 1, f[i] = 2, f[i] = 1]], {i, 2, n}];
      s = Sum[6^(k - 1)*f[k], {k, 1, n}];
      {L, s/3^n}]
  • PARI
    { q=0; t=1; for (n=1, 105, print1 (d=[3,1,2][1+lift(-q/Mod(t,3))]", "); q=(t*d+q)/3; t*=2) } \\ Rémy Sigrist, Apr 15 2021
  • Python
    n, div, divnum = 0, 1, 0
    while n < 87:
        div, a = 3*div, 1
        while (a*6**n+divnum)%div != 0:
            a = a+1
        divnum, n = divnum+a*6**n, n+1
        print(a, end=', ') # A.H.M. Smeets, Apr 13 2021