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.

A034693 Smallest k such that k*n+1 is prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 1, 4, 2, 2, 1, 6, 1, 10, 2, 2, 1, 2, 3, 4, 2, 4, 1, 2, 1, 10, 3, 2, 3, 2, 1, 4, 5, 2, 1, 2, 1, 4, 2, 4, 1, 6, 2, 4, 2, 2, 1, 2, 2, 6, 2, 4, 1, 12, 1, 6, 5, 2, 3, 2, 1, 4, 2, 2, 1, 8, 1, 4, 2, 2, 3, 6, 1, 4, 3, 2, 1, 2, 4, 12, 2, 4, 1, 2, 2, 6, 3, 4, 3, 2, 1, 4, 2
Offset: 1

Views

Author

Keywords

Comments

Conjecture: for every n > 1 there exists a number k < n such that n*k + 1 is a prime. - Amarnath Murthy, Apr 17 2001
A stronger conjecture: for every n there exists a number k < 1 + n^(.75) such that n*k + 1 is a prime. I have verified this up to n = 10^6. Also, the expression 1 + n^(.74) does not work as an upper bound (counterexample: n = 19). - Joseph L. Pe, Jul 16 2002
Stronger version of the conjecture verified up to 10^9. - Mauro Fiorentini, Jul 23 2023
It is known that, for almost all n, a(n) <= n^2. From Heath-Brown's result (1992) obtained with help of the GRH, it follows that a(n) <= (phi(n)*log(n))^2. - Vladimir Shevelev, Apr 30 2012
Conjecture: a(n) = O(log(n)*log(log(n))). - Thomas Ordowski, Oct 17 2014
I conjecture the opposite: a(n) / (log n log log n) is unbounded. See A194945 for records in this sequence. - Charles R Greathouse IV, Mar 21 2016

Examples

			If n=7, the smallest prime in the sequence 8, 15, 22, 29, ... is 29, so a(7)=4.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 2.12, pp. 127-130.
  • P. Ribenboim, (1989), The Book of Prime Number Records. Chapter 4, Section IV.B.: The Smallest Prime In Arithmetic Progressions, pp. 217-223.

Crossrefs

Cf. A010051, A034694, A053989, A071558, A085420, A103689, A194944 (records), A194945 (positions of records), A200996.

Programs

  • Haskell
    a034693 n = head [k | k <- [1..], a010051 (k * n + 1) == 1]
    -- Reinhard Zumkeller, Feb 14 2013
    
  • Maple
    A034693 := proc(n)
        for k from 1 do
            if isprime(k*n+1) then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 26 2015
  • Mathematica
    a[n_]:=(k=0; While[!PrimeQ[++k*n + 1]]; k); Table[a[n], {n,100}] (* Jean-François Alcover, Jul 19 2011 *)
  • PARI
    a(n)=if(n<0,0,s=1; while(isprime(s*n+1)==0,s++); s)
    
  • Python
    from sympy import isprime
    def a(n):
        k = 1
        while not isprime(k*n+1): k += 1
        return k
    print([a(n) for n in range(1, 99)]) # Michael S. Branicky, May 05 2022

Formula

It seems that Sum_{k=1..n} a(k) is asymptotic to (zeta(2)-1)*n*log(n) where zeta(2)-1 = Pi^2/6-1 = 0.6449... . - Benoit Cloitre, Aug 11 2002
a(n) = (A034694(n)-1) / n. - Joerg Arndt, Oct 18 2020

A194944 Records in A034693.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 20, 24, 26, 30, 32, 38, 42, 44, 46, 60, 84, 108, 114, 126, 144, 166, 182, 192, 212, 234, 246, 258, 276, 278, 288, 294, 310, 406, 480, 494, 504, 534, 618, 634
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A034693, A194945 (positions).

Programs

  • PARI
    A034693(n)=my(k=n+1);while(!isprime(k),k+=n);(k-1)/n
    r=0;forstep(n=1,1e9,2,t=A034693(n);if(t>r,r=t;print1(t", ")))

Formula

a(n) = A034693(A194945(n)). - R. J. Mathar, May 05 2023

Extensions

a(36)-a(40) from Charles R Greathouse IV, Sep 18 2011
NAME corrected by R. J. Mathar, May 05 2023

A163612 Primes of form 5207*n + 1.

Original entry on oeis.org

437389, 510287, 541529, 562357, 604013, 749809, 781051, 853949, 874777, 968503, 978917, 1030987, 1249681, 1322579, 1437133, 1541273, 1562101, 1655827, 1812037, 1947419, 1978661, 2030731, 2124457, 2166113, 2186941, 2280667, 2634743, 2655571, 2686813, 2759711
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 01 2009

Keywords

Comments

5207*84+1=437389 is the first term in the sequence.
This is not a subsequence of A059236.
437389 = A059236(908), 510287 = A059236(1046), 541529 = A059236(1106).
3228341, 3624073 and 8091679 belong to this sequence but not to A059236. - Joerg Arndt and Arkadiusz Wesolowski, Jun 26 2011

Crossrefs

Programs

  • Magma
    [5207*n+1 : n in [0..530 by 2] | IsPrime(5207*n+1)]; // Arkadiusz Wesolowski, Mar 05 2011
    
  • Mathematica
    Select[Table[5207*n + 1, {n, 0, 530, 2}], PrimeQ] (* Arkadiusz Wesolowski, Mar 05 2011 *)
  • PARI
    forstep(n=0, 530, 2, if(isprime(x=(5207*n+1)), print1(x, ", "))); \\ Arkadiusz Wesolowski, Mar 05 2011
Showing 1-3 of 3 results.