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

A032606 Lucky numbers indexed by prime numbers.

Original entry on oeis.org

3, 7, 13, 21, 37, 49, 69, 75, 99, 133, 141, 189, 205, 219, 237, 283, 319, 327, 367, 399, 415, 463, 487, 529, 583, 615, 621, 645, 655, 693, 801, 831, 885, 897, 979, 991, 1023, 1087, 1105, 1167, 1203, 1219, 1285, 1303, 1339, 1365, 1471, 1563
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    lst = Range[1, 2000, 2]; i = 2; While[ i <= (len = Length@lst) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++ ]; lst[[Prime@ Range@51]] (* Robert G. Wilson v, May 12 2006 *)
  • Perl
    use ntheory ":all"; say "$ ",nth_lucky(nth_prime($)) for 1..20'; # Dana Jacobsen, Dec 21 2018
    
  • Perl
    use ntheory ":all"; my $ln=lucky_numbers(1e4); unshift @$ln,0; my @a032606 = vecextract($ln,primes($ln->[-1])); # Dana Jacobsen, Dec 21 2018

Formula

a(n) = A000959(A000040(n)). - Amiram Eldar, Nov 16 2019

A059987 Lucky numbers generated from primes.

Original entry on oeis.org

2, 5, 11, 17, 31, 41, 47, 59, 73, 83, 103, 127, 137, 149, 157, 179, 197, 211, 233, 257, 269, 283, 307, 313, 331, 353, 367, 379, 389, 431, 449, 487, 499, 509, 547, 563, 571, 607, 617, 631, 661, 677, 691, 709, 739, 751, 823, 829, 853, 877, 883, 907, 919, 947
Offset: 1

Views

Author

Jason Earls, Mar 13 2001

Keywords

Comments

Follow same procedure that is used to produce the lucky numbers A000959 except use primes instead of natural numbers.
Start with natural numbers, apply sieve of Eratosthenes, then sieve of Ulam. This is an example of composition of sieve operators. Circa 1955, Polish mathematician Stanislaw Ulam (1909-1984) identified a particular sequence which he designated "lucky numbers," which share many properties with primes (density, equivalent of twin primes, equivalent of Goldbach's conjecture). Other "random primes" which generalize the lucky numbers not only almost always satisfy the prime number theorem but also the Riemann Hypothesis. What can be said about composition of such "random primes"? - Jonathan Vos Post, May 08 2007
There is a slight ambiguity, arising from the first step of Ulam's sieve, which is to delete every second number, while in the remainder of the procedure, one deletes every v(k)-th term from the current vector v, with k=2,3,4... (but not k=1 in the 1st step). The present sequence is obtained by deleting in the first step every 2nd prime (thus using k=1 in the first step). - M. F. Hasler, Sep 23 2013

Crossrefs

Programs

  • PARI
    list_A059987(N=200)={my(v=primes(N),i);while(v[i++]<=#v,v=vecextract(v,2^#v-1-sum(j=1,#v\v[i],2^(v[i]*j-1))));v} \\ - M. F. Hasler, Sep 22 2013

Extensions

Entry revised by N. J. A. Sloane, Oct 20 2007, at the suggestion of R. J. Mathar

A229205 Lucky numbers generated from squarefree numbers.

Original entry on oeis.org

1, 3, 10, 13, 19, 22, 30, 33, 38, 47, 53, 59, 69, 71, 78, 82, 87, 97, 107, 110, 115, 129, 138, 146, 151, 158, 161, 167, 173, 182, 187, 197, 210, 218, 223, 227, 233, 249, 255, 265, 267, 278, 285, 295, 299, 305, 314, 318, 327, 334, 346, 357, 367
Offset: 1

Views

Author

Irina Gerasimova, Sep 16 2013

Keywords

Comments

Follow same procedure that is used to produce the lucky numbers A000959 but start with squarefree numbers A005117 instead of natural numbers.

Examples

			Start with squarefree numbers A005117 = (1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30,...).
Delete every second number to get (1,_ 3,_ 6,_ 10,_ 13,_ 15,_ 19,_ 22,_ 26,_ 30, ...).
Since the next larger remaining number is 3, delete every 3rd number, to get (1, 3,_ 10, 13,_ 19, 22,_ 30, ...).
The next larger remaining number is 10, so delete every 10th term, etc. Note that "30" will remain in this sequence, but is not among the squarefree numbers indexed by lucky numbers, A229483. - _M. F. Hasler_, Sep 24 2013
		

Crossrefs

Programs

  • PARI
    list_A229205(Nmax)={my(v=(select(issquarefree,vector(Nmax,i,i))),i,k);while(v[i=k+++(v[k]==1)]<=#v,v=vecextract(v,2^#v-1-sum(j=1,#v\v[i],2^(v[i]*j-1))));v} \\ M. F. Hasler, Sep 24 2013

A307009 Numbers that are both lucky-indexed primes and prime-indexed lucky numbers.

Original entry on oeis.org

367, 487, 3499, 5503, 11677, 15187, 15661, 20359, 27091, 31723, 36529, 43669, 60631, 62047, 70783, 72493, 74101, 78487, 93139, 94789, 105529, 123619, 128257, 148249, 164377, 191491, 192931, 210739, 240379, 242413, 271501, 276343, 282589, 290119, 299107
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2019

Keywords

Comments

Intersection of A032605 and A032606.

Crossrefs

Programs

  • Mathematica
    m = 10^4; L = Table[2*i + 1, {i, 0, m}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; P = Select[ Range[2m], PrimeQ]; lp = L[[Select[P, # <= Length[L] &]]]; pl = P[[Select[L, # <= Length[P] &]]]; Intersection[lp, pl] (* after Jean-François Alcover at A000959 *)

A307010 Numbers that are prime-indexed primes, lucky-indexed lucky numbers, lucky-indexed primes and prime-indexed lucky numbers.

Original entry on oeis.org

367, 687331, 1983913, 2278033, 2400793, 2760361, 3531247, 5840767, 9429223, 11894593, 13201483, 13371751, 13597357, 13755361, 19782127, 24772663, 25607341, 34723783, 51279127, 56208967, 59215327, 71039257, 74498731, 83170537, 97983187, 109510909, 124762969
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2019

Keywords

Comments

Intersection of A006450, A032639, A032605 and A032606.
Intersection of A307008 and A307009.

Crossrefs

Programs

  • Mathematica
    m = 10^4; L = Table[2*i + 1, {i, 0, m}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; P = Select[ Range[2m], PrimeQ]; lp = L[[Select[P, # <= Length[L] &]]]; pl = P[[Select[L, # <= Length[P] &]]]; pp = P[[Select[P, # <= Length[P] &]]]; ll = L[[Select[L, # <= Length[L] &]]]; Intersection[lp, pl, pp, ll] (* after Jean-François Alcover at A000959 *)

A128886 a(n) = prime(lucky(n)) - lucky(prime(n)).

Original entry on oeis.org

-1, -2, 4, 2, 4, -2, 4, 22, 28, 4, 16, 2, 22, 14, 70, 48, 28, 40, 12, 2, 34, 24, 36, 42, 24, 16, 88, 82, 96, 68, 10, 46, 52, 70, 30, 28, 106, 84, 82, 62, 56, 78, 82, 106, 114, 118, 18, -40, 52, 66, 68, 52, 136, 70, 46, 52, 54, 64, 112, 78, 114, 94, 10, 50, 82, 82, 4, 136, 90, 74
Offset: 1

Views

Author

Jonathan Vos Post, May 08 2007

Keywords

Comments

Commutator [prime,lucky] = [A032605, A032606].

Examples

			a(1) = Prime(Lucky(1)) - Lucky(Prime(1)) = Prime(1) - Lucky(2) = 2 - 3 = -1.
a(2) = Prime(Lucky(2)) - Lucky(Prime(2)) = Prime(3) - Lucky(3) = 5 - 7 = -2.
a(3) = Prime(Lucky(3)) - Lucky(Prime(3)) = Prime(7) - Lucky(5) = 17 - 13 = 4.
		

Crossrefs

Cf. A000040, A000959, A032605 (Prime numbers indexed by lucky numbers), A032606 (Lucky numbers indexed by prime numbers).

Programs

Formula

a(n) = A000040(A000959(n)) - A000959(A000040(n)).

Extensions

Entries corrected starting at a(10) by R. J. Mathar, Oct 22 2010

A229483 Squarefree numbers whose indices are lucky numbers.

Original entry on oeis.org

1, 3, 10, 13, 19, 22, 33, 38, 47, 53, 59, 69, 78, 82, 102, 107, 110, 115, 119, 129, 141, 151, 161, 173, 182, 187, 206, 210, 215, 218, 227, 246, 258, 265, 274, 278, 309, 314, 318, 327, 334, 346, 359, 367, 382, 389, 391, 397, 426, 429, 437, 446, 462, 465, 470
Offset: 1

Views

Author

Keywords

Comments

Originally arose as "Lucky numbers generated from squarefree numbers" under the hypothesis that Ulam's sieve (the one used to produce lucky numbers) ignores the values of the terms.

Crossrefs

Formula

a(n) = A005117(A000959(n)). - Charles R Greathouse IV, Sep 16 2013
Showing 1-7 of 7 results.