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.

A342364 The primes associated with A239727.

Original entry on oeis.org

3, 17, 73, 191, 709, 1289, 3181, 5449, 7681, 17477, 33889, 87961, 437389, 2290573, 7160227, 10429681, 19196227, 24504049, 47577857, 70513979, 82605937, 156671243, 271785793, 328939937, 568119509, 1125978241, 1534657963, 1710749497, 4936728373, 7647104183
Offset: 1

Views

Author

Jianing Song, Mar 09 2021

Keywords

Examples

			The smallest prime of the form 2*A239727(3)*k + 1 = 24*k+1 is 73, hence a(3) = 73.
The smallest prime of the form 2*A239727(4)*k + 1 = 38*k+1 is 191, hence a(4) = 191.
		

Crossrefs

Programs

  • PARI
    A016014(n)=my(k); while(!isprime(2*n*k+++1), ); k
    r=0; for(n=1, 1e8, t=A016014(n); if(t>r, r=t; print1(2*n*r+1", "))) \\ based on the program of A239727

Formula

a(n) = 2*A239727(n)*A239746(n) + 1.

A016014 Least k such that 2*n*k + 1 is a prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Is the sequence bounded? - Zak Seidov, Mar 25 2014
Answer: No, for any given N a number n such that a(n) > N can be constructed by the Chinese Remainder Theorem, see A239727. - Charles R Greathouse IV, Mar 25 2014
a(n) = 1 for n in A005097. - Robert Israel, Oct 26 2016

Crossrefs

A070846 contains the corresponding primes.
Records are in A239746 with indices in A239727.

Programs

  • Maple
    f:= proc(n) local k;
         for k from 1 do if isprime(2*n*k+1) then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 26 2016
  • Mathematica
    Do[k = 1; cp = n*k + 1; While[ ! PrimeQ[cp], k++; cp = n*k + 1]; Print[k], {n, 2, 400, 2}] (* Lei Zhou, Feb 23 2005 *)
    lk[n_]:=Module[{k=1},While[!PrimeQ[2n k+1],k++];k]; Array[lk,100] (* Harvey P. Dale, Apr 23 2023 *)
  • PARI
    a(n)=my(k); while(!isprime(2*n*(k++)+1),);k \\ Charles R Greathouse IV, Mar 25 2014
    
  • Python
    from sympy import isprime
    def a(n):
        k = 1
        while not isprime(2*n*k + 1): k += 1
        return k
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Mar 28 2022

A239746 Records in A016014.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 12, 15, 17, 24, 30, 42, 54, 57, 60, 63, 72, 74, 83, 84, 91, 96, 104, 106, 120, 123, 129, 138, 139, 144, 147, 149, 153, 155, 203, 219, 240, 245, 259
Offset: 1

Views

Author

Zak Seidov, Mar 26 2014

Keywords

Crossrefs

Programs

  • Mathematica
    km = 0; Reap[Do[k = 1;  While[ ! PrimeQ[2*n*k + 1], k++]; If[k > km, km = k; Sow[k]], {n,  20000}]][[2, 1]]
    lk[n_]:=Module[{k=1},While[!PrimeQ[2n k+1],k++];k];DeleteDuplicates[Array[ lk,10^7],GreaterEqual] (* Harvey P. Dale, Jun 20 2023 *)
  • PARI
    A016014(n)=my(k); while(!isprime(2*n*k+++1), ); k
    r=0; for(n=1, 1e8, t=A016014(n); if(t>r, r=t; print1(r", "))) \\ Jianing Song, Mar 09 2021, based on the program of A239727

Extensions

a(37)-a(40) from Giovanni Resta, Mar 26 2014

A239800 First appearance of n in A016014, or 0 if n never occurs.

Original entry on oeis.org

1, 4, 12, 42, 19, 59, 92, 196, 184, 159, 334, 227, 317, 415, 256, 521, 514, 796, 734, 1861, 1691, 1997, 2053, 706, 5006, 5731, 3814, 2348, 5641, 1466, 19016, 5542, 26815, 8762, 18637, 5794, 31667, 5227, 17054, 35246, 51148, 5207, 59537, 75862, 54737, 117899, 58603, 81313, 30332, 100042, 205471, 113018, 102307, 21209, 63971, 321994, 62809, 648512
Offset: 1

Views

Author

Zak Seidov, Mar 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n. - Jianing Song, Mar 09 2021

Crossrefs

Programs

  • Maple
    isA239800 := proc(n, m) local k;
    for k from 1 to n-1 while not isprime(2*m*k + 1) do od;
    if k < n then false else isprime(2*m*n + 1) fi end:
    A239800 := proc(n, SearchLimit) local k;
    for k from 1 to SearchLimit do if isA239800(n, k) then return k fi od;
    error "Search limit reached!" end:
    A239800List := (ListLength, SearchLimit) ->
    map(n -> A239800(n, SearchLimit), [$1..ListLength]):
    A239800List(32, 65537); # Peter Luschny, Oct 05 2021

Formula

A016014(a(n)) = n.

Extensions

Escape clause added by Jianing Song, Mar 09 2021
Showing 1-4 of 4 results.