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.

A255127 Ludic array: square array A(row,col), where row n lists the numbers removed at stage n in the sieve which produces Ludic numbers. Array is 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, 9, 5, 8, 15, 19, 7, 10, 21, 35, 31, 11, 12, 27, 49, 59, 55, 13, 14, 33, 65, 85, 103, 73, 17, 16, 39, 79, 113, 151, 133, 101, 23, 18, 45, 95, 137, 203, 197, 187, 145, 25, 20, 51, 109, 163, 251, 263, 281, 271, 167, 29, 22, 57, 125, 191, 299, 325, 367, 403, 311, 205, 37, 24, 63, 139, 217, 343, 385, 461, 523, 457, 371, 253, 41
Offset: 2

Views

Author

Antti Karttunen, Feb 22 2015

Keywords

Comments

The starting offset of the sequence giving the terms of square array is 2. However, we can tacitly assume that a(1) = 1 when the sequence is used as a permutation of natural numbers. However, term 1 itself is out of the array.
The choice of offset = 2 for the terms starting in rows >= 1 is motivated by the desire to have a permutation of the integers n -> a(n) with a(n) = A(A002260(n-1), A004736(n-1)) for n > 1 and a(1) := 1. However, since this sequence is declared as a "table", offset = 2 would mean that the first *row* (not element) has index 2. I think the sequence should have offset = 1 and the permutation of the integers would be n -> a(n-1) with a(0) := 1 (if a(1) = A(1,1) = 2). Or, the sequence could have offset 0, with an additional row 0 of length 1 with the only element a(0) = A(0,1) = 1, the permutation still being n -> a(n-1) if a(n=0, 1, 2, ...) = (1, 2, 4, ...). This would be in line with considering 1 as the first ludic number, and A(n, 1) = A003309(n+1) for n >= 0. - M. F. Hasler, Nov 12 2024

Examples

			The top left corner of the array:
   2,   4,   6,   8,  10,  12,   14,   16,   18,   20,   22,   24,   26
   3,   9,  15,  21,  27,  33,   39,   45,   51,   57,   63,   69,   75
   5,  19,  35,  49,  65,  79,   95,  109,  125,  139,  155,  169,  185
   7,  31,  59,  85, 113, 137,  163,  191,  217,  241,  269,  295,  323
  11,  55, 103, 151, 203, 251,  299,  343,  391,  443,  491,  539,  587
  13,  73, 133, 197, 263, 325,  385,  449,  511,  571,  641,  701,  761
  17, 101, 187, 281, 367, 461,  547,  629,  721,  809,  901,  989, 1079
  23, 145, 271, 403, 523, 655,  781,  911, 1037, 1157, 1289, 1417, 1543
  25, 167, 311, 457, 599, 745,  883, 1033, 1181, 1321, 1469, 1615, 1753
  29, 205, 371, 551, 719, 895, 1073, 1243, 1421, 1591, 1771, 1945, 2117
...
		

Crossrefs

Transpose: A255129.
Inverse: A255128. (When considered as a permutation of natural numbers with a(1) = 1).
Cf. A260738 (index of the row where n occurs), A260739 (of the column).
Main diagonal: A255410.
Column 1: A003309 (without the initial 1). Column 2: A254100.
Row 1: A005843, Row 2: A016945, Row 3: A255413, Row 4: A255414, Row 5: A255415, Row 6: A255416, Row 7: A255417, Row 8: A255418, Row 9: A255419.
A192607 gives all the numbers right of the leftmost column, and A192506 gives the composites among them.
Cf. A272565, A271419, A271420 and permutations A269379, A269380, A269384.
Cf. also related or derived arrays A260717, A257257, A257258 (first differences of rows), A276610 (of columns), A276580.
Analogous arrays for other sieves: A083221, A255551, A255543.
Cf. A376237 (ludic factorials), A377469 (ludic analog of A005867).

Programs

  • Mathematica
    rows = 12; cols = 12; t = Range[2, 3000]; r = {1}; n = 1; While[n <= rows, k = First[t]; AppendTo[r, k]; t0 = t; t = Drop[t, {1, -1, k}]; ro[n++] = Complement[t0, t][[1 ;; cols]]]; A = Array[ro, rows]; Table[ A[[n - k + 1, k]], {n, 1, rows}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 14 2016, after Ray Chandler *)
  • Python
    a255127 = lambda n: A255127(A002260(k-1), A004736(k-1))
    def A255127(n, k):
        A = A255127; R = A.rows
        while len(R) <= n or len(R[n]) < min(k, A.P[n]): A255127_extend(2*n)
        return R[n][(k-1) % A.P[n]] + (k-1)//A.P[n] * A.S[n]
    A=A255127; A.rows=[[1],[2],[3]]; A.P=[1]*3; A.S=[0,2,6]; A.limit=30
    def A255127_extend(rMax=9, A=A255127):
        A.limit *= 2; L = [x+5-x%2 for x in range(0, A.limit, 3)]
        for r in range(3, rMax):
            if len(A.P) == r:
                A.P += [ A.P[-1] * (A.rows[-1][0] - 1) ]  # A377469
                A.rows += [[]]; A.S += [ A.S[-1] * L[0] ] # ludic factorials
            if len(R := A.rows[r]) < A.P[r]: # append more terms to this row
                R += L[ L[0]*len(R) : A.S[r] : L[0] ]
            L = [x for i, x in enumerate(L) if i%L[0]] # M. F. Hasler, Nov 17 2024
  • Scheme
    (define (A255127 n) (if (<= n 1) n (A255127bi (A002260 (- n 1)) (A004736 (- n 1)))))
    (define (A255127bi row col) ((rowfun_n_for_A255127 row) col))
    ;; definec-macro memoizes its results:
    (definec (rowfun_n_for_A255127 n) (if (= 1 n) (lambda (n) (+ n n)) (let* ((rowfun_for_remaining (rowfun_n_for_remaining_numbers (- n 1))) (eka (rowfun_for_remaining 0))) (COMPOSE rowfun_for_remaining (lambda (n) (* eka (- n 1)))))))
    (definec (rowfun_n_for_remaining_numbers n) (if (= 1 n) (lambda (n) (+ n n 3)) (let* ((rowfun_for_prevrow (rowfun_n_for_remaining_numbers (- n 1))) (off (rowfun_for_prevrow 0))) (COMPOSE rowfun_for_prevrow (lambda (n) (+ 1 n (floor->exact (/ n (- off 1)))))))))
    

Formula

From M. F. Hasler, Nov 12 2024: (Start)
A(r, c) = A(r, c-P(r)) + S(r) = A(r, ((c-1) mod P(r)) + 1) + floor((c-1)/P(r))*S(r) with periods P = (1, 1, 2, 8, 48, 480, 5760, ...) = A377469, and shifts S = (2, 6, 30, 210, 2310, 30030, 510510) = A376237(2, 3, ...). For example:
A(1, c) = A(1, c-1) + 2 = 2 + (c-1)*2 = 2*c,
A(2, c) = A(2, c-1) + 6 = 3 + (c-1)*6 = 6*c - 3,
A(3, c) = A(3, c-2) + 30 = {5 if c is odd else 19} + floor((c-1)/2)*30 = 15*c - 11 + (c mod 2),
A(4, c) = A(4, c-8) + 210 = A(4, ((c-1) mod 8)+1) + floor((c-1)/8)*210, etc. (End)

A257251 Square array A(row,col) = A083221(row,col+1) - A083221(row,col): the first differences of each row of array constructed from the sieve of Eratosthenes.

Original entry on oeis.org

2, 2, 6, 2, 6, 20, 2, 6, 10, 42, 2, 6, 20, 28, 110, 2, 6, 10, 14, 22, 156, 2, 6, 20, 28, 44, 52, 272, 2, 6, 10, 14, 22, 26, 34, 342, 2, 6, 20, 28, 44, 52, 68, 76, 506, 2, 6, 10, 42, 66, 78, 102, 114, 138, 812, 2, 6, 20, 14, 22, 26, 34, 38, 46, 58, 930, 2, 6, 10, 42, 66, 78, 102, 114, 138, 174, 186, 1332
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2015

Keywords

Comments

The array is read by downwards antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Examples

			The top left corner of the array:
     2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2
     6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6
    20,  10,  20,  10,  20,  10,  20,  10,  20,  10,  20,  10,  20,  10,  20
    42,  28,  14,  28,  14,  28,  42,  14,  42,  28,  14,  28,  14,  28,  42
   110,  22,  44,  22,  44,  66,  22,  66,  44,  22,  44,  66,  66,  22,  66
   156,  52,  26,  52,  78,  26,  78,  52,  26,  52,  78,  78,  26,  78,  52
   272,  34,  68, 102,  34, 102,  68,  34,  68, 102, 102,  34, 102,  68,  34
   342,  76, 114,  38, 114,  76,  38,  76, 114, 114,  38, 114,  76,  38, 114
   506, 138,  46, 138,  92,  46,  92, 138, 138,  46, 138,  92,  46, 138,  92
   812,  58, 174, 116,  58, 116, 174, 174,  58, 174, 116,  58, 174, 116, 174
   930, 186, 124,  62, 124, 186, 186,  62, 186, 124,  62, 186, 124, 186, 248
  1332, 148,  74, 148, 222, 222,  74, 222, 148,  74, 222, 148, 222, 296, 148
  1640,  82, 164, 246, 246,  82, 246, 164,  82, 246, 164, 246, 328, 164,  82
  1806, 172, 258, 258,  86, 258, 172,  86, 258, 172, 258, 344, 172,  86, 172
  2162, 282, 282,  94, 282, 188,  94, 282, 188, 282, 376, 188,  94, 188,  94
  2756, 318, 106, 318, 212, 106, 318, 212, 318, 424, 212, 106, 212, 106, 212
  ...
		

Crossrefs

Transpose: A257252.
Column 1: A036689.
Row 4: 7 * A145011.
Cf. A083221, A257253 (same array but with terms divided by 2).
Cf. arrays A257255 and A257257, also A257513.

Programs

Formula

A(row,col) = A083221(row,col+1) - A083221(row,col).
A(row,col) = 2*A257253(row,col).

A256482 a(n) = A254100(n) - A003309(n+1).

Original entry on oeis.org

2, 6, 14, 24, 44, 60, 84, 122, 142, 176, 216, 252, 274, 308, 360, 412, 454, 498, 546, 594, 648, 672, 736, 810, 868, 908, 930, 994, 1040, 1130, 1188, 1254, 1310, 1398, 1444, 1484, 1500, 1614, 1748, 1780, 1866, 1890, 1944, 2012, 2040, 2096, 2154, 2240, 2328, 2436, 2488, 2544, 2676, 2740, 2800, 2948, 2976, 3034, 3090, 3210
Offset: 1

Views

Author

Antti Karttunen, Apr 30 2015

Keywords

Crossrefs

Column 1 of A257257.
Cf. also A256483 (same terms divided by 2).

Programs

Formula

a(n) = A254100(n) - A003309(n+1).
a(n) = 2*A256483(n).

A276610 Square array A(row,col) = A255127(row+1,col) - A255127(row,col): the first differences of each column of Ludic array, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 5, 2, 9, 10, 2, 13, 20, 12, 4, 17, 28, 24, 24, 2, 21, 38, 36, 44, 18, 4, 25, 46, 48, 66, 30, 28, 6, 29, 56, 58, 90, 46, 54, 44, 2, 33, 64, 68, 114, 60, 84, 84, 22, 4, 37, 74, 82, 136, 74, 104, 122, 40, 38, 8, 41, 82, 92, 152, 86, 136, 156, 54, 60, 48, 4, 45, 92, 102, 174, 106, 162, 194, 76, 94, 116, 40, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2016

Keywords

Comments

Not all rows are monotonic. See A276620 for their first differences.

Examples

			The top left 16 x 15 corner of the array:
1,  5,   9,  13,  17,  21,  25,  29,  33,  37,  41,  45,  49,  53,  57,  61
2, 10,  20,  28,  38,  46,  56,  64,  74,  82,  92, 100, 110, 118, 128, 136
2, 12,  24,  36,  48,  58,  68,  82,  92, 102, 114, 126, 138, 148, 158, 172
4, 24,  44,  66,  90, 114, 136, 152, 174, 202, 222, 244, 264, 284, 310, 330
2, 18,  30,  46,  60,  74,  86, 106, 120, 128, 150, 162, 174, 192, 204, 216
4, 28,  54,  84, 104, 136, 162, 180, 210, 238, 260, 288, 318, 346, 366, 396
6, 44,  84, 122, 156, 194, 234, 282, 316, 348, 388, 428, 464, 504, 548, 584
2, 22,  40,  54,  76,  90, 102, 122, 144, 164, 180, 198, 210, 230, 240, 264
4, 38,  60,  94, 120, 150, 190, 210, 240, 270, 302, 330, 364, 390, 430, 456
8, 48, 116, 162, 236, 288, 336, 406, 446, 510, 576, 622, 680, 738, 786, 844
4, 40,  76, 104, 136, 166, 194, 212, 270, 298, 318, 356, 382, 412, 462, 492
2, 24,  38,  52,  62, 108, 124, 148, 150, 182, 198, 222, 242, 260, 272, 300
4, 38,  70, 116, 148, 164, 210, 240, 270, 300, 354, 388, 414, 448, 474, 504
6, 58, 102, 142, 194, 234, 290, 348, 408, 436, 460, 524, 576, 630, 696, 726
8, 60, 134, 204, 256, 322, 390, 446, 498, 578, 642, 684, 774, 828, 870, 948
		

Crossrefs

Transpose: A276609.
Row 1: A016813.
Column 1: A260723 (from the second 1 onward), Column 2: A276606.
Cf. also arrays A257257, A257513 and A276620 (gives the first differences of each row).

Programs

Formula

A(row,col) = A255127(row+1,col) - A255127(row,col).
A(row,col) = A269379(A255127(row,col)) - A255127(row,col).

A257255 Square array A(row,col) = A255545(row,col+1) - A255545(row,col): the first differences of each row of Lucky-Unlucky array.

Original entry on oeis.org

1, 2, 2, 2, 6, 12, 2, 6, 20, 18, 2, 6, 22, 30, 32, 2, 6, 20, 34, 52, 40, 2, 6, 22, 30, 50, 62, 64, 2, 6, 20, 32, 52, 64, 92, 84, 2, 6, 22, 30, 54, 62, 100, 116, 108, 2, 6, 20, 34, 48, 72, 92, 120, 156, 124, 2, 6, 22, 30, 50, 64, 102, 120, 152, 168, 138, 2, 6, 20, 32, 52, 62, 96, 124, 156, 168, 206, 170
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2015

Keywords

Comments

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

Examples

			The top left corner of the array:
    1,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2,   2
    2,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6,   6
   12,  20,  22,  20,  22,  20,  22,  20,  22,  20,  22,  20,  22,  20,  22
   18,  30,  34,  30,  32,  30,  34,  30,  32,  30,  34,  30,  32,  30,  34
   32,  52,  50,  52,  54,  48,  50,  52,  50,  54,  48,  54,  52,  48,  54
   40,  62,  64,  62,  72,  64,  62,  64,  66,  62,  64,  62,  66,  64,  62
   64,  92, 100,  92, 102,  96,  96,  94,  96,  96,  96,  96,  98,  94,  98
   84, 116, 120, 120, 124, 116, 124, 116, 118, 122, 120, 118, 126, 120, 120
  108, 156, 152, 156, 162, 148, 162, 152, 150, 160, 152, 154, 156, 156, 158
  124, 168, 168, 174, 168, 164, 178, 170, 166, 174, 174, 168, 176, 162, 168
  138, 206, 192, 198, 198, 190, 200, 202, 192, 200, 190, 198, 200, 192, 208
  170, 232, 236, 238, 230, 244, 230, 240, 226, 242, 238, 234, 230, 246, 222
  206, 270, 274, 278, 268, 272, 280, 278, 268, 276, 276, 282, 266, 270, 286
  214, 284, 300, 286, 302, 288, 292, 288, 290, 294, 292, 290, 298, 284, 300
  274, 366, 356, 390, 358, 372, 354, 374, 378, 360, 360, 376, 366, 372, 366
  296, 384, 418, 392, 400, 396, 398, 390, 396, 402, 394, 402, 398, 400, 392
  ...
		

Crossrefs

Column 1: A257256.
Cf. A255545.
Cf. also arrays A257251 and A257257.

Programs

Formula

A(row,col) = A255545(row,col+1) - A255545(row,col).

A257258 Square array A(row,col) = (1/2) * (A255127(row,col+1) - A255127(row,col)): half of the first differences of each row of Ludic array.

Original entry on oeis.org

1, 1, 3, 1, 3, 7, 1, 3, 8, 12, 1, 3, 7, 14, 22, 1, 3, 8, 13, 24, 30, 1, 3, 7, 14, 24, 30, 42, 1, 3, 8, 12, 26, 32, 43, 61, 1, 3, 7, 13, 24, 33, 47, 63, 71, 1, 3, 8, 14, 24, 31, 43, 66, 72, 88, 1, 3, 7, 13, 22, 30, 47, 60, 73, 83, 108, 1, 3, 8, 12, 24, 32, 43, 66, 71, 90, 117, 126
Offset: 1

Views

Author

Antti Karttunen, Apr 29 2015

Keywords

Comments

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

Examples

			The top left corner of the array:
    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1
    3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3
    7,   8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   8,   7,   8
   12,  14,  13,  14,  12,  13,  14,  13,  12,  14,  13,  14,  12,  13,  14,  13
   22,  24,  24,  26,  24,  24,  22,  24,  26,  24,  24,  24,  22,  26,  24,  24
   30,  30,  32,  33,  31,  30,  32,  31,  30,  35,  30,  30,  31,  32,  30,  33
   42,  43,  47,  43,  47,  43,  41,  46,  44,  46,  44,  45,  45,  42,  45,  45
   61,  63,  66,  60,  66,  63,  65,  63,  60,  66,  64,  63,  65,  64,  63,  65
   71,  72,  73,  71,  73,  69,  75,  74,  70,  74,  73,  69,  75,  69,  75,  74
   88,  83,  90,  84,  88,  89,  85,  89,  85,  90,  87,  86,  88,  89,  88,  87
  108, 117, 113, 121, 114, 113, 120, 109, 117, 123, 110, 115, 117, 113, 117, 118
  126, 135, 127, 137, 129, 127, 129, 138, 131, 133, 129, 128, 132, 138, 132, 132
  137, 142, 134, 142, 152, 135, 141, 139, 147, 141, 141, 138, 141, 144, 146, 138
  154, 158, 157, 158, 160, 158, 156, 154, 162, 168, 158, 151, 158, 157, 161, 157
  180, 180, 177, 184, 180, 186, 185, 184, 176, 180, 190, 177, 185, 190, 176, 184
  206, 217, 212, 210, 213, 220, 213, 210, 216, 212, 211, 222, 212, 211, 215, 213
  ...
		

Crossrefs

Column 1: A256483.
Cf. A255127, A257257 (same array but with terms multiplied by 2).

Programs

Formula

A(row,col) = (1/2) * (A255127(row,col+1) - A255127(row,col)).
A(row,col) = A257257(row,col)/2.
Showing 1-6 of 6 results.