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-10 of 12 results. Next

A260438 Row index to A255545: If n is k-th Lucky number then a(n) = k, otherwise a(n) = number of the stage where n is removed in Lucky sieve.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 29 2015

Keywords

Comments

For n >= 2 this works also as a row index to array A255551 (which does not contain 1) and when restricted to unlucky numbers, A050505, also as a row index to array A255543.

Crossrefs

Cf. also A260429, A260439 (corresponding column indices).
Cf. A055396, A260738 for row indices to other arrays similar to A255545.

Programs

  • Scheme
    (define (A260438 n) (cond ((not (zero? (A145649 n))) (A109497 n)) ((even? n) 1) (else (let searchrow ((row 2)) (let searchcol ((col 1)) (cond ((>= (A255543bi row col) n) (if (= (A255543bi row col) n) row (searchrow (+ 1 row)))) (else (searchcol (+ 1 col))))))))) ;; Code for A255543bi given in A255543.

Formula

Other identities. For all n >= 1:
a(A000959(n)) = n.
a(A219178(n)) = n.
a(2n) = 1. [All even numbers are removed at the stage one of the sieve.]
a(A016969(n)) = 2.
a(A258016(n)) = 3.
a(A260440(n)) = 4.
A255545(a(n), A260429(n)) = n.
For all n >= 2, A255551(a(n), A260439(n)) = n.

A260429 Column index to A255545: if n is Lucky number, then a(n) = 1, otherwise a(n) = 1 + the position at the stage where n is removed in the Lucky sieve.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 29 2015

Keywords

Crossrefs

One more than A260437.
Cf. also A260438 (corresponding row index).
Cf. A078898, A246277, A260439, A260739 for column indices to other arrays similar to A255545.

Programs

  • Scheme
    (define (A260429 n) (cond ((not (zero? (A145649 n))) 1) ((even? n) (+ 1 (/ n 2))) (else (let searchrow ((row 2)) (let searchcol ((col 1)) (cond ((>= (A255543bi row col) n) (if (= (A255543bi row col) n) (+ 1 col) (searchrow (+ 1 row)))) (else (searchcol (+ 1 col))))))))) ;; Code for A255543bi given in A255543.

Formula

Other identities. For all n >= 1:
a(n) = 1 + A260437(n).
Iff A145649(n) = 1, then a(n) = 1.
a(2n) = n+1. [Even numbers are removed at the stage one of the sieve, after 1 which is also removed in the beginning.]
a(A219178(n)) = 2.
A255545(A260438(n), a(n)) = n.

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

A255546 Inverse permutation to A255545.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 11, 10, 16, 8, 22, 15, 29, 21, 37, 12, 46, 9, 56, 28, 67, 17, 79, 36, 92, 14, 106, 23, 121, 45, 137, 55, 154, 30, 172, 66, 191, 13, 211, 38, 232, 78, 254, 20, 277, 47, 301, 91, 326, 105, 352, 57, 379, 27, 407, 19, 436, 68, 466, 18, 497, 120, 529, 80, 562, 136, 596, 153, 631, 93, 667, 171, 704, 190, 742, 107, 781, 210, 821, 24
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2015

Keywords

Crossrefs

Inverse: A255545.

A000959 Lucky numbers.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99, 105, 111, 115, 127, 129, 133, 135, 141, 151, 159, 163, 169, 171, 189, 193, 195, 201, 205, 211, 219, 223, 231, 235, 237, 241, 259, 261, 267, 273, 283, 285, 289, 297, 303
Offset: 1

Views

Author

N. J. A. Sloane; entry updated Mar 07 2008

Keywords

Comments

An interesting general discussion of the phenomenon of 'random primes' (generalizing the lucky numbers) occurs in Hawkins (1958). Heyde (1978) proves that Hawkins' random primes do not only almost always satisfy the Prime Number Theorem but also the Riemann Hypothesis. - Alf van der Poorten, Jun 27 2002
Bui and Keating establish an asymptotic formula for the number of k-difference twin primes, and more generally to all l-tuples, of Hawkins primes, a probabilistic model of the Eratosthenes sieve. The formula for k = 1 was obtained by Wunderlich [Acta Arith. 26 (1974), 59 - 81]. - Jonathan Vos Post, Mar 24 2009. (This is quoted from the abstract of the Bui-Keating (2006) article, Joerg Arndt, Jan 04 2014)
It appears that a 1's line is formed, as in the Gilbreath's conjecture, if we use 2 (or 4), 3, 5 (differ of 7), 9, 13, 15, 21, 25, ... instead of A000959 1, 3, 7, 9, 13, 15, 21, 25, ... - Eric Desbiaux, Mar 25 2010
The Mersenne primes 2^p - 1 (= A000668, p in A000043) are in this sequence for p = 2, 3, 5, 7, 13, 17, and 19, but not for the following exponents p = 31, 61, and 89. - M. F. Hasler, May 06 2025

References

  • Martin Gardner, Gardner's Workout, Chapter 21 "Lucky Numbers and 2187" pp. 149-156 A. K. Peters MA 2002.
  • Richard K. Guy, Unsolved Problems in Number Theory, C3.
  • C. S. Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 99.
  • 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).
  • M. L. Stein and P. R. Stein, Tables of the Number of Binary Decompositions of All Even Numbers Less Than 200,000 into Prime Numbers and Lucky Numbers. Report LA-3106, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Sep 1964.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 116.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 114.

Crossrefs

Main diagonal of A258207.
Column 1 of A255545. (cf. also arrays A255543, A255551).
Cf. A050505 (complement).
Cf. A145649 (characteristic function).
Cf. A031883 (first differences), A254967 (iterated absolute differences), see also A054978.
Cf. A109497 (works as a left inverse function).
The Gilbreath transform is A054978 - see also A362460, A362461, A362462.

Programs

  • Haskell
    a000959 n = a000959_list !! (n-1)
    a000959_list =  1 : sieve 2 [1,3..] where
       sieve k xs = z : sieve (k + 1) (lucky xs) where
          z = xs !! (k - 1 )
          lucky ws = us ++ lucky vs where
                (us, _:vs) = splitAt (z - 1) ws
    -- Reinhard Zumkeller, Dec 05 2011
    
  • Haskell
    -- Also see links.
    (C++) // See Wilson link, Nov 14 2012
    
  • Maple
    ## luckynumbers(n) returns all lucky numbers from 1 to n. ## Try n=10^5 just for fun. luckynumbers:=proc(n) local k, Lnext, Lprev; Lprev:=[$1..n]; for k from 1 do if k=1 or k=2 then Lnext:= map(w-> Lprev[w],remove(z -> z mod Lprev[2] = 0,[$1..nops(Lprev)])); if nops(Lnext)=nops(Lprev) then break fi; Lprev:=Lnext; else Lnext:= map(w-> Lprev[w],remove(z -> z mod Lprev[k] = 0,[$1..nops(Lprev)])); if nops(Lnext)=nops(Lprev) then break fi; Lprev:=Lnext; fi; od; return Lnext; end: # Walter Kehowski, Jun 05 2008; typo fixed by Robert Israel, Nov 19 2014
    # Alternative
    A000959List := proc(mx) local i, L, n, r;
    L:= [seq(2*i+1, i=0..mx)]:
    for n from 2 while n < nops(L) do
      r:= L[n];
      L:= subsop(seq(r*i=NULL, i=1..nops(L)/r), L);
    od: L end:
    A000959List(10^3); # Robert Israel, Nov 19 2014
  • Mathematica
    luckies = 2*Range@200 - 1; f[n_] := Block[{k = luckies[[n]]}, luckies = Delete[luckies, Table[{k}, {k, k, Length@luckies, k}]]]; Do[f@n, {n, 2, 30}]; luckies (* Robert G. Wilson v, May 09 2006 *)
    sieveMax = 10^6; luckies = Range[1, sieveMax, 2]; sieve[n_] := Module[{k = luckies[[n]]}, luckies = Delete[luckies, Table[{i}, {i, k, Length[luckies], k}]]]; n = 1; While[luckies[[n]] < Length[luckies], n++; sieve[n]]; luckies
    L = Table[2*i + 1, {i, 0, 10^3}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; L (* Jean-François Alcover, Mar 15 2016, after Robert Israel *)
  • PARI
    A000959_upto(nMax)={my(v=vectorsmall(nMax\2,k,2*k-1),i=1,q);while(v[i++]<=#v,v=vecextract(v,2^#v-1-(q=1<M. F. Hasler, Sep 22 2013, improved Jan 20 2020
    
  • Python
    def lucky(n):
        L = list(range(1, n + 1, 2))
        j = 1
        while j <= len(L) - 1 and L[j] <= len(L):
            del L[L[j]-1::L[j]]
            j += 1
        return L
    # Robert FERREOL, Nov 19 2014, corrected by F. Chapoton, Mar 29 2020, performance improved by Ely Golden, Aug 18 2022
    
  • Scheme
    (define (A000959 n) ((rowfun_n_for_A000959sieve n) n)) ;; Code for rowfun_n_for_A000959sieve given in A255543.
    ;; Antti Karttunen, Feb 26 2015

Formula

Start with the natural numbers. Delete every 2nd number, leaving 1 3 5 7 ...; the 2nd number remaining is 3, so delete every 3rd number, leaving 1 3 7 9 13 15 ...; now delete every 7th number, leaving 1 3 7 9 13 ...; now delete every 9th number; etc.
a(n) = A254967(n-1, n-1). - Reinhard Zumkeller, Feb 11 2015
a(n) = A258207(n,n). [Where A258207 is a square array constructed from the numbers remaining after each step described above.] - Antti Karttunen, Aug 06 2015
A145649(a(n)) = 1; complement of A050505. - Reinhard Zumkeller, Oct 15 2008
Other identities from Antti Karttunen, Feb 26 2015: (Start)
For all n >= 1, A109497(a(n)) = n.
For all n >= 1, a(n) = A000040(n) + A032600(n).
For all n >= 2, a(n) = A255553(A000040(n)). (End)

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

A278505 Square array constructed from Flavius sieve: Each row n (n >= 1) starts with A000960(n), followed by all numbers removed at the stage n of the sieve.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 23 2016

Keywords

Comments

The array A(row,col) is read by descending antidiagonals 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,   4,   6,   8,  10,  12,  14,  16,  18
   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: A278506.
Transpose: A278503.
Column 1: A000960, column 2: A100287 (apart from its initial 1), A099259 (differences).
Cf. A278538 (row index of n), A278539 (column index of n).
Cf. also arrays A278507 and A278511 (different variants).
Cf. also A255545 (an analogous array constructed for Lucky sieve).

Programs

Formula

A(row,1) = A000960(row); for col > 1, A(row,col) = A278507(row,col-1).
For all n >= 1, A(A278538(n), A278539(n)) = n.

A264940 Lucky factor of n.

Original entry on oeis.org

0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 9, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 0, 2, 13, 2, 3, 2, 0, 2, 0, 2, 3, 2, 15, 2, 9, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 21, 2
Offset: 1

Views

Author

Max Barrentine, Dec 09 2015

Keywords

Comments

This sequence is analogous to the smallest prime factor of n (A020639). If n is lucky, a(n)=0; if n is unlucky, a(n) is the number that rejects n from the lucky number sieve. This is 2 for even numbers, and a lucky number >= 3 for odd unlucky numbers.

Crossrefs

Cf. A020639, A271419 (somewhat analogous sequences).

Programs

Formula

From Antti Karttunen, Sep 11 2016: (Start)
If A145649(n) = 1 [when n is lucky], a(n) = 0, else if n is even, a(n) = 2, otherwise a(n) = A000959(A265859(n)) = A000959(A260438(n)).
For n >= 2, a(A219178(n)) = A000959(n).
(End)

Extensions

Formula corrected and comment clarified by Antti Karttunen, Sep 11 2016
Showing 1-10 of 12 results. Next