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.
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
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A290886
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
Comments