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-10 of 19 results. Next

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

A067760 a(n) is the least positive k such that (2n+1) + 2^k is prime, or 0 if no such k exists.

Original entry on oeis.org

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

Views

Author

Don Reble, Feb 05 2002

Keywords

Comments

From Phil Moore (moorep(AT)lanecc.edu), Dec 14 2009: (Start)
It is known that a(39278) = 0, since no such prime exists for the SierpiƄski number 78557 (cf. A076336).
It has recently been discovered that 2131+2^4583176 and 41693+2^5146295 are probable primes, so a(1065) is probably 4583176 and a(20846) is probably 5146295.
At present, the only odd value less than 78557 for which no prime or strong probable prime of the form t+2^k is known is t = 40291, so a(20145) is completely unknown. In addition, for 25 values of t < 78557, only strong probable primes are known. (End)
The last case was resolved in 2011 when the probable prime 40291+2^9092392 was found as a part of a distributed project "Five or Bust". See links. - Jeppe Stig Nielsen, Mar 29 2019

Examples

			a(15)=4 because (2*15+1)+2^k is composite for k=1,2,3 and prime for k=4.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k=1); while (! isprime((2*n+1)+2^k), k++); k;} \\ Michel Marcus, Feb 26 2018

A070846 Smallest prime == 1 (mod 2n).

Original entry on oeis.org

3, 5, 7, 17, 11, 13, 29, 17, 19, 41, 23, 73, 53, 29, 31, 97, 103, 37, 191, 41, 43, 89, 47, 97, 101, 53, 109, 113, 59, 61, 311, 193, 67, 137, 71, 73, 149, 229, 79, 241, 83, 337, 173, 89, 181, 277, 283, 97, 197, 101, 103, 313, 107, 109, 331, 113, 229, 233, 709, 241
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Comments

From Jianing Song, Feb 14 2021: (Start)
a(n) is the smallest prime p such that there is a primitive 2n-th root of unity modulo p, i.e., there is an element with order 2n in the multiplicative group of integers modulo p.
For n > 1, a(n) is the smallest prime p such that the 2n-th cyclotomic field Q(exp(2*Pi*i/(2*n))) can be embedded into the p-adic field Q_p. (End)

Crossrefs

Programs

  • Mathematica
    With[{prs=Prime[Range[200]]},Flatten[Table[Select[prs,Mod[#,2n]==1&,1],{n,60}]]] (* Harvey P. Dale, Jan 16 2013 *)
  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(2*n)>0,s++); print1(s,","))

Formula

a(n) = 2*n*A016014(n) + 1. - Dmitry Kamenetsky, Oct 26 2016

Extensions

More terms from Benoit Cloitre, May 18 2002

A117673 a(n) is the least k such that k*2*prime(n) + 1 is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 5, 1, 1, 5, 2, 1, 2, 3, 1, 6, 3, 2, 4, 2, 2, 1, 1, 2, 3, 3, 3, 5, 1, 2, 1, 3, 2, 4, 3, 5, 2, 7, 1, 1, 3, 1, 2, 9, 2, 5, 6, 12, 6, 1, 1, 3, 1, 3, 3, 4, 3, 2, 1, 3, 1, 2, 3, 3, 13, 3, 5, 3, 5, 7, 1, 3, 2, 6, 6, 12, 3, 4, 2, 1, 5, 1, 2, 5, 1, 4, 15, 3, 6, 3, 4, 2, 1, 2, 3, 1, 16, 5, 9
Offset: 1

Views

Author

Don Reble, Apr 25 2006

Keywords

Comments

Iff a(n) = 1, prime(n) is a Sophie Germain prime, i.e., in A005384. - A.H.M. Smeets, Feb 01 2018

Examples

			a(8)=5 because 2*prime(8)=38 and 5*38 + 1 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[k := 1; While[ ! PrimeQ[2*k*Prime[n] + 1], k++ ]; k, {n, 1, 120}] (* Stefan Steinerberger, May 01 2006 *)
  • PARI
    a(n) = {my(p=prime(n), k=1); while (!isprime(2*k*p+1), k++); k;} \\ Michel Marcus, Feb 12 2018

A239727 Numbers n such that the least prime of the form 2nk + 1 has a value of k that is larger than the k values for all smaller n.

Original entry on oeis.org

1, 4, 12, 19, 59, 92, 159, 227, 256, 514, 706, 1466, 5207, 21209, 62809, 86914, 152351, 170167, 321472, 424783, 491702, 860831, 1415551, 1581442, 2679809, 4691576, 6238447, 6630812, 17886697, 27507569, 30581429, 57868997, 108830332, 116156102, 127813579, 154641337, 1072567492, 1101795593, 3546087418, 10371779744
Offset: 1

Views

Author

Keywords

Comments

RECORDS transform of A016014.
Sequence is infinite; a terrible upper bound can be derived from Linnik's theorem together with the Chinese Remainder Theorem, giving a(n) << exp(a(n-1)^6).

Examples

			2*4*2+1 = 17 is prime with k = 2, but 1 through 3 have k = 1.
2*12*3+1 = 73 is prime with k = 3, but k = 2 for 4, 7, 10 and k = 1 for the other n < 12.
		

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(n", ")))

Formula

A016014(a(n)) = A239746(n). - Zak Seidov, Mar 27 2014

Extensions

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

A037035 Least k such that 2^n+1+k is a prime.

Original entry on oeis.org

0, 0, 0, 2, 0, 4, 2, 2, 0, 8, 6, 4, 2, 16, 26, 2, 0, 28, 2, 20, 6, 16, 14, 8, 42, 34, 14, 28, 2, 10, 2, 10, 14, 16, 24, 52, 30, 8, 6, 22, 14, 26, 14, 28, 6, 58, 14, 4, 20, 68, 54, 20, 20, 4, 158, 2, 80, 8, 68, 130, 32, 14, 134, 28, 12, 130, 8, 2, 32, 28, 24, 10, 14, 28, 36, 32, 14
Offset: 0

Views

Author

Keywords

Examples

			a(5)=4 because 2^5+1+4=37 that is a prime.
		

Crossrefs

Cf. A016014.
A013597(n) - 1.

Programs

  • PARI
    a(n) = k = 0; while (! isprime(2^n+k+1), k++); k; \\ Michel Marcus, Sep 27 2013

Extensions

More terms from Erich Friedman

A103961 Least k such that 2*n*k - 1 is a prime.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Feb 23 2005

Keywords

Comments

Question: Is the sequence unbounded (like A016014)? - Dmitry Kamenetsky, Oct 26 2016
Answer: Yes. Essentially the same argument works. To get n such that a(n) > K, take distinct odd primes p_k, k=1..K with p_k not dividing k, and take n such that n == (2*k)^(-1) mod p_k and 2*k*n-1 > p_k for k=1..K. - Robert Israel, Oct 27 2016

Examples

			2*1*2-1 = 3, so a(1) = 2;
2*5*2-1 = 19, so a(5) = 2.
		

Crossrefs

Cf. A016014.

Programs

  • Mathematica
    Do[k = 1; cp = n*k - 1; While[ ! PrimeQ[cp], k++; cp = n*k - 1]; Print[k], {n, 2, 400, 2}]
    lkp[n_]:=Module[{k=1},While[!PrimeQ[2n*k-1],k++];k]; Array[lkp,120] (* Harvey P. Dale, Nov 13 2020 *)
  • PARI
    a(n) = {my(k=1); while (!isprime(2*n*k-1), k++); k;} \\ Michel Marcus, Oct 27 2016

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.

A342365 The primes associated with A239800 (1 if A239800(n) = 0).

Original entry on oeis.org

3, 17, 73, 337, 191, 709, 1289, 3137, 3313, 3181, 7349, 5449, 8243, 11621, 7681, 16673, 17477, 28657, 27893, 74441, 71023, 87869, 94439, 33889, 250301, 298013, 205957, 131489, 327179, 87961, 1178993, 354689, 1769791, 595817, 1304591, 417169, 2343359
Offset: 1

Views

Author

Jianing Song, Mar 09 2021

Keywords

Examples

			The smallest m such that 2*m*i + 1 is not prime until i = 3 is m = 12, and the corresponding prime is 2*12*3 + 1 = 73 = a(3).
The smallest m such that 2*m*i + 1 is not prime until i = 4 is m = 42, and the corresponding prime is 2*42*4 + 1 = 337 = a(4).
The smallest m such that 2*m*i + 1 is not prime until i = 5 is m = 19, and the corresponding prime is 2*19*5 + 1 = 191 = a(5).
		

Crossrefs

Programs

  • PARI
    isok(n, m) = for(i=1, n-1, if(isprime(2*m*i+1), return(0))); if(isprime(2*m*n+1), 1, 0)
    a(n) = for(m=1, oo, if(isok(n, m), return(2*n*m+1))) \\ based on the conjecture that all numbers occur in A016014

Formula

a(n) = 2*n*A239800(n)+1.
Showing 1-10 of 19 results. Next