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

A247233 Smallest m such that A075323(m) = n-th odd prime, or zero, if no such m exists.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 29 2014

Keywords

Comments

Conjecture: a(388) = 0, i.e., A065091(388) = 2683 doesn't occur in A075323;
for n with a(n) > 0: A075323(a(n)) = A065091(n) = A000040(n+1).

Examples

			Also a(389) = 0 (presumably), whereas subsequent terms (n > 389) are > 0:
393,443,421,350,397,455,368,433,387,352,356,382,384,366,372,392,374, ...
with corresponding odd primes:
2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777, ...
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a247233 = (+ 1) . fromJust . (`elemIndex` a075323_list) . a065091
  • Mathematica
    maxm = 3000;
    A075321p[n_] := A075321p[n] = Module[{prevlist, i, p, q}, If[n == 1, Return[{3, 5}], prevlist = Array[A075321p, n-1] // Flatten]; For[i = 2, True, i++, p = Prime[i]; If[FreeQ[prevlist, p], q = p + 2*n; If[ PrimeQ[q] && FreeQ[prevlist, q], Return[{p, q}]]]]];
    A075323[n_] := If[OddQ[n], A075321p[(n + 1)/2][[1]], A075321p[n/2][[2]]];
    a[n_] := For[m = 1, m <= maxm, m++, If[A075323[m] == Prime[n + 1], Return[m]]] /. Null -> 0;
    Array[a, 387] (* Jean-François Alcover, Feb 12 2018, after R. J. Mathar's program for A075321p *)

A075321 Pair the odd primes so that the n-th pair is (p, p+2n) where p is the smallest prime not included earlier such that p and p+2n are primes and p+2n also does not occur earlier: (3, 5), (7, 11), (13, 19), (23, 31), (37, 47), (17, 29), (53, 67) ... This is the sequence of the first member of every pair.

Original entry on oeis.org

3, 7, 13, 23, 37, 17, 53, 43, 61, 83, 109, 73, 101, 139, 41, 149, 157, 137, 113, 193, 197, 179, 211, 229, 263, 199, 227, 107, 331, 293, 311, 283, 241, 269, 349, 359, 383, 367, 401, 317, 379, 439, 491, 421, 409, 449, 463, 467
Offset: 1

Views

Author

Amarnath Murthy, Sep 14 2002

Keywords

Comments

Question: Is every prime a member of some pair?
If the distance between the prime pairs is not required to be 2n, we get A031215. - R. J. Mathar, Nov 26 2014
a(n) = A075323(2*n-1).

Examples

			a(4)=23: For the 4th pair though 17 is the smallest prime not occurring earlier, 17+8 = 25 is not a prime and 23 + 8 = 31 is a prime.
		

Crossrefs

Programs

  • Haskell
    a075321 = a075323 . subtract 1 . (* 2)
    -- Reinhard Zumkeller, Nov 29 2014
  • Maple
    A075321p := proc(n)
        option remember;
        local prevlist,i,p,q ;
        if n = 1 then
            return [3,5];
        else
            prevlist := [seq(op(procname(i)),i=1..n-1)] ;
            for i from 2 do
                p := ithprime(i) ;
                if not p in prevlist then
                    q := p+2*n ;
                    if isprime(q) and not q in prevlist then
                        return [p,q] ;
                    end if;
                end if;
            end do:
        end if;
    end proc:
    A075321 := proc(n)
        op(1,A075321p(n)) ;
    end proc:
    seq(A075321(n),n=1..60) ; # R. J. Mathar, Nov 26 2014
  • Mathematica
    A075321p[n_] := A075321p[n] = Module[{prevlist, i, p, q }, If[n == 1, Return[{3, 5}], prevlist = Array[A075321p, n-1] // Flatten]; For[i = 2, True, i++, p = Prime[i]; If[FreeQ[prevlist, p], q = p + 2*n ; If[ PrimeQ[q] && FreeQ[ prevlist, q], Return[{p, q}]]]]];
    A075321 [n_] := A075321p[n][[1]];
    Array[A075321, 50] (* Jean-François Alcover, Feb 12 2018, translated from R. J. Mathar's program *)

Extensions

Corrected by R. J. Mathar, Nov 26 2014

A075322 Pair the odd primes so that the k-th pair is (p, p+2n) where p is the smallest prime not included earlier such that p and p+2n are primes and p+2n also does not occur earlier: (3, 5), (7, 11), (13, 19), (23, 31), (37, 47), (17, 29), ... This is the sequence of the second member of every pair.

Original entry on oeis.org

5, 11, 19, 31, 47, 29, 67, 59, 79, 103, 131, 97, 127, 167, 71, 181, 191, 173, 151, 233, 239, 223, 257, 277, 313, 251, 281, 163, 389, 353, 373, 347, 307, 337, 419, 431, 457, 443, 479, 397, 461, 523, 577, 509, 499, 541, 557, 563
Offset: 1

Views

Author

Amarnath Murthy, Sep 14 2002

Keywords

Comments

Question: Is every prime p a member of some pair?
a(n) = A075323(2*n).

Crossrefs

Programs

Formula

a(n) = A075321(n)+2*n.
a(n) = A075323(2*n).

Extensions

Corrected by R. J. Mathar, Nov 26 2014

A147513 Numbers such that the n-th and (n+1)st terms are the successors of prime numbers and primes themselves and n+1 > n.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 31, 37, 47
Offset: 1

Views

Author

Jonathan Baca (jbakid(AT)gmail.com), Nov 05 2008

Keywords

Comments

Is this the same as prime(k) such that prime(k+1)*prime(k+2) > 1 + prime(k)*prime(k+3)? - Arkadiusz Wesolowski, May 12 2018
a(n) = A075323(n) for 1 <= n <= 10. - Georg Fischer, Nov 02 2018

Crossrefs

Cf. A075323.
Showing 1-4 of 4 results.