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-6 of 6 results.

A255543 Unlucky array: Row n consists of unlucky numbers removed at the stage n of Lucky sieve.

Original entry on oeis.org

2, 4, 5, 6, 11, 19, 8, 17, 39, 27, 10, 23, 61, 57, 45, 12, 29, 81, 91, 97, 55, 14, 35, 103, 121, 147, 117, 85, 16, 41, 123, 153, 199, 181, 177, 109, 18, 47, 145, 183, 253, 243, 277, 225, 139, 20, 53, 165, 217, 301, 315, 369, 345, 295, 157, 22, 59, 187, 247, 351, 379, 471, 465, 447, 325, 175, 24, 65, 207, 279, 403, 441, 567, 589, 603, 493, 381, 213
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2015

Keywords

Comments

The array A(row,col) is read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Examples

			Top left corner of the square array:
    2,   4,   6,   8,  10,  12,   14,   16,   18,   20,  22,    24,   26,   28,   30
    5,  11,  17,  23,  29,  35,   41,   47,   53,   59,  65,    71,   77,   83,   89
   19,  39,  61,  81, 103, 123,  145,  165,  187,  207, 229,   249,  271,  291,  313
   27,  57,  91, 121, 153, 183,  217,  247,  279,  309, 343,   373,  405,  435,  469
   45,  97, 147, 199, 253, 301,  351,  403,  453,  507, 555,   609,  661,  709,  763
   55, 117, 181, 243, 315, 379,  441,  505,  571,  633, 697,   759,  825,  889,  951
   85, 177, 277, 369, 471, 567,  663,  757,  853,  949, 1045, 1141, 1239, 1333, 1431
  109, 225, 345, 465, 589, 705,  829,  945, 1063, 1185, 1305, 1423, 1549, 1669, 1789
  139, 295, 447, 603, 765, 913, 1075, 1227, 1377, 1537, 1689, 1843, 1999, 2155, 2313
  157, 325, 493, 667, 835, 999, 1177, 1347, 1513, 1687, 1861, 2029, 2205, 2367, 2535
...
		

Crossrefs

Permutation of A050505.
Row 1: A005843 (after zero), Row 2: A016969.
Column 1: A219178.
Main diagonal: A255549. The first subdiagonal: A255550 (apart from the initial term).
Transpose: A255544.
This is array A255545 without its leftmost column, A000959.
Cf. also arrays A255127 and A255551.

Programs

  • Mathematica
    rows = cols = 12; L = 2 Range[0, 2000] + 1; A = Join[{2 Range[cols]}, Reap[For[n = 2, n <= rows, r = L[[n++]]; L0 = L; L = ReplacePart[L, Table[r i -> Nothing, {i, 1, Length[L]/r}]]; Sow[Complement[L0, L][[1 ;; cols]]]]][[2, 1]]]; Table[A[[n - k + 1, k]], {n, 1, Min[rows, cols]}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 15 2016 *)
  • Scheme
    (define (A255543 n) (A255543bi (A002260 n) (A004736 n)))
    (define (A255543bi row col) ((rowfun_n_for_A255543 row) col))
    ;; Uses the memoizing definec-macro:
    (definec (rowfun_n_for_A255543 n) (if (= 1 n) (lambda (n) (+ n n)) (let* ((rowfun_for_remaining (rowfun_n_for_A000959sieve (- n 1))) (eka (A000959 n))) (compose rowfun_for_remaining (lambda (n) (* eka n))))))
    (definec (rowfun_n_for_A000959sieve n) (if (= 1 n) A005408shifted (let* ((prevrowfun (rowfun_n_for_A000959sieve (- n 1))) (everynth (prevrowfun n))) (compose-funs prevrowfun (nonzero-pos 1 1 (lambda (i) (modulo i everynth)))))))
    (definec (A000959 n) ((rowfun_n_for_A000959sieve n) n))
    (define (A005408shifted n) (- (* 2 n) 1))

A255551 Lucky / Unlucky array, shifted version, read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

2, 4, 3, 6, 5, 7, 8, 11, 19, 9, 10, 17, 39, 27, 13, 12, 23, 61, 57, 45, 15, 14, 29, 81, 91, 97, 55, 21, 16, 35, 103, 121, 147, 117, 85, 25, 18, 41, 123, 153, 199, 181, 177, 109, 31, 20, 47, 145, 183, 253, 243, 277, 225, 139, 33, 22, 53, 165, 217, 301, 315, 369, 345, 295, 157, 37, 24, 59, 187, 247, 351, 379, 471, 465, 447, 325, 175, 43
Offset: 2

Views

Author

Antti Karttunen, Feb 26 2015

Keywords

Comments

Note how in comparison to A255545, the even numbers on the first row have been shifted one step left, "pushing" term 1 out of the array proper. This was done to obtain a better alignment with arrays like A083221 and A255127 associated with other sieves, from which one may then induce permutations like A255553 by cross-referencing.
The starting offset of the sequence giving the terms in square array is 2. However, we can tacitly assume that a(1) = 1 when the sequence is used one-dimensionally as a permutation of natural numbers.

Examples

			The top left corner of the array:
   2,   4,   6,   8,  10,  12,  14,   16,   18,   20,   22,   24,   26,   28,   30
   3,   5,  11,  17,  23,  29,  35,   41,   47,   53,   59,   65,   71,   77,   83
   7,  19,  39,  61,  81, 103, 123,  145,  165,  187,  207,  229,  249,  271,  291
   9,  27,  57,  91, 121, 153, 183,  217,  247,  279,  309,  343,  373,  405,  435
  13,  45,  97, 147, 199, 253, 301,  351,  403,  453,  507,  555,  609,  661,  709
  15,  55, 117, 181, 243, 315, 379,  441,  505,  571,  633,  697,  759,  825,  889
  21,  85, 177, 277, 369, 471, 567,  663,  757,  853,  949, 1045, 1141, 1239, 1333
  25, 109, 225, 345, 465, 589, 705,  829,  945, 1063, 1185, 1305, 1423, 1549, 1669
  31, 139, 295, 447, 603, 765, 913, 1075, 1227, 1377, 1537, 1689, 1843, 1999, 2155
  33, 157, 325, 493, 667, 835, 999, 1177, 1347, 1513, 1687, 1861, 2029, 2205, 2367
...
		

Crossrefs

Inverse: A255552.
Variant of array A255545. (See also A255543).
Row 1: A005843 (even numbers).
Column 1: 2 followed by A000959(2..) (Lucky numbers from their second term onward).
Main diagonal: A255550.
Similar arrays: A083221, A255127.
Associated permutations: A255553, A255554.

Programs

Formula

For row = 1, A(row,col) = 2*col; For row > 1 and col = 1, A(row,col) = A000959(row); otherwise, A(row,col) = A255543(row,col-1).

A219178 a(n) = first unlucky number removed at the n-th stage of Lucky sieve.

Original entry on oeis.org

2, 5, 19, 27, 45, 55, 85, 109, 139, 157, 175, 213, 255, 265, 337, 363, 387, 411, 423, 457, 513, 547, 597, 637, 675, 715, 789, 807, 843, 871, 907, 987, 1033, 1083, 1113, 1125, 1267, 1297, 1315, 1371, 1407, 1465, 1515, 1555, 1609, 1651, 1671, 1707, 1851, 1873, 1927, 1969
Offset: 1

Views

Author

Phil Carmody, Nov 15 2012

Keywords

Comments

First numbers removed by each lucky number in the lucky number sieve. - This is the original definition of the sequence, still valid from a(2) onward.
a(1) = 2, because at the first stage of Lucky sieve, all even numbers are removed, of which 2 is the first one. - Antti Karttunen, Feb 26 2015

Examples

			1 and 2 are a special case in the lucky number sieve, (1 is the lucky number, but every 2nd element is removed) so are ignored [in the original version of the sequence, which started from a(2). Now we have a(1) = 2. - _Antti Karttunen_, Feb 26 2015]. The 2nd lucky number, 3, removes { 5, 11, ... } from the list, so a(2) = 5. The 3rd lucky number, 7, removes { 19, 39, ... } from the list, so a(3)=19.
		

Crossrefs

Column 1 of A255543, Column 2 of A255545 (And apart from the first term, also column 2 of A255551).

Programs

  • Mathematica
    rows = 52; cols = 1; L = 2 Range[0, 10^4] + 1; A = Join[{2 Range[cols]}, Reap[For[n = 2, n <= rows, r = L[[n++]]; L0 = L; L = ReplacePart[L, Table[r i -> Nothing, {i, 1, Length[L]/r}]]; Sow[Complement[L0, L][[1 ;; cols]]]]][[2, 1]]]; Table[A[[n, 1]], {n, 1, rows}] (* Jean-François Alcover, Mar 15 2016 *)
  • Scheme
    (define (A219178 n) (A255543bi n 1)) ;; Code for A255543bi given in A255543.

Formula

From Antti Karttunen, Feb 26 2015: (Start)
a(n) = A255543(n,1).
Other identities.
For all n >= 2, a(n) = A255553(A001248(n)).
(End)

Extensions

Term a(1) = 2 prepended, without changing the rest of sequence. Name changed, with the original, more restrictive definition moved to the Comments section. - Antti Karttunen, Feb 26 2015

A255553 Permutation of natural numbers: a(n) = A255551(A252460(n)).

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 9, 8, 5, 10, 13, 12, 15, 14, 11, 16, 21, 18, 25, 20, 17, 22, 31, 24, 19, 26, 23, 28, 33, 30, 37, 32, 29, 34, 39, 36, 43, 38, 35, 40, 49, 42, 51, 44, 41, 46, 63, 48, 27, 50, 47, 52, 67, 54, 61, 56, 53, 58, 69, 60, 73, 62, 59, 64, 81, 66, 75, 68, 65, 70, 79, 72, 87, 74, 71, 76, 57, 78, 93, 80, 77, 82, 99, 84, 103, 86, 83, 88, 105, 90
Offset: 1

Views

Author

Antti Karttunen, Feb 26 2015

Keywords

Comments

a(n) tells which number in array A255551, constructed from Lucky sieve, is at the same position where n is in array A083221, constructed from the sieve of Eratosthenes. As both arrays have A005843 (even numbers) as their topmost row, this permutation fixes all of them.

Crossrefs

Inverse: A255554.
Similar or related permutations: A255407, A255408, A249817, A249818, A252460, A255551.

Programs

Formula

a(n) = A255551(A252460(n)).
Other identities:
a(2n) = 2n. [Fixes even numbers.]
For all n >= 1, a(A083141(n)) = A255550(n).
For all n >= 2, a(A000040(n)) = A000959(n).
For all n >= 2, a(A001248(n)) = A219178(n).

A255554 Permutation of natural numbers: a(n) = A083221(A255552(n)).

Original entry on oeis.org

1, 2, 3, 4, 9, 6, 5, 8, 7, 10, 15, 12, 11, 14, 13, 16, 21, 18, 25, 20, 17, 22, 27, 24, 19, 26, 49, 28, 33, 30, 23, 32, 29, 34, 39, 36, 31, 38, 35, 40, 45, 42, 37, 44, 121, 46, 51, 48, 41, 50, 43, 52, 57, 54, 169, 56, 77, 58, 63, 60, 55, 62, 47, 64, 69, 66, 53, 68, 59, 70, 75, 72, 61, 74, 67, 76, 81, 78, 71, 80, 65, 82, 87, 84, 289, 86, 73, 88, 93, 90, 91, 92, 79
Offset: 1

Views

Author

Antti Karttunen, Feb 26 2015

Keywords

Comments

a(n) tells which number in array A083221, constructed from the sieve of Eratosthenes is at the same position where n is in array A255551 constructed from Lucky sieve. As both arrays have A005843 (even numbers) as their topmost row, this permutation fixes all of them.

Crossrefs

Programs

Formula

a(n) = A083221(A255552(n)).
Other identities:
a(2n) = 2n. [Fixes even numbers.]
For all n >= 1, a(A255550(n)) = A083141(n).
For all n >= 2, a(A000959(n)) = A000040(n).
For all n >= 2, a(A219178(n)) = A001248(n).

A255549 Main diagonal of Unlucky array: a(n) = A255543(n,n).

Original entry on oeis.org

2, 11, 61, 121, 253, 379, 663, 945, 1377, 1687, 2143, 2803, 3543, 4053, 5485, 6315, 7023, 7987, 8781, 9871, 11559, 13105, 14743, 16485, 18337, 19959, 23073, 24511, 26371, 27895, 30355, 33789, 36925, 39273, 42177, 44167, 50455, 53221, 55447, 58935, 61921, 65625, 70065, 73321, 78031, 81513, 84361, 87963, 96937, 100075
Offset: 1

Views

Author

Antti Karttunen, Feb 26 2015

Keywords

Comments

a(n) = the n-th number in the infinite subset of unlucky numbers removed at the stage n in the lucky number sieve.

Crossrefs

Programs

  • Mathematica
    rows = cols = 50; L = 2 Range[0, 10^5] + 1; A = Join[{2 Range[cols]}, Reap[For[n = 2, n <= rows, r = L[[n++]]; L0 = L; L = ReplacePart[L, Table[r i -> Nothing, {i, 1, Length[L]/r}]]; Sow[Complement[L0, L][[1 ;; cols]]]]][[2, 1]]]; Table[A[[n, n]], {n, 1, Min[rows, cols]}] (* Jean-François Alcover, Mar 15 2016 *)
  • Scheme
    (define (A255549 n) (A255543bi n n)) ;; Code for A255543bi given in A255543.

Formula

a(n) = A255543(n,n).
Showing 1-6 of 6 results.