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.

A322510 a(1) = 0, and for any n > 0, a(2*n) = a(n) + k(n) and a(2*n+1) = a(n) - k(n) where k(n) is the least positive integer not leading to a duplicate term in sequence a.

Original entry on oeis.org

0, 1, -1, 4, -2, 2, -4, 5, 3, 6, -10, 7, -3, 8, -16, 15, -5, 12, -6, 19, -7, -9, -11, 22, -8, 9, -15, 28, -12, -14, -18, 16, 14, 10, -20, 13, 11, 17, -29, 20, 18, 21, -35, 23, -41, 24, -46, 57, -13, 26, -42, 35, -17, 25, -55, 29, 27, 30, -54, 31, -59, 32, -68
Offset: 1

Views

Author

Rémy Sigrist, Dec 13 2018

Keywords

Comments

The point is that the same k(n) must be used for both a(2*n) and a(2*n+1). - N. J. A. Sloane, Dec 17 2019
Apparently every signed integer appears in the sequence.

Examples

			The first terms, alongside k(n) and associate children, are:
  n   a(n)  k(n)  a(2*n)  a(2*n+1)
  --  ----  ----  ------  --------
   1     0     1       1        -1
   2     1     3       4        -2
   3    -1     3       2        -4
   4     4     1       5         3
   5    -2     8       6       -10
   6     2     5       7        -3
   7    -4    12       8       -16
   8     5    10      15        -5
   9     3     9      12        -6
  10     6    13      19        -7
		

Crossrefs

For k(n) see A330337, A330338.
See A305410, A304971 and A322574-A322575 for similar sequences.

Programs

  • PARI
    lista(nn) = my (a=[0], s=Set(0)); for (n=1, ceil(nn/2), for (k=1, oo, if (!setsearch(s, a[n]+k) && !setsearch(s, a[n]-k), a=concat(a, [a[n]+k, a[n]-k]); s=setunion(s, Set([a[n]+k, a[n]-k])); break))); a[1..nn]

Formula

a(n) = (a(2*n) + a(2*n+1))/2.

A322575 z(1) = 0, and for any n > 0, z(4*n-2) = z(n) + k(n), z(4*n-1) = z(n) + i*k(n), z(4*n) = z(n) - k(n) and z(4*n+1) = z(n) - i*k(n) where k(n) is the least positive integer not leading to a duplicate term in sequence z (and i denotes the imaginary unit); a(n) is the imaginary part of z(n).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Dec 17 2018

Keywords

Crossrefs

See A322574 for the real part of z and additional comments.

Programs

  • PARI
    \\ See Links section.

A326280 Let f(n) be a sequence of distinct Gaussian integers such that f(1) = 0 and for any n > 1, f(n) = f(floor(n/2)) + k(n)*g((1+i)^(A000120(n)-1) * (1-i)^A023416(n)) where k(n) > 0 is as small as possible and g(z) = z/gcd(Re(z), Im(z)); a(n) is the real part of f(n).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 22 2019

Keywords

Comments

The idea underlying this sequence is to build an infinite binary tree of Gaussian integers:
- for any n > 0, f(n) has children f(2*n) and f(2*n+1),
- f(n), f(2*n) and f(2*n+1) form a right triangle,
- when u has child v and v has child w, then the angle between the vectors (u,v) and (v,w) is 45 degrees.
Among the first 2^20-1 terms, some values around the origin are missing: -2 - 3*i, -2, i, 2 - 2*i, 2, 4 + i, 5 - 2*i; will they ever appear?
Graphically, f has interesting features (see representations of f in Links section).
This sequence has similarities with A322574.

Examples

			See representation of the first layers of the binary tree in links section.
		

Crossrefs

See A326281 for the imaginary part of f.

Programs

  • PARI
    See Links section.
Showing 1-3 of 3 results.