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 11-20 of 44 results. Next

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 *)

A022447 Fractal sequence of the dispersion of the primes.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			From _Sean A. Irvine_, May 20 2019: (Start)
The prime counting function, pi(n), is iterated (possibly zero times) until a nonprime is reached.  If the result of this iteration is m, then a(n) = m - pi(m).  Examples:
n=11: pi(11)=5, pi(5)=3, pi(3)=2, pi(2)=1. Hence, m=1 and so a(11) = 1-pi(1) = 1.
n=12: is already nonprime, hence m=12 and so a(12) = 12-pi(12) = 7.
n=13: pi(13)=6 (a nonprime), hence m=6 and so a(13) = 6-pi(6) = 3.
(End)
		

References

  • C. Kimberling, Fractal sequences and interspersions, Ars Combinatoria, vol. 45, p. 157, 1997.

Crossrefs

Programs

  • Mathematica
    m = 30; list = Table[Length[NestWhileList[PrimePi, n, PrimeQ]], {n, m}]; Table[Length@Position[Take[list, k], list[[k]]], {k, Length[list]}] (* Birkas Gyorgy, Apr 04 2011 *)
    primefractal[n_]:= (# - PrimePi[#]) &@NestWhile[PrimePi, n, PrimeQ]; Array[primefractal, 30] (* Birkas Gyorgy, Apr 04 2011 *)

Extensions

Terms a(67) onward added by G. C. Greubel, Feb 28 2018
Offset corrected by Sean A. Irvine, May 20 2019

A114578 Transposition sequence of the dispersion of the composite numbers.

Original entry on oeis.org

1, 4, 9, 2, 16, 6, 26, 12, 3, 21, 39, 8, 56, 33, 15, 5, 78, 25, 106, 49, 10, 69, 141, 38, 18, 7, 94, 28, 184, 125, 236, 55, 14, 77, 164, 42, 296, 24, 11, 105, 356, 36, 416, 212, 140, 270, 476, 60, 20, 84, 183, 52, 536, 330, 32, 13, 115, 390, 596, 48, 656, 450, 235
Offset: 1

Views

Author

Clark Kimberling, Dec 09 2005

Keywords

Comments

A self-inverse permutation of the positive integers.

Examples

			Start with the northwest corner of T:
1 4 9 16 26
2 6 12 21 33
3 8 15 25 38
5 10 18 28 42
a(1)=1 because 1=T(1,1) and T(1,1)=1.
a(2)=4 because 2=T(2,1) and T(1,2)=4.
a(3)=9 because 3=T(3,1) and T(1,3)=9.
a(10)=21 because 10=T(4,2) and T(2,4)=21.
		

Crossrefs

Cf. A114577.

Formula

Suppose (as at A114538) that T is a rectangular array consisting of all the positive integers, each exactly once. The transposition sequence of T is obtained by placing T(i, j) in position T(j, i) for all i and j.

A114882 Transposition sequence of A114881.

Original entry on oeis.org

1, 3, 2, 5, 4, 7, 6, 8, 10, 9, 12, 11, 16, 24, 18, 13, 22, 15, 28, 48, 30, 17, 36, 14, 40, 120
Offset: 1

Views

Author

Clark Kimberling, Jan 03 2006

Keywords

Comments

A self-inverse permutation of the natural numbers.

Examples

			Start with the northwest corner of A114881:
1 3 5 7 9
2 8 14 20 26
4 24 34 54 64
6 48 76 90 118
a(1)=1 because 1=T(1,1) and T(1,1)=1.
a(2)=3 because 2=T(2,1) and T(1,2)=3.
a(3)=2 because 3=T(1,2) and T(2,1)=2.
a(20)=48 because 20=T(2,4) and T(4,2)=48.
		

Crossrefs

Formula

(See A114538 for definition of transposition sequence.)

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 *)

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

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 12, 17, 10, 6, 29, 41, 24, 14, 8, 70, 99, 58, 34, 19, 9, 169, 239, 140, 82, 46, 22, 11, 408, 577, 338, 198, 111, 53, 27, 13, 985, 1393, 816, 478, 268, 128, 65, 31, 15, 2378, 3363, 1970, 1154, 647, 309, 157, 75, 36, 16, 5741, 8119, 4756
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....5....12...29
  3....7....17...41...99
  4....10...24...58...140
  6....14...34...82...198
  8....19...46...111..268
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;  x = Sqr[2];
    f[n_] := Floor[n*x+n+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}]]
    (* A191439 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191439 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

A191446 Dispersion of [n*sqrt(5)], where [ ]=floor, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 8, 13, 11, 7, 17, 29, 24, 15, 9, 38, 64, 53, 33, 20, 10, 84, 143, 118, 73, 44, 22, 12, 187, 319, 263, 163, 98, 49, 26, 14, 418, 713, 588, 364, 219, 109, 58, 31, 16, 934, 1594, 1314, 813, 489, 243, 129, 69, 35, 18, 2088, 3564, 2938, 1817
Offset: 1

Views

Author

Clark Kimberling, Jun 05 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....4....8...17
  3...6....13...29..64
  5...11...24...53..118
  7...15...33...73..163
  9...20...44...98..219
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;  x = Sqrt[5];
    f[n_] := Floor[n*x] (* 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}]]
    (* A191446 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191446 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)

Extensions

Corrected typo in name and fixed Mathematica program by Vaclav Kotesovec, Oct 24 2014

A191540 Dispersion of (floor(2*n*sqrt(2))), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 14, 22, 11, 6, 39, 62, 31, 16, 7, 110, 175, 87, 45, 19, 9, 311, 494, 246, 127, 53, 25, 10, 879, 1397, 695, 359, 149, 70, 28, 12, 2486, 3951, 1965, 1015, 421, 197, 79, 33, 13, 7031, 11175, 5557, 2870, 1190, 557, 223, 93, 36, 15, 19886, 31607
Offset: 1

Views

Author

Clark Kimberling, Jun 06 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 and A191536-A191545.

Examples

			Northwest corner:
  1,  2,  5,  14,  39, ...
  3,  8, 22,  62, 175, ...
  4, 11, 31,  87, 246, ...
  6, 16, 45, 127, 359, ...
  7, 19, 53, 149, 421, ...
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12; f[n_] :=Floor[2n*Sqrt[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, r1}, {j, 1, c1}]]  (* A191540 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191540 sequence *)
Previous Showing 11-20 of 44 results. Next