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.

Showing 1-3 of 3 results.

A290886 Let S be the sequence generated by these rules: 0 is in S, and if z is in S, then z * (1+i) and (z-1) * (1+i) + 1 are in S (where i denotes the imaginary unit), and duplicates are deleted as they occur; a(n) = the square of the norm of the n-th term of S.

Original entry on oeis.org

0, 1, 2, 5, 4, 5, 10, 13, 8, 5, 10, 9, 20, 17, 26, 25, 16, 9, 10, 5, 20, 13, 18, 13, 40, 29, 34, 25, 52, 41, 50, 41, 32, 25, 18, 13, 20, 13, 10, 5, 40, 29, 26, 17, 36, 25, 26, 17, 80, 65, 58, 45, 68, 53, 50, 37, 104, 85, 82, 65, 100, 81, 82, 65, 64, 65, 50, 53
Offset: 1

Views

Author

Rémy Sigrist, Aug 13 2017

Keywords

Comments

See A290884 for the real part of the n-th term of S, and additional comments.
See A290885 for the imaginary part of the n-th term of S.
a(n) tends to infinity as n tends to infinity.

Examples

			Let f be the function z -> z * (1+i), and g the function z -> (z-1) * (1+i) + 1.
S(1) = 0 by definition; so a(1) = 0.
f(S(1)) = 0 has already occurred.
g(S(1)) = -i has not yet occurred; so S(2) = -i and a(2) = 1.
f(S(2)) = 1 - i has not yet occurred; so S(3) = 1 - i and a(3) = 2.
g(S(2)) = 1 - 2*i has not yet occurred; so S(4) = 1 - 2*i and a(4) = 5.
f(S(3)) = 2 has not yet occurred; so S(5) = 2 and a(5) = 4.
g(S(3)) = 2 - i has not yet occurred; so S(6) = 2 - i and a(6) = 5.
f(S(4)) = 3 - i has not yet occurred; so S(7) = 3 - i and a(7) = 10.
g(S(4)) = 3 - 2*i has not yet occurred; so S(8) = 3 - 2*i and a(8) = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Abs[FromDigits[IntegerDigits[n, 2], 1 + I]]^2, {n, 0, 100}] (* IWABUCHI Yu(u)ki, Jan 01 2023 *)
  • PARI
    See Links section.
    
  • PARI
    a(n) = norm(subst(Pol(binary(n-1)),'x,I+1)); \\ Kevin Ryde, Apr 08 2020

Formula

a(n) = A290884(n)^2 + A290885(n)^2.

A290885 Let S be the sequence generated by these rules: 0 is in S, and if z is in S, then z * (1+i) and (z-1) * (1+i) + 1 are in S (where i denotes the imaginary unit), and duplicates are deleted as they occur; a(n) = the imaginary part of the n-th term of S.

Original entry on oeis.org

0, -1, -1, -2, 0, -1, -1, -2, 2, 1, 1, 0, 2, 1, 1, 0, 4, 3, 3, 2, 4, 3, 3, 2, 6, 5, 5, 4, 6, 5, 5, 4, 4, 3, 3, 2, 4, 3, 3, 2, 6, 5, 5, 4, 6, 5, 5, 4, 8, 7, 7, 6, 8, 7, 7, 6, 10, 9, 9, 8, 10, 9, 9, 8, 0, -1, -1, -2, 0, -1, -1, -2, 2, 1, 1, 0, 2, 1, 1, 0, 4, 3
Offset: 1

Views

Author

Rémy Sigrist, Aug 13 2017

Keywords

Comments

See A290884 for the real part of the n-th term of S, and additional comments.
See A290886 for the square of the norm of the n-th term of S.

Examples

			Let f be the function z -> z * (1+i), and g the function z -> (z-1) * (1+i) + 1.
S(1) = 0 by definition; so a(1) = 0.
f(S(1)) = 0 has already occurred.
g(S(1)) = -i has not yet occurred; so S(2) = -i and a(2) = -1.
f(S(2)) = 1 - i has not yet occurred; so S(3) = 1 - i and a(3) = -1.
g(S(2)) = 1 - 2*i has not yet occurred; so S(4) = 1 - 2*i and a(4) = -2.
f(S(3)) = 2 has not yet occurred; so S(5) = 2 and a(5) = 0.
g(S(3)) = 2 - i has not yet occurred; so S(6) = 2 - i and a(6) = -1.
f(S(4)) = 3 - i has not yet occurred; so S(7) = 3 - i and a(7) = -1.
g(S(4)) = 3 - 2*i has not yet occurred; so S(8) = 3 - 2*i and a(8) = -2.
		

Crossrefs

Programs

  • PARI
    See Links section.
    
  • PARI
    a(n) = -real(subst(Pol(binary(n-1)),'x,I+1)); \\ Kevin Ryde, Apr 08 2020

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

Views

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
Showing 1-3 of 3 results.