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.

Previous Showing 21-30 of 63 results. Next

A191442 Dispersion of ([n*sqrt(3)+1/2]), where [ ]=floor, by antidiagonals.

Original entry on oeis.org

1, 2, 4, 3, 7, 6, 5, 12, 10, 8, 9, 21, 17, 14, 11, 16, 36, 29, 24, 19, 13, 28, 62, 50, 42, 33, 23, 15, 48, 107, 87, 73, 57, 40, 26, 18, 83, 185, 151, 126, 99, 69, 45, 31, 20, 144, 320, 262, 218, 171, 120, 78, 54, 35, 22, 249, 554, 454, 378, 296, 208, 135, 94
Offset: 1

Views

Author

Clark Kimberling, Jun 04 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1....2....3....5....9
  4....7....12...21...36
  6....10...17...29...50
  8....14...24...42...73
  11...19...33...57...99
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;  x = Sqr[3];
    f[n_] := Floor[n*x+1/2] (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191442 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191442 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A191451 Dispersion of (3*n-2), for n>=2, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 13, 7, 3, 40, 22, 10, 5, 121, 67, 31, 16, 6, 364, 202, 94, 49, 19, 8, 1093, 607, 283, 148, 58, 25, 9, 3280, 1822, 850, 445, 175, 76, 28, 11, 9841, 5467, 2551, 1336, 526, 229, 85, 34, 12, 29524, 16402, 7654, 4009, 1579, 688, 256, 103, 37, 14, 88573
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Row 1: A003462
Row 2: A060816
Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...4....13...40...121
  2...7....22...67...202
  3...10...31...94...283
  5...16...49...148..445
  6...19...58...175..526
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=3n+1 (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191451 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191451 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A265650 Removing the first occurrence of 1, 2, 3, ... reproduces the sequence itself. Each run of consecutive removed terms is separated from the next one by a term a(k) <= a(k-1) such that floor(sqrt(a(k))) equals the length of the run.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A fractal sequence: If one deletes the first occurrence of 1, 2, 3, ... the original sequence is reproduced.
Subsequent runs of consecutive terms which are these first occurrences are separated by a term whose square root yields the length of the preceding run (when rounded down).
Motivated by Project Euler problem 535, see LINKS.
The sequence contains marked numbers and non-marked numbers. A number is marked if it is the first occurrence of that number.
The marked numbers are consecutive starting with a(1)=1.
Immediately preceding each non-marked number in a(n), there are exactly floor(sqrt(a(n))) [= A000196(a(n))] adjacent marked numbers.

Examples

			The runs of first occurrences of the positive integers are {1}, {2}, {3}, {4}, {5}, {6}, {7, 8}, {9}, {10, 11}, ... each separated from the next one by, respectively, 1, 1, 2, 1, 3, 2, 4, 1, 5, ... where 4 and 5 follow the groups {7, 8} and {10, 11} of length 2 = sqrt(4) = floor(sqrt(5)). - _M. F. Hasler_, Dec 13 2015
		

Crossrefs

Programs

  • C
    #include 
    #include 
    #define SIZE 1000
    unsigned int numbers[SIZE];
    int main() {
      unsigned int pointer=0, next=1, circle_count=1, next_circle_number=2, sqrt_non_circle=1;
      numbers[0]=1; printf("1");
      while (next
    				
  • PARI
    A265650(n, list=0, a=[1], cc=0, nc=1, p=0)={for(i=2, n, a=concat(a, if(0<=cc-=1, nc+=1, cc=sqrtint(a[!!p+p+=1]); a[p]))); list&&return(a); a[n]} \\ Set 2nd optional arg.to 1 to return the whole list. - M. F. Hasler, Dec 13 2015

Extensions

New name from M. F. Hasler, Dec 13 2015

A167198 Fractal sequence of the interspersion A083047.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 4, 2, 3, 5, 1, 4, 6, 2, 7, 3, 5, 8, 1, 9, 4, 6, 10, 2, 7, 11, 3, 12, 5, 8, 13, 1, 9, 14, 4, 15, 6, 10, 16, 2, 17, 7, 11, 18, 3, 12, 19, 5, 20, 8, 13, 21, 1, 22, 9, 14, 23, 4, 15, 24, 6, 25, 10, 16, 26, 2, 17, 27, 7, 28, 11, 18, 29, 3, 30, 12, 19, 31, 5, 20, 32, 8, 33, 13
Offset: 1

Views

Author

Clark Kimberling, Oct 30 2009

Keywords

Comments

As a fractal sequence, if the first occurrence of each term is deleted, the remaining sequence is the original. In general, the interspersion of a fractal sequence is constructed by rows: row r consists of all n, such that a(n)=r; in particular, A083047 is constructed in this way from A167198.
a(n-1) gives the row number which contains n in the dual Wythoff array A126714 (beginning the row count at 1), see also A223025 and A019586. - Casey Mongoven, Mar 11 2013

Examples

			To produce row 5, first write row 4: 2,3,1, then place 4 right before 2, and then place 5 right before 1, getting 4,2,3,5,1.
		

References

  • Clark Kimberling, Stolarsky interspersions, Ars Combinatoria 39 (1995), 129-138.

Crossrefs

Formula

Following is a construction that avoids reference to A083047.
Write initial rows:
Row 1: .... 1
Row 2: .... 1
Row 3: .... 2..1
Row 4: .... 2..3..1
For n>=4, to form row n+1, let k be the least positive integer not yet used; write row n, and right before the first number that is also in row n-1, place k; right before the next number that is also in row n-1, place k+1, and continue. A167198 is the concatenation of the rows. (If "before" is replaced by "after", the resulting fractal sequence is A003603, and the associated interspersion is the Wythoff array, A035513.)

A304100 a(n) = A003602(A048679(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 1, 5, 3, 2, 4, 1, 9, 5, 3, 6, 2, 7, 4, 1, 17, 9, 5, 10, 3, 11, 6, 2, 13, 7, 4, 8, 1, 33, 17, 9, 18, 5, 19, 10, 3, 21, 11, 6, 12, 2, 25, 13, 7, 14, 4, 15, 8, 1, 65, 33, 17, 34, 9, 35, 18, 5, 37, 19, 10, 20, 3, 41, 21, 11, 22, 6, 23, 12, 2, 49, 25, 13, 26, 7, 27, 14, 4, 29, 15, 8, 16, 1, 129, 65, 33, 66, 17, 67, 34, 9, 69, 35, 18, 36, 5, 73
Offset: 1

Views

Author

Antti Karttunen, May 13 2018

Keywords

Comments

Positions of ones is given by the positive Fibonacci numbers: 1, 2, 3, 5, 8, 13, 21, ..., that is, A000045(n) from n >= 2 onward.
Positions of 2's is given by Lucas numbers larger than 3: 4, 7, 11, 18, ..., that is, A000032(n) from n >= 3 onward.
The restricted growth sequence transform of this sequence (almost certainly) is A003603.

Crossrefs

Programs

Formula

a(n) = A003602(A048679(n)).
For all i, j: a(i) = a(j) => A304101(i) = A304101(j).

A352538 Primes whose position in the Wythoff array is immediately followed by another prime in the next column.

Original entry on oeis.org

2, 3, 7, 19, 23, 29, 67, 97, 103, 107, 149, 181, 227, 271, 311, 353, 379, 433, 449, 563, 631, 719, 761, 883, 919, 941, 971, 997, 1049, 1087, 1223, 1291, 1297, 1427, 1447, 1453, 1531, 1601, 1627, 1699, 1753, 1831, 1861, 1877, 2039, 2207, 2213, 2239, 2269, 2281, 2287
Offset: 1

Views

Author

Michel Marcus, Mar 20 2022

Keywords

Examples

			The Wythoff array begins:
   1    2    3    5    8 ...
   4    7   11   18   29 ...
   6   10   16   26   42 ...
   ...
So 2, 3 and 7 are terms, since they are horizontally followed by 3, 5 and 11.
		

Crossrefs

Cf. A003603, A022342, A035612, A035513 (Wythoff array).
Cf. A352537 (next row and column), A352539 (next row).

Programs

  • PARI
    T(n,k) = (n+sqrtint(5*n^2))\2*fibonacci(k+1) + (n-1)*fibonacci(k); \\ A035513
    cell(n) = for (r=1, oo, for (c=1, oo, if (T(r,c) == n, return([r, c])); if (T(r,c) > n, break);););
    isokh(m) = {my(pos = cell(prime(m))); isprime (T(pos[1], pos[2]+1))};
    lista(nn) = for (n=1, nn, if (isokh(n), print1(prime(n), ", ")));
    
  • PARI
    right(n) = n++; (sqrtint(5*n^2)+n-2)\2; \\ see A022342
    isokh(n) = isprime(right(n));
    lista(nn) = for (n=1, nn, my(p=prime(n)); if (isokh(p), print1(p, ", ")));

A120873 Fractal sequence of the Wythoff difference array (A080164).

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 2, 5, 6, 3, 7, 8, 1, 9, 4, 10, 11, 2, 12, 5, 13, 14, 6, 15, 16, 3, 17, 7, 18, 19, 8, 20, 21, 1, 22, 9, 23, 24, 4, 25, 10, 26, 27, 11, 28, 29, 2, 30, 12, 31, 32, 5, 33, 13, 34, 35, 14, 36, 37, 6, 38, 15, 39, 40, 16, 41, 42, 3, 43, 17, 44, 45, 7, 46, 18, 47, 48, 19, 49
Offset: 1

Views

Author

Clark Kimberling, Jul 10 2006

Keywords

Comments

A fractal sequence f contains itself as a proper subsequence; e.g., if you delete the first occurrence of each positive integer, the remaining sequence is f; thus f properly contains itself infinitely many times.
This is subsequence of A003603. - Clark Kimberling, Oct 26 2021
a(n) is the number of the row of the Wythoff array (A035513) that contains the n-th Wythoff pair; e.g., the 6th Wythoff pair is (floor(6*r), floor(6*r^2)), where r = golden ratio = A001622, which is in row 4 of the Wythoff array. - Clark Kimberling, Oct 26 2021

Examples

			The fractal sequence f(n) of a dispersion D={d(g,h,)} is defined as follows.
For each positive integer n there is a unique (g,h) such that n=d(g,h) and f(n)=g. So f(7)=2 because the row of the WDA in which 7 occurs is row 2.
		

References

  • Clark Kimberling, The Wythoff difference array, in Applications of Fibonacci Numbers, vol.10, Proceedings of the Eleventh International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 194 (2009) 153-158.

Crossrefs

Programs

  • PARI
    lowerw(n) = (n+sqrtint(5*n^2))\2 ; \\ A000201
    upperw(n) = (sqrtint(n^2*5)+n*3)\2; \\ A001950
    compoundw(n) = (sqrtint(n^2*5)+n*3)\2 - 1; \\ A003622
    a(n) = my(x=lowerw(n), y=upperw(n), u); while (1, my(k=1, ok=1); while(ok, my(xx = lowerw(k), yy = compoundw(k)); if ((x == xx) && (y == yy), return(k)); if (xx > x, ok = 0); k++;); u = x; x = y - u; y = u;); \\ Michel Marcus, Sep 17 2022

A191429 Dispersion of ([n*sqrt(2)+2]), where [ ]=floor, by antidiagonals.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 10, 7, 9, 8, 16, 11, 14, 13, 12, 24, 17, 21, 20, 18, 15, 35, 26, 31, 30, 27, 23, 19, 51, 38, 45, 44, 40, 34, 28, 22, 74, 55, 65, 64, 58, 50, 41, 33, 25, 106, 79, 93, 92, 84, 72, 59, 48, 37, 29, 151, 113, 133, 132, 120, 103, 85, 69, 54, 43, 32, 215, 161, 190, 188, 171, 147, 122, 99, 78, 62, 47, 36
Offset: 1

Views

Author

Clark Kimberling, Jun 03 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1...3...6...10..16
  2...4...7...11..17
  5...9...14..21..31
  8...13..20..30..44
  12..18..27..40..58
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r = 40; r1 = 12;  (* r=# rows of T to compute, r1=# rows to show *)
    c = 40; c1 = 12;   (* c=# cols to compute, c1=# cols to show *)
    x = Sqrt[2];
    f[n_] := Floor[n*x + 2] (* f(n) is complement of column 1 *)
    mex[list_] :=
    NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1,
      Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];  (* the array T *)
    TableForm[
    Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191429 array *)
    Flatten[Table[
      t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191429 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A191432 Dispersion of ([n*x+1/x]), where x=sqrt(2) and [ ]=floor, by antidiagonals.

Original entry on oeis.org

1, 2, 5, 3, 7, 8, 4, 10, 12, 11, 6, 14, 17, 16, 15, 9, 20, 24, 23, 21, 18, 13, 28, 34, 33, 30, 26, 22, 19, 40, 48, 47, 43, 37, 31, 25, 27, 57, 68, 67, 61, 53, 44, 36, 29, 38, 81, 96, 95, 86, 75, 62, 51, 41, 32, 54, 115, 136, 135, 122, 106, 88, 72, 58, 45, 35, 77, 163, 193, 191, 173, 150, 125, 102, 82, 64, 50, 39
Offset: 1

Views

Author

Clark Kimberling, Jun 03 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence.
Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.
Conjecture: It appears this sequence is related to the even numbers with odd abundance A088827. Looking at the table format if the columns represent the powers of 2 (starting at 2^1) and the rows represent the squares of odd numbers, then taking the product of a term's row and column gives the n-th term in A088827. Example: A088827(67) = (7^2) * (2^6) = 3136. - John Tyler Rascoe, Jul 12 2022

Examples

			Northwest corner:
   1    2    3    4    6    9
   5    7   10   14   20   28
   8   12   17   24   34   48
  11   16   23   33   47   67
  15   21   30   43   61   86
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r = 40; r1 = 12;  (* r=# rows of T, r1=# rows to show *)
    c = 40; c1 = 12;  (* c=# cols of T, c1=# cols to show *)
    x = Sqrt[2];
    f[n_] := Floor[n*x + 1/x] (* f(n) is complement of column 1 *)
    mex[list_] :=  NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1,
      Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];  TableForm[
    Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191432 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191432 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)
  • PARI
    s(n) = my(x=quadgen(8)); floor(n*x+1/x);  \\ A001953
    t(n) = floor((n+1/2)*(2+quadgen(8))); \\ A001954
    T(n, k) = my(x = t(n-1)); for (i=2, k, x = s(x);); x; \\ Michel Marcus, Jul 13 2022

A191436 Dispersion of ([n*x+n+x-1]), where x=(golden ratio) and [ ]=floor, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 12, 6, 3, 33, 17, 9, 5, 88, 46, 25, 14, 7, 232, 122, 67, 38, 19, 8, 609, 321, 177, 101, 51, 22, 10, 1596, 842, 465, 266, 135, 59, 27, 11, 4180, 2206, 1219, 698, 355, 156, 72, 30, 13, 10945, 5777, 3193, 1829, 931, 410, 190, 80, 35, 15, 28656, 15126
Offset: 1

Views

Author

Clark Kimberling, Jun 04 2011

Keywords

Comments

Background discussion: Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n)=(number of the row of D that contains n) is a fractal sequence. Examples:
(1) s=A000040 (the primes), D=A114537, u=A114538.
(2) s=A022343 (without initial 0), D=A035513 (Wythoff array), u=A003603.
(3) s=A007067, D=A035506 (Stolarsky array), u=A133299.
More recent examples of dispersions: A191426-A191455.

Examples

			Northwest corner:
  1....4....12...33...88
  2....6....17...46...122
  3....9....25...67...177
  5....14...38...101..266
  7....19...51...135..355
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;  x = GoldenRatio;
    f[n_] := Floor[n*x+n+x-1] (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191436 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191436 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)
Previous Showing 21-30 of 63 results. Next