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

A278538 a(n) = index of the row where n is located in array A278505.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

Ordinal transform of A278539 (most likely, but hinges on that also the columns of A278505 are strictly growing).

Crossrefs

Programs

Formula

If A278169(n) = 1, a(n) = A100617(n), otherwise a(n) = A278528(n).
If n = A000960(k), a(n) = k, otherwise a(n) = number of the round in which n is removed in the Flavius sieve.

A278539 a(n) = index of the column where n is located in array A278505.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

Ordinal transform of A278538 (as the rows of A278505 are strictly growing).

Crossrefs

One more than A278529.

Programs

Formula

a(n) = 1 + A278529(n).

A278506 Inverse permutation to A278505.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 11, 9, 16, 8, 22, 10, 29, 14, 37, 12, 46, 15, 56, 13, 67, 17, 79, 20, 92, 21, 106, 23, 121, 27, 137, 18, 154, 30, 172, 19, 191, 28, 211, 38, 232, 35, 254, 24, 277, 47, 301, 36, 326, 26, 352, 57, 379, 25, 407, 31, 436, 68, 466, 44, 497, 45, 529, 80, 562, 54, 596, 39, 631, 93, 667, 34, 704, 32
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Crossrefs

Inverse: A278505.
Cf. also A278504, A278512.

Programs

  • Scheme
    (define (A278506 n) (let ((row (A278538 n)) (col (A278539 n))) (* (/ 1 2) (- (expt (+ row col) 2) row col col col -2))))

Formula

a(n) = (1/2) * ((c+r)^2 - r - 3*c + 2), where c = A278539(n), and r = A278538(n).

A278503 Transpose of square array A278505.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 13, 9, 11, 6, 19, 15, 21, 17, 8, 27, 25, 37, 33, 23, 10, 39, 31, 51, 55, 45, 29, 12, 49, 43, 73, 85, 75, 57, 35, 14, 63, 61, 99, 121, 111, 97, 69, 41, 16, 79, 67, 127, 151, 159, 145, 115, 81, 47, 18, 91, 87, 163, 193, 211, 199, 171, 135, 93, 53, 20, 109, 103, 187, 247, 271, 267, 243, 205, 157, 105, 59, 22
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

See A278505.

Crossrefs

Inverse: A278504.
Transpose: A278505.

Programs

A000960 Flavius Josephus's sieve: Start with the natural numbers; at the k-th sieving step, remove every (k+1)-st term of the sequence remaining after the (k-1)-st sieving step; iterate.

Original entry on oeis.org

1, 3, 7, 13, 19, 27, 39, 49, 63, 79, 91, 109, 133, 147, 181, 207, 223, 253, 289, 307, 349, 387, 399, 459, 481, 529, 567, 613, 649, 709, 763, 807, 843, 927, 949, 1009, 1093, 1111, 1189, 1261, 1321, 1359, 1471, 1483, 1579, 1693, 1719, 1807, 1899, 1933, 2023
Offset: 1

Views

Author

Keywords

Comments

a(n) is never divisible by 2 or 5. - Thomas Anton, Nov 01 2018

Examples

			Start with
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... (A000027) and delete every second term, giving
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 ... (A005408) and delete every 3rd term, giving
1 3 7 9 13 15 19 21 25 27 ... (A056530) and delete every 4th term, giving
1 3 7 13 15 19 25 27 ... (A056531) and delete every 5th term, giving
.... Continue forever and what's left is the sequence.
(The array formed by these rows is A278492.)
For n = 5, 5^2 = 25, go down to a multiple of 4 giving 24, then to a multiple of 3 = 21, then to a multiple of 2 = 20, then to a multiple of 1 = 19, so a(5) = 19.
		

References

  • V. Brun, Un procédé qui ressemble au crible d'Ératosthène, Analele Stiintifice Univ. "Al. I. Cuza", Iasi, Romania, Sect. Ia Matematica, 1965, vol. 11B, pp. 47-53.
  • Problems 107, 116, Nord. Mat. Tidskr. 5 (1957), 114-116.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A119446 for triangle whose leading diagonal is A119447 and this sequence gives all possible values for A119447 (except A119447 cannot equal 1 because prime(n)/n is never 1).
Cf. A100617 (a left inverse), A100618.
Cf. A278169 (characteristic function).
Main diagonal of A278492, leftmost column of A278505, positions of zeros in A278528 & A278529.

Programs

  • Haskell
    a000960 n = a000960_list !! (n-1)
    a000960_list = sieve 1 [1..] where
       sieve k (x:xs) = x : sieve (k+1) (flavius xs) where
          flavius xs = us ++ flavius vs where (u:us,vs) = splitAt (k+1) xs
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Maple
    S[1]:={seq(i,i=1..2100)}: for n from 2 to 2100 do S[n]:=S[n-1] minus {seq(S[n-1][n*i],i=1..nops(S[n-1])/n)} od: A:=S[2100]; # Emeric Deutsch, Nov 17 2004
  • Mathematica
    del[lst_, k_] := lst[[Select[Range[Length[lst]], Mod[ #, k] != 0 &]]]; For[k = 2; s = Range[2100], k <= Length[s], k++, s = del[s, k]]; s
    f[n_] := Fold[ #2*Ceiling[ #1/#2 + 1] &, n, Reverse@Range[n - 1]]; Array[f, 60] (* Robert G. Wilson v, Nov 05 2005 *)
  • PARI
    a(n)=local(A=n,D);for(i=1,n-1,D=n-i;A=D*ceil(A/D+1));return(A) \\ Paul D. Hanna, Oct 10 2005
    
  • Python
    def flavius(n):
        L = list(range(1,n+1));j=2
        while j <= len(L):
            L = [L[i] for i in range(len(L)) if (i+1)%j]
            j+=1
        return L
    flavius(100)
    # Robert FERREOL, Nov 08 2015

Formula

Let F(n) = number of terms <= n. Andersson, improving results of Brun, shows that F(n) = 2 sqrt(n/Pi) + O(n^(1/6)). Hence a(n) grows like Pi*n^2 / 4.
To get n-th term, start with n and successively round up to next 2 multiples of n-1, n-2, ..., 1 (compare to Mancala sequence A002491). E.g.: to get 11th term: 11->30->45->56->63->72->80->84->87->90->91; i.e., start with 11, successively round up to next 2 multiples of 10, 9, .., 1. - Paul D. Hanna, Oct 10 2005
As in Paul D. Hanna's formula, start with n^2 and successively move down to the highest multiple of n-1, n-2, etc., smaller than your current number: 121 120 117 112 105 102 100 96 93 92 91, so a(11) = 91, from moving down to multiples of 10, 9, ..., 1. - Joshua Zucker, May 20 2006
Or, similarly for n = 5, begin with 25, down to a multiple of 4 = 24, down to a multiple of 3 = 21, then to a multiple of 2 = 20 and finally to a multiple of 1 = 19, so a(5) = 19. - Joshua Zucker, May 20 2006
This formula arises in A119446; the leading term of row k of that triangle = a(prime(k)/k) from this sequence. - Joshua Zucker, May 20 2006
a(n) = 2*A073359(n-1) + 1, cf. link to posts on the SeqFan list. - M. F. Hasler, Nov 23 2016
a(n) = 1 + A278484(n-1). - Antti Karttunen, Nov 23 2016, after David W. Wilson's posting on SeqFan list Nov 22 2016

Extensions

More terms and better description from Henry Bottomley, Jun 16 2000
Entry revised by N. J. A. Sloane, Nov 13 2004
More terms from Paul D. Hanna, Oct 10 2005

A100287 First occurrence of n in A100002; the least k such that A100002(k) = n.

Original entry on oeis.org

1, 2, 5, 9, 15, 25, 31, 43, 61, 67, 87, 103, 123, 139, 169, 183, 219, 241, 259, 301, 331, 361, 391, 447, 463, 511, 553, 589, 643, 687, 723, 783, 819, 867, 931, 979, 1027, 1099, 1179, 1227, 1309, 1347, 1393, 1479, 1539, 1603, 1699, 1759, 1863, 1909, 2019, 2029
Offset: 1

Views

Author

T. D. Noe, Nov 11 2004

Keywords

Comments

Also, the first number that is crossed off at stage n in the Flavius sieve (A000960). - N. J. A. Sloane, Nov 21 2004
The sequence appears to grow roughly like 0.7825*n^2. Note that for n>2, the second occurrence of n in A100002 is at a(n)+1.
Equals main diagonal of triangle A101224, which is defined by the process starting with column 1: A101224(n,1) = n^2-n+1 for n>=1 and continuing with: A101224(n,k) = (n-k+1)*floor( (A101224(n,k-1) - 1)/(n-k+1) ) for k>1 until k=n. I.e., a(n) = A101224(n,n). - Paul D. Hanna, Dec 01 2004

Crossrefs

Column 1 of A278507, column 2 of A278505 (without the initial 1-term).

Programs

  • Mathematica
    a[n_] := Fold[#2*Ceiling[#1/#2 + 1] &, 1, Reverse@Range[n - 1]]; Array[a, 30] (* Birkas Gyorgy, Feb 16 2011 *)
  • PARI
    {a(n)=local(A);for(k=1,n,if(k==1,A=n^2-n+1,A=(n-k+1)*floor((A-1)/(n-k+1))));A}

Formula

a(n) ~ Pi/4 * n^2 (via A000960). - Bill McEachen, Aug 08 2024

A278507 Square array A(row,col) where row n lists the numbers removed in round n of Flavius sieve. 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, 5, 6, 11, 9, 8, 17, 21, 15, 10, 23, 33, 37, 25, 12, 29, 45, 55, 51, 31, 14, 35, 57, 75, 85, 73, 43, 16, 41, 69, 97, 111, 121, 99, 61, 18, 47, 81, 115, 145, 159, 151, 127, 67, 20, 53, 93, 135, 171, 199, 211, 193, 163, 87, 22, 59, 105, 157, 205, 243, 267, 271, 247, 187, 103, 24, 65, 117, 175, 231, 283, 319, 343, 339, 303, 229, 123
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Examples

			The top left corner of the array:
   2,   4,   6,   8,  10,  12,  14,  16,  18,   20
   5,  11,  17,  23,  29,  35,  41,  47,  53,   59
   9,  21,  33,  45,  57,  69,  81,  93, 105,  117
  15,  37,  55,  75,  97, 115, 135, 157, 175,  195
  25,  51,  85, 111, 145, 171, 205, 231, 265,  291
  31,  73, 121, 159, 199, 243, 283, 327, 367,  409
  43,  99, 151, 211, 267, 319, 379, 433, 487,  547
  61, 127, 193, 271, 343, 421, 483, 559, 631,  699
  67, 163, 247, 339, 427, 519, 607, 691, 793,  879
  87, 187, 303, 403, 523, 639, 739, 853, 963, 1081
		

Crossrefs

Transpose: A278508.
This is array A278505 without its leftmost column, A000960.
Column 1: A100287 (apart from its initial 1).
Cf. A278529 (column index of n), A278538 (row index of n).
Cf. A278492.
Cf. A255543 for analogous array for Lucky sieve.

Programs

Formula

A(1,col) = 2*col; for row > 1, A(row,col) = A278492(row-1,(col*(row+1))-1). [Note that unlike this array, A278492 uses zero-based indexing for its rows and columns.]

A278511 Square array constructed from Flavius sieve, shifted version, read by descending antidiagonals.

Original entry on oeis.org

2, 4, 3, 6, 5, 7, 8, 11, 9, 13, 10, 17, 21, 15, 19, 12, 23, 33, 37, 25, 27, 14, 29, 45, 55, 51, 31, 39, 16, 35, 57, 75, 85, 73, 43, 49, 18, 41, 69, 97, 111, 121, 99, 61, 63, 20, 47, 81, 115, 145, 159, 151, 127, 67, 79, 22, 53, 93, 135, 171, 199, 211, 193, 163, 87, 91, 24, 59, 105, 157, 205, 243, 267, 271, 247, 187, 103, 109
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

Note how in comparison to A278505, 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 by cross-referencing. (See also A255551.)

Examples

			The top left corner of the array:
   2,  4,   6,   8,  10,  12,  14,  16,  18,  20
   3,  5,  11,  17,  23,  29,  35,  41,  47,  53
   7,  9,  21,  33,  45,  57,  69,  81,  93, 105
  13, 15,  37,  55,  75,  97, 115, 135, 157, 175
  19, 25,  51,  85, 111, 145, 171, 205, 231, 265
  27, 31,  73, 121, 159, 199, 243, 283, 327, 367
  39, 43,  99, 151, 211, 267, 319, 379, 433, 487
  49, 61, 127, 193, 271, 343, 421, 483, 559, 631
  63, 67, 163, 247, 339, 427, 519, 607, 691, 793
  79, 87, 187, 303, 403, 523, 639, 739, 853, 963
		

Crossrefs

Inverse: A278512.
Cf. A000960 (column 1, but with its initial 1 replaced by 2), A278505, A278507.
Cf. A278538 (row index of n), A278537 (column index of n).
Cf. A083221, A255127, A255551 (analogous arrays constructed from other sieves).

Programs

Formula

A(1,col) = 2*col; For row > 1, A(row,1) = A000960(row) if col = 1, otherwise, A(row,col) = A278507(row,col-1).
For all n > 1, A(A278538(n), A278537(n)) = n.
Showing 1-8 of 8 results.