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: Kerry Mitchell

Kerry Mitchell's wiki page.

Kerry Mitchell has authored 41 sequences. Here are the ten most recent ones:

A289359 Image of 0 under repeated application of the morphism phi = {x -> x,x+1,x+2 if x mod 3 = 0; x -> x-1 if x mod 3 = 1; or x -> x+2 if x mod 3 = 2, for x = 0,1,2,3,...}.

Original entry on oeis.org

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

Author

Kerry Mitchell, Jul 03 2017

Keywords

Comments

Similar to A288577, except the "x-1" term causes this sequence to return to 0 infinitely often, whereas A288577 is only 0 at the 0th term.
This is the limit of a series of iterations. The length of each iteration is given by A000213, beginning with the second term of that sequence (1, 3, 5, 8, 17, etc.):
0
0, 1, 2
0, 1, 2, 0, 4
0, 1, 2, 0, 4, 0, 1, 2, 3
0, 1, 2, 0, 4, 0, 1, 2, 3, 0, 1, 2, 0, 4, 3, 4, 5
When written in blocks in this way, each subsequent block is the concatenation of the previous block, the second-previous block, and the third-previous block, with each term incremented by 3.

Programs

  • Mathematica
    SubstitutionSystem[{x_ -> Switch[Mod[x, 3], 0, {x, x+1, x+2}, 1, {x-1}, 2, {x+2}]}, {0}, 7] // Last (* Jean-François Alcover, Jan 21 2018 *)

A275107 Limiting sequence of the least significant digits of the odd-indexed terms of A027878 in reverse order.

Original entry on oeis.org

9, 0, 1, 0, 0, 9, 9, 8, 9, 9, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
Offset: 1

Author

Kerry Mitchell, Jul 16 2016

Keywords

Comments

Except for n=1, it appears that A275106(n) + a(n) = 9.

Crossrefs

A027878 gives the full terms, A275106 gives the limiting sequence of the least significant digits of the even-indexed terms of A027878 in reverse order.

A275106 Limiting sequence of the least significant digits of the even-indexed terms of A027878 in reverse order.

Original entry on oeis.org

1, 9, 8, 9, 9, 0, 0, 1, 0, 0, 0, 0, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9
Offset: 1

Author

Kerry Mitchell, Jul 16 2016

Keywords

Comments

In other words, take a term A027878(2m) where m is very large, and read the digits from right to left.
Except for n=1, it appears that a(n) + A275107(n) = 9.

Crossrefs

A027878 gives the full terms, A275107 gives the limiting sequence of the least significant digits of the odd-indexed terms of A027878 in reverse order.

A275105 First column of Hilbert curve in A275103.

Original entry on oeis.org

1, 2, 5, 4, 3, 6, 7, 8, 17, 12, 10, 13, 23, 16, 19, 28, 24, 9, 15, 18, 21, 20, 14, 22, 11, 25, 27, 26, 30, 32, 29, 31, 62, 50, 48, 43, 57, 58, 56, 44, 40, 52, 54, 53, 59, 47, 74, 63, 45, 37, 79, 83, 84, 36, 67, 77, 95, 33, 91, 94, 86, 93, 96, 97, 35
Offset: 0

Author

Kerry Mitchell, Jul 16 2016

Keywords

Crossrefs

Cf. A275103 for the curve, A275104 for the first row

A275104 First row of Hilbert curve in A275103.

Original entry on oeis.org

1, 4, 2, 3, 5, 7, 11, 6, 8, 9, 12, 16, 13, 14, 10, 15, 33, 36, 30, 23, 29, 24, 25, 40, 39, 37, 34, 38, 43, 49, 17, 50, 18, 21, 47, 41, 44, 42, 35, 27, 45, 46, 51, 19, 20, 22, 31, 32, 26, 28, 53, 48, 52, 58, 54, 60, 59, 55, 57, 61, 62, 63, 56, 64, 122
Offset: 0

Author

Kerry Mitchell, Jul 16 2016

Keywords

Crossrefs

Cf. A275103 for the curve, A275105 for the first column.

A275103 Hilbert curve constructed by greedy algorithm, such that each element is the smallest positive integer possible and that all rows, columns, and diagonals contain distinct numbers.

Original entry on oeis.org

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

Author

Kerry Mitchell, Jul 16 2016

Keywords

Comments

The n-th cell has x-coordinates given by A059252 and y-coordinates given by A059253.
This idea is similar to A269526 and A274640, but for a different curve.

Examples

			The Hilbert curve begins:
  1,   4,   2,   3, ...
  2,   3,   5,   1, ...
  5,   6,   4,   2, ...
  4,   2,   1,   5, ...
...
		

Crossrefs

Cf. A269526 uses antidiagonals instead of the Hilbert curve and A274640 uses a square spiral.

A274641 Counterclockwise square spiral constructed by greedy algorithm, so that each row, column, and diagonal contains distinct numbers. Start with 0 (so in this version a(n) = A274640(n) - 1).

Original entry on oeis.org

0, 1, 2, 3, 1, 2, 3, 4, 5, 0, 3, 5, 1, 0, 5, 4, 2, 0, 4, 1, 5, 0, 1, 3, 4, 2, 6, 7, 4, 3, 8, 6, 7, 2, 9, 10, 3, 6, 7, 5, 2, 8, 4, 6, 7, 8, 9, 10, 11, 5, 7, 8, 10, 9, 11, 12, 6, 5, 9, 8, 11, 12, 13, 14, 7, 1, 8, 11, 6, 9, 10, 12, 13, 9, 8, 5, 12, 4, 2, 14, 15, 6, 0, 9, 12, 11, 13, 10, 14, 2, 7, 4, 0, 11, 10, 13, 6, 3, 1, 15, 8, 16, 0, 7, 10
Offset: 0

Author

N. J. A. Sloane, Jul 09 2016, based on the entry A274640 from Zak Seidov and Kerry Mitchell, Jun 30 2016

Keywords

Comments

See A274640 for further information.
Presumably every row, column, and diagonal is a permutation of the natural numbers, but is there a proof? - N. J. A. Sloane, Jul 10 2016

Examples

			From _Jon E. Schoenfield_, Dec 26 2016: (Start)
The spiral begins:
.
   8--15---1---3---6--13--10--11---0---4---7
   |                                       |
  16   7--14--13--12--11---8---9---5---6   2
   |   |                               |   |
   0   1   3--10---9---2---7---6---8  12  14
   |   |   |                       |   |   |
   7   8   6   2---4---5---0---1   3  11  10
   |   |   |   |               |   |   |   |
  10  11   7   0   1---3---2   5   4   9  13
   |   |   |   |   |       |   |   |   |   |
  14   6   5   4   2   0---1   3   7  10  11
   |   |   |   |   |           |   |   |   |
  13   9   2   1   3---4---5---0   6   8  12
   |   |   |   |                   |   |   |
   6  10   8   5---0---1---3---4---2   7   9
   |   |   |                           |   |
   3  12   4---6---7---8---9--10--11---5   0
   |   |                                   |
  11  13---9---8---5--12---4---2--14--15---6
   |
   9--14---0--11--15---7--13--12--10--17--16
.
(End)
		

Crossrefs

Cf. A274640 (if start with 1 at center), A324481 (position of first n).
For the eight spokes see A324774-A324781.

A274640 Counterclockwise square spiral constructed by greedy algorithm, so that each row, column, and diagonal contains distinct numbers.

Original entry on oeis.org

1, 2, 3, 4, 2, 3, 4, 5, 6, 1, 4, 6, 2, 1, 6, 5, 3, 1, 5, 2, 6, 1, 2, 4, 5, 3, 7, 8, 5, 4, 9, 7, 8, 3, 10, 11, 4, 7, 8, 6, 3, 9, 5, 7, 8, 9, 10, 11, 12, 6, 8, 9, 11, 10, 12, 13, 7, 6, 10, 9, 12, 13, 14, 15, 8, 2, 9, 12, 7, 10, 11, 13, 14, 10, 9, 6, 13, 5, 3, 15, 16, 7, 1, 10, 13, 12, 14, 11, 15, 3, 8, 5, 1, 12, 11, 14, 7, 4, 2, 16, 9, 17, 1, 8, 11
Offset: 0

Author

Zak Seidov and Kerry Mitchell, Jun 30 2016

Keywords

Comments

Presumably every row, column, and diagonal is a permutation of the natural numbers, but is there a proof? - N. J. A. Sloane, Jul 10 2016
The n-th cell in the spiral has coordinates x = A174344(n+1), y = A274923(n+1). - N. J. A. Sloane, Jul 11 2016
From Robert G. Wilson v, Dec 25 2016: (Start) [Memo: all these numbers need to decreased by 1, since the offset here is 0. See A324481. - N. J. A. Sloane, Jul 23 2017. Furthermore, the numbers don't seem correct, even after subtracting 1. - N. J. A. Sloane, Jul 04 2019]
Index of first appearance of k = 1,2,3,...: 1, 2, 3, 7, 8, 15, 17, 25, 35, 41, 47, 61, 62, 89, 98, 99, 121, 129, 130, 143, 197, 208, 225, 239, 271, ..., .
1 appears at: 1, 4, 12, 19, 22, 33, 42, 68, 79, 120, 179, 194, 302, 311, 445, 489, 511, 558, 630, 708, 847, 877, 907, ..., .
2 appears at: 2, 5, 9, 16, 48, 52, 70, 73, 88, 95, 110, 146, 280, 291, 309, 327, 488, 605, 656, 681, 735, 778, 1000, ..., .
3 appears at: 3, 6, 10, 23, 29, 36, 56, 76, 97, 105, 153, 168, 184, 252, 338, 437, 457, 670, 818, 906, 953, 967, ..., . (End).

Examples

			The spiral begins:
.
   9--16---2---4---7--14--11--12---1---5---8
   |                                       |
  17   8--15--14--13--12---9--10---6---7   3
   |   |                               |   |
   1   2   4--11--10---3---8---7---9  13  15
   |   |   |                       |   |   |
   8   9   7   3---5---6---1---2   4  12  11
   |   |   |   |               |   |   |   |
  11  12   8   1   2---4---3   6   5  10  14
   |   |   |   |   |       |   |   |   |   |
  15   7   6   5   3   1---2   4   8  11  12
   |   |   |   |   |           |   |   |   |
  14  10   3   2   4---5---6---1   7   9  13
   |   |   |   |                   |   |   |
   7  11   9   6---1---2---4---5---3   8  10
   |   |   |                           |   |
   4  13   5---7---8---9--10--11--12---6   1
   |   |                                   |
  12  14--10---9---6--13---5---3--15--16---7
   |
  10--15---1--12--16---8--14--13--11--18--17
.
The 8 spokes (A274924-A274931) begin:
  E:  1, 2, 4,  8, 11, 12, 16,  9, 19, 24, 22, ...
  NE: 1, 3, 2,  9,  7,  8, 12, 15, 13, 17, 20, ...
  N:  1, 4, 6,  3, 12, 14, 15, 18, 20, 26, 25, ...
  NW: 1, 2, 3,  4,  8,  9,  7, 11, 14, 10, 22, ...
  W:  1, 3, 5,  6,  7, 15, 10, 17, 13, 25, 14, ...
  SW: 1, 4, 6,  5, 14, 10, 11, 23, 16, 18, 21, ...
  S:  1, 5, 2,  9, 13,  8,  7, 11, 10, 17, 19, ...
  SE: 1, 6, 5, 12, 16, 17, 21, 24, 27, 13, 15, ...
		

Crossrefs

Cf. A274641 (the same spiral, but starting with 0 not 1), A174344, A274923.
The 8 spokes are A274924-A274931.
The East-West axis is A275877 (see also A324680), the North-South axis is A276036.
Positions of 1's and 2's give A273059 and A275116.
In the same spirit as the infinite Sudoku array A269526.
Cf. A324481 (position of first n).
Cf. A274821 (the same construction on a hexagonal tiling).

Programs

  • Maple
    #  Maple program from Alois P. Heinz, Jul 12 2016:
    fx:= proc(n) option remember; `if`(n=1, 0, (k->
           fx(n-1)+sin(k*Pi/2))(floor(sqrt(4*(n-2)+1)) mod 4))
         end:
    fy:= proc(n) option remember; `if`(n=1, 0, (k->
           fy(n-1)-cos(k*Pi/2))(floor(sqrt(4*(n-2)+1)) mod 4))
         end:
    b:= proc() 0 end:
    a:= proc(n) local x,y,s,i,t,m;
          x, y:= fx(n+1), fy(n+1);
          if b(x, y) > 0 then b(x, y)
        else s:={};
        for i do t:=b(x+i,y+i); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x-i,y-i); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x+i,y-i); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x-i,y+i); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x+i,y  ); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x-i,y  ); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x  ,y+i); if t>0 then s:=s union {t} else break fi od;
        for i do t:=b(x  ,y-i); if t>0 then s:=s union {t} else break fi od;
             for m while m in s do od;
             b(x,y):= m
          fi
        end:
    seq(a(n), n=0..1000);
  • Mathematica
    fx[n_] := fx[n] = If[n == 1, 0, Function[k, fx[n-1] + Sin[k*Pi/2]][Mod[Floor[Sqrt[4*(n-2)+1]], 4]]]; fy[n_] := fy[n] = If[n == 1, 0, Function[k, fy[n-1] - Cos[k*Pi/2]][Mod[Floor[Sqrt[4*(n-2)+1]], 4]]]; Clear[b]; b[, ] = 0; a[n_] := Module[{x, y, s, i, t, m}, {x, y} = {fx[n+1], fy[n+1]}; If[b[x, y] > 0, b[x, y], s = {};
    For[i=1, True, i++, t=b[x+i, y+i]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x-i, y-i]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x+i, y-i]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x-i, y+i]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x+i, y  ]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x-i, y  ]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x  , y+i]; If[t>0, s=Union[s,{t}], Break[]]];
    For[i=1, True, i++, t=b[x  , y-i]; If[t>0, s=Union[s,{t}], Break[]]];
    m = 1; While[MemberQ[s, m], m++]; b[x, y] = m]]; Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Nov 14 2016, after Alois P. Heinz *)
  • Python
    class Lines: # manage lines in direction d = dx + dy*1j
        def _init_(self, d):
            self.lines={}; self.t = d.real/d.imag if d.imag else None
        def _call_(self, pos): # Return the line through pos in direction d
            index = pos.imag if self.t is None else pos.real - pos.imag*self.t
            if index not in self.lines: self.lines[index] = Values()
            return self.lines[index]
    class Values(set): # the set of used numbers on a given line
        def next(self, n): # return least k >= n not on this line
            return min(m+1 for m in self if m+1 >= n and m+1 not in self
                       ) if n in self else n
    def A274640(): # generator of the sequence, see below for possible usage
        lines = [Lines(d) for d in (1, 1+1j, 1j, 1-1j)]; pos = 0
        for side in range(9**9):
            for _ in range(side//2 + 1):
                n = 1; lines_here = [L(pos) for L in lines]
                while any(n < (n := L.next(n)) for L in lines_here): pass
                yield n; any(L.add(n) for L in lines_here); pos += 1j**side
    [a for a,A274640(),range(99))%5D%20%23%20_M.%20F.%20Hasler"> in zip(A274640(),range(99))] # _M. F. Hasler, Feb 01 2025

Extensions

Corrected and extended by Alois P. Heinz, Jul 12 2016

A257348 Repeatedly applying the map x -> sigma(x) partitions the natural numbers into a number of disjoint trees; sequence gives the (conjectural) list of minimal representatives of these trees.

Original entry on oeis.org

1, 2, 5, 16, 19, 27, 29, 33, 49, 50, 52, 66, 81, 85, 105, 146, 147, 163, 170, 189, 197, 199, 218, 226, 243, 262, 303, 315, 343, 424, 430, 438, 453, 461, 463, 469, 472, 484, 489, 513, 530, 550, 584, 677, 722, 746, 786, 787, 804, 813, 821, 831, 842, 859, 867, 876, 892, 903, 914, 916, 937, 977, 982, 988, 990, 1029
Offset: 1

Author

N. J. A. Sloane, May 01 2015, following a suggestion from Kerry Mitchell

Keywords

Comments

Very little is known for certain. Even the trajectories of 2 (A007497) and 5 (A051572) under repeated application of the map x -> sigma(x) (cf. A000203) are only conjectured to be disjoint.
The thousand-term b-file (up to 141441) has been checked to correspond to disjoint trees for 265 iterations of sigma on each term, and every non-term n < 141441 merges (in at most 21 iterations) with an earlier iteration sequence. - Hans Havermann, Nov 22 2019
Rather than trees we mean connected components of the graphs with edges x -> sigma(x). The number 1 is a fixed point, i.e., a cycle of length 1 under iterations of sigma, it is not part of a tree. But since sigma(n) > n for n > 1 there are no other cycles. - M. F. Hasler, Nov 21 2019

References

  • Kerry Mitchell, Posting to Math Fun Mailing List, Apr 30 2015

Crossrefs

Cf. A000203 (sigma), A007497 (trajectory of 2), A051572 (trajectory of 5), A257349 (trajectory of 16).
Cf. A216200 (number of disjoint trees up to n); A257669 and A257670: size and smallest number of subtree rooted in n.

Extensions

More terms from Hans Havermann, May 02 2015

A249973 Positive integers A when the positive roots of r^2 = Ar + B are listed in increasing order.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 4, 2, 1, 3, 2, 4, 1, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 5, 3, 1, 4, 2, 1, 3, 5, 2, 4, 1, 3, 2, 5, 1, 4, 3
Offset: 1

Author

Kerry Mitchell, Nov 09 2014

Keywords

Comments

Generalize the Fibonacci sequence recurrence equation as: F_(n+1) = A*F_n + B*F_(n-1), where A and B are positive integers. As n goes to infinity, the ratio F_n / F_(n-1) approaches the positive real number r = (A + sqrt(A*A + 4B))/2. This sequence gives the A values in increasing order of r.
In case of a tie in r values, then sort in increasing order of sqrt(A*A + B*B).
This A sequence appears to be the ordinal transform of the B sequence (A249974) and vice versa. The associative arrays of A and B are transposes. The first row of A's associative array seems to be A006000.
For the A and B values leading to a positive integer limit r see a comment in A063929. - Wolfdieter Lang, Jan 12 2015

Examples

			a(6) = 2 because the 6th smallest value of r (approximately 2.732050808) is that for A=2, B=2.
		

Crossrefs

Programs

Extensions

Edited. - Wolfdieter Lang, Jan 11 2015