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

A246785 a(n) is the least m>0 such that A182134(n - m) = m, or zero if there is no such m.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 2, 1, 0, 2, 2, 2, 0, 3, 2, 2, 0, 3, 0, 3, 0, 3, 2, 2, 0, 0, 4, 0, 2, 2, 2, 0, 3, 0, 4, 3, 0, 4, 4, 4, 3, 0, 4, 0, 4, 2, 2, 0, 0, 4, 0, 5, 4, 4, 3, 0, 0, 5, 0, 5, 3, 2, 0, 0, 4, 4, 2, 0, 0, 0, 5
Offset: 2

Views

Author

Farideh Firoozbakht, Oct 24 2014

Keywords

Comments

Recall that A182134(k) is the number of primes p with prime(k) < p < prime(k)^(1+1/k). The record values up to n = 56000 are the positive integers up to 21 except 13 which first occurs after 14; A246790 gives indices of these record values.

Crossrefs

Programs

  • Haskell
    a246785 n = if null ms then 0 else head ms
                where ms = [m | m <- [1 .. n-1], a182134 (n - m) == m]
    -- Reinhard Zumkeller, Nov 17 2014
  • Mathematica
    h[n_]:= If[n==0, 0, (i=Prime[n]+1; j=Prime[n]^(1+1/n); Length[Select[Range[i,j], PrimeQ]])];a1[n_]:= (For[m=1, m<=n-1 && h[n-m]!= m, m++]; m); a[k_]:= If[c=a1[k]; c==k, 0, c]; Table[a[k],{k,2,90}]

A246793 a(n) is the largest m such that A182134(n - k) = k for A246785(n) <= k <= m, or zero if there is no such m.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 2, 0, 3, 3, 2, 0, 3, 0, 4, 0, 4, 3, 2, 0, 0, 4, 0, 5, 2, 2, 0, 3, 0, 4, 4, 0, 4, 4, 4, 4, 0, 4, 0, 5, 4, 2, 0, 0, 4, 0, 5, 5, 4, 4, 0, 0, 5, 0, 6, 5, 3, 0, 0, 4, 4, 4, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 0, 5, 0, 6, 0, 0, 7
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 24 2014

Keywords

Comments

Recall that A182134(k) is the number of primes p with prime(k) < p < prime(k)^(1+1/k). Obviously a(n) = 0 if and only if A246785(n) = 0.

Examples

			A182134(217 - k) = k for k = 3, 4, ..., 9 since A246785(217) = 3 and a(217) = 9.
		

Crossrefs

Programs

  • Mathematica
    np[n_]:= If[n==0, 0, (i=Prime[n]+1; j=Prime[n]^(1+1/n); Length[Select[Range[i,j], PrimeQ]])]; a1[n_]:= (For[m=1, m<=n-1&& np[n-m] != m, m++];m);a2[k_]:= If[c=a1[k]; c==k,0,c]; a[n_]:= If[a2[n]==0, 0, For[r=a2[n], np[n-r]==r, r++]; r-1]; Table[a[k], {k,2,90}]

A252474 Record values in A246785.

Original entry on oeis.org

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

Views

Author

Robert Price, Dec 17 2014

Keywords

Comments

For all known terms of this sequence, a(n+1) < a(n)+3; is this true for all terms? - Farideh Firoozbakht, Dec 20 2014
Integers not in this sequence begin: 13, 31, 34, 51, 54, 56, 58.
The comment above could also be phrased as "no two consecutive numbers in the complement" or "no gaps larger than one". But one sees that the missing numbers become more frequent towards larger values, so the answer to the question might well be "no". - Robert Price, Jan 06 2015

Crossrefs

Showing 1-3 of 3 results.