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.

A175859 a(n) = numbers k in increasing order such that A175856(m) = k has no solution for any m, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

8, 9, 14, 15, 24, 25, 32, 33, 38, 39, 54, 55, 62, 63, 74, 75, 90, 91, 92, 93, 98, 99, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 140, 141, 142, 143, 144, 145, 158, 159, 182, 183, 184, 185, 186, 187, 212, 213
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

Absent positive integers (pairs of consecutive numbers) in sequence A175856(n).
Complement of A175857(n).
A175860(a(n)) = 0, A175861(a(n)) = 1, A175862(a(n)) = 0.

Crossrefs

Formula

a(2k) = a(2k-1) + 1 for k >= 1.

A175860 a(n) = characteristic function of numbers k such that A175856(m) = k has solution for any m, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

a(n) = characteristic function of numbers from A175857(n). a(n) = 1 if A175856(m) = n for any m, else 0. a(n) = 1 for such n that A175862(n) >= 1. a(n) = 0 for such n that A175862(n) = 0. a(n) + A175861(n) = A000012(n).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    A175856list(up_to) = { my(v=vector(up_to)); for(n=1,up_to,if((1==n)||isprime(n),v[n] = n,v[n] = v[n-1] - 1)); (v); };
    \\ This implementation depends on M. El Bachraoui's proof that there exists a prime between 2n and 3n for n > 1 (see Wikipedia-article).
    A175860list(up_to) = { my(v=vector(up_to), A175857 = Set(A175856list(prime(2+primepi(2*up_to))))); for(n=1,up_to,v[n] = (0!=vecsearch(A175857,n))); (v); };
    v175860 = A175860list(up_to);
    A175860(n) = v175860[n]; \\ Antti Karttunen, Nov 08 2018

Formula

a(n) = 1 - A175861(n).

A175861 a(n) = characteristic function of numbers k such that A175856(m) = k has no solution for any m, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

a(n) = characteristic function of numbers from A175859(n). a(n) = 1 if A175856(m) not equal to n for any m, else 0. a(n) = 1 for such n that A175862(n) = 0. a(n) = 0 for such n that A175862(n) >= 1. a(n) + A175860(n) = A000012(n).

Crossrefs

Programs

Formula

a(n) = 1 - A175860(n).

A175857 a(n) = possible values of A175856(m) in increasing order, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

Complement of A175859(n). A175860(a(n)) = 1, A175862(a(n)) >= 1.

Crossrefs

A175858 a(n) = all values of A175856(m) in increasing order, where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 10, 10, 11, 11, 12, 13, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21, 22, 23, 26, 27, 28, 28, 29, 29, 30, 31, 34, 35, 36, 37, 40, 40, 41, 41, 42, 42, 43, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 58, 59, 59, 60
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

A175860(a(n)) = 1, A175862(a(n)) >= 1.

Crossrefs

Extensions

Corrected by Jaroslav Krizek, Oct 01 2010

A175862 a(n) = frequency of values n in A175856(m), where A175856(m): a(m) = m for m = noncomposites, a(m) = previous term - 1 for m = composites.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 1, 0, 0, 2, 2, 1, 1, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 1
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2010

Keywords

Comments

a(n) >= 1 for such n that A175860(n) = 1, a(n) >= 1 if A175856(m) = n for any m. a(n) = 0 for such n that A175860(n) = 0, a(n) = 0 if A175856(m) = n has no solution for any m.

Crossrefs

Extensions

Corrected by Jaroslav Krizek, Oct 01 2010

A093521 Runs of 1's of lengths 1, prime(1), prime(2), prime(3), ... separated by 0's.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Robert G. Wilson v, Mar 29 2004

Keywords

Comments

Carl Sagan's "Contact" sequence.
Zeros occur at positions given by 1+A110895(k). - Antti Karttunen, Nov 08 2018

References

  • W. A. Dembski and J. M. Kushiner, Signs of Intelligence, Baker Book House Co., Grand Rapids, MI, p30-31, 2001,
  • Carl Sagan, Contact, Simon and Schuster, Chapter 4 "Prime Numbers," pp. 68-82, NY, 1985.

Crossrefs

Programs

  • Mathematica
    a = Table[1, {100}]; Do[ a[[Sum[Prime[i], {i, n}] + n]] = 0, {n, 1, 8}]; a
  • PARI
    up_to = 111;
    A093521list(up_to) = { my(v=vector(up_to), i=2, j); v[1] = 1; v[2] = 0; forprime(p=2, oo, j=p; while(j, if(i==up_to, return(v), i++; v[i] = 1; j--)); if(i==up_to, return(v), i++; v[i] = 0)); };
    v093521 = A093521list(up_to);
    A093521(n) = v093521[n];

Extensions

Data section extended up to n=111 by Antti Karttunen, Nov 08 2018

A345668 Last prime minus distance to last prime.

Original entry on oeis.org

1, 2, 1, 4, 3, 6, 5, 4, 3, 10, 9, 12, 11, 10, 9, 16, 15, 18, 17, 16, 15, 22, 21, 20, 19, 18, 17, 28, 27, 30, 29, 28, 27, 26, 25, 36, 35, 34, 33, 40, 39, 42, 41, 40, 39, 46, 45, 44, 43, 42, 41, 52, 51, 50, 49, 48, 47, 58, 57, 60, 59, 58, 57, 56, 55, 66, 65, 64
Offset: 3

Views

Author

Brian Beard, Jun 21 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 2 * NextPrime[n, -1] - n; Array[a, 100, 3] (* Amiram Eldar, Jun 21 2021 *)

Formula

a(n) = p - (n-p) = 2*p - n where p is the largest prime < n.
a(n) = A151799(n) - A049711(n).
a(n) = A175856(n-1) - 1.

Extensions

More terms from Jon E. Schoenfield, Jun 21 2021
Showing 1-8 of 8 results.