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.

Previous Showing 11-19 of 19 results.

A037178 Longest cycle when squaring modulo n-th prime.

Original entry on oeis.org

1, 1, 1, 2, 4, 2, 1, 6, 10, 3, 4, 6, 4, 6, 11, 12, 28, 4, 10, 12, 6, 12, 20, 10, 2, 20, 8, 52, 18, 3, 6, 12, 8, 22, 36, 20, 12, 54, 82, 14, 11, 12, 36, 2, 21, 30, 12, 36, 28, 18, 28, 24, 4, 100, 1, 130, 66, 36, 22, 12, 46, 9, 24, 20, 12, 39, 20, 6, 172, 28, 10, 178, 60, 10, 18
Offset: 1

Views

Author

Keywords

Comments

a(n)=1 for Fermat primes, A019434. a(n)=2 for primes in A039687. a(n)=3 for primes in A050527. Sequence A141305 gives those primes p > 3 having the longest possible cycle, (p-3)/2. - T. D. Noe, Jun 24 2008

Crossrefs

a(n) = maximal entry in row p of A278185.

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], k}, k = (p-1)/2^IntegerExponent[p-1, 2]; MultiplicativeOrder[2, k]]; Array[a, 100] (* Jean-François Alcover, Jan 28 2016, after T. D. Noe *)
  • PARI
    a(n) = {ppn = prime(n) - 1; k = ppn >> valuation(ppn, 2); znorder(Mod(2, k));} \\ Michel Marcus, Nov 11 2015
    
  • PARI
    rpsi(n) = lcm(znstar(n)[2]); \\ A002322
    pb(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ A007733
    a(n) = pb(rpsi(prime(n))); \\ Michel Marcus, Jan 28 2016

Formula

Let p=prime(n) and k=A000265(p-1), the odd part of p-1. Then a(n) = ord(2,k), that is, the smallest positive integer x such that 2^x = 1 (mod k). - T. D. Noe, Jun 24 2008
a(n) = A007733(A002322(prime(n))). - Michel Marcus, Jan 28 2016
a(n) = A256608(prime(n)).

A147545 Primes of the form p*2^k+1 with k>0 and p=1 or p in this sequence.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 23, 29, 41, 47, 53, 59, 83, 89, 97, 107, 113, 137, 167, 179, 193, 227, 233, 257, 353, 359, 389, 449, 467, 641, 719, 769, 773, 857, 929, 1097, 1283, 1409, 1433, 1439, 1553, 1697, 1889, 2657, 2819, 2879, 3089, 3329, 3593, 3617, 3779, 5639
Offset: 1

Views

Author

T. D. Noe, Nov 07 2008

Keywords

Comments

This sequence starts like A074781 but grows much faster. Observe that there can be large differences between consecutive terms. Can it be shown that there is always such a prime between consecutive powers of 2? Or that this sequence is infinite? By theorem 1 of the Noe paper, this sequence is a subsequence of A135832, primes in Section I of the phi iteration.
From Antti Karttunen, Apr 19 2020: (Start)
Sequence can be considered as a generalization of Fermat primes, A019434, which is a subsequence of this sequence.
All terms with binary weight k (A000120, at least 2 for these terms) can be found as a subset of primes found on the row k-1 of array A334100. E.g. primes with weight 2 are Fermat primes (A019434), those with weight 3 are A334092 (which doesn't contain any other primes), those with weight 4 are in A334093 (among also other kind of primes), those with weights 5, 6, 7 are included as (proper) subsets in A334094, A334095 and A334096 respectively. (End)

Crossrefs

Subsequence of A074781, and of A135832.
Subsequences: A019434, A334092 (including A039687, A050526, A300407).

Programs

  • Mathematica
    nn=2^13; t={1}; i=1; While[q=t[[i]]; k=1; While[p=1+q*2^k; p
    				
  • PARI
    A000265(n) = (n>>valuation(n,2));
    isA147454(n) = ((n>2)&&isprime(n)&&((1==(n=A000265(n-1)))||isA147454(n))); \\ Antti Karttunen, Apr 19 2020

Formula

A329697(a(n)) = A000120(a(n)) - 1. - Antti Karttunen, Apr 19 2020

A300407 Primes of the form 17*2^n + 1.

Original entry on oeis.org

137, 557057, 2281701377, 38280596832649217, 3032901347000164747248857685080177164813336577, 240291200809860268823328460101036918152537809975084178304538443375796289537, 4031417378886400659867047414062478199819447786118941877597755244819503521544011777
Offset: 1

Views

Author

Martin Renner, Mar 05 2018

Keywords

Comments

For the corresponding exponents n see A002259.

Examples

			From _Muniru A Asiru_, Mar 29 2018: (Start)
137 is a member because 17 * 2^3 + 1 = 137 which is a prime.
557057 is a member because 17 * 2^15 + 1 = 557057 which is a prime.
2281701377 is a member because 17 * 2^27 + 1 = 2281701377 which is a prime.
... (End)
		

Crossrefs

Programs

  • GAP
    Filtered(List([1..270],n->17*2^n + 1),IsPrime); # Muniru A Asiru, Mar 06 2018
    
  • Magma
    [a: n in [1..300] | IsPrime(a) where a is 17*2^n + 1]; // Vincenzo Librandi, Mar 07 2018
    
  • Maple
    a:=(n,k)->`if`(isprime(k*2^n+1), k*2^n+1, NULL):
    seq(a(n,17), n=1..267);
  • Mathematica
    Select[Table[17 2^n + 1, {n, 400}], PrimeQ] (* Vincenzo Librandi, Mar 07 2018 *)
  • PARI
    lista(nn) = {for(k=1, nn, if(ispseudoprime(p=17*2^k+1), print1(p, ", ")));} \\ Altug Alkan, Mar 28 2018

A300406 Primes of the form 13*2^n + 1.

Original entry on oeis.org

53, 3329, 13313, 13631489, 3489660929, 62864142619960717084721153, 5100145160001678120616578906356228963083163798627028041729, 6779255729241169695101387251026410519979286814120235842117075415451380965612384558178346467329, 1735489466685739441945955136262761093114697424414780375581971306355553527196770446893656695635969
Offset: 1

Views

Author

Martin Renner, Mar 05 2018

Keywords

Comments

For the corresponding exponents n see A032356.

Crossrefs

Programs

  • GAP
    Filtered(List([1..500],n->13*2^n + 1),IsPrime); # Muniru A Asiru, Mar 06 2018
    
  • Magma
    [a: n in [1..400] | IsPrime(a) where a is 13*2^n + 1]; // Vincenzo Librandi, Mar 06 2018
    
  • Maple
    a:=(n,k)->`if`(isprime(k*2^n+1), k*2^n+1, NULL):
    seq(a(n,13), n=1..316);
  • Mathematica
    Select[Table[13 2^n + 1, {n, 400}], PrimeQ] (* Vincenzo Librandi, Mar 06 2018 *)
  • PARI
    lista(nn) = {for(k=1, nn, if(ispseudoprime(p=13*2^k+1), print1(p, ", ")));} \\ Altug Alkan, Mar 29 2018

Formula

a(n) = A168596(A032356(n)). - Michel Marcus, Mar 29 2018

A300408 Primes of the form 19*2^n + 1.

Original entry on oeis.org

1217, 19457, 1337006139375617
Offset: 1

Views

Author

Martin Renner, Mar 05 2018

Keywords

Comments

Next term a(4) = 19*2^366 + 1 > 10^111.
For the corresponding exponents n see A032359.

Crossrefs

Programs

  • GAP
    Filtered(List([1..500],n->19*2^n + 1),IsPrime); # Muniru A Asiru, Mar 06 2018
    
  • Maple
    a:=(n,k)->`if`(isprime(k*2^n+1), k*2^n+1, NULL):
    seq(a(n,19), n=1..366);
  • PARI
    lista(nn) = {for(k=1, nn, if(ispseudoprime(p=19*2^k+1), print1(p, ", ")));} \\ Altug Alkan, Mar 29 2018

A344384 Prime numbers p such that p-1 or p+1 is a number of least prime signature (A025487).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 47, 59, 61, 71, 73, 97, 127, 179, 181, 191, 193, 211, 239, 241, 257, 359, 383, 419, 421, 431, 433, 479, 577, 719, 769, 839, 863, 1151, 1153, 1259, 1297, 1439, 1801, 2161, 2309, 2311, 2521, 2591, 2593, 2879, 3359, 3361
Offset: 1

Views

Author

Hal M. Switkay, May 16 2021

Keywords

Comments

The corresponding numbers of least prime signature are A344385.
19 is the first prime not in this sequence.
This sequence unites many familiar sequences of primes, including Fermat primes (A019434), Mersenne primes (A000668), primorial primes (A018239 and A057705), factorial primes (A088054), A007505, and A039687.
Questions: 1) Is this sequence infinite? 2) Is log(a(n)) = O(log(n)^2)?

Examples

			17 is a term because 17 - 1 = 16 is a number of least prime signature.
		

Crossrefs

Programs

  • Mathematica
    {2}~Join~Select[Prime@ Range[2, 900], AnyTrue[# + {-1, 1}, Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater] ] == # &] &] (* Michael De Vlieger, May 16 2021 *)

A256396 Primes p such that p divides 3*2^k + 1 for some k >= 0.

Original entry on oeis.org

2, 5, 7, 11, 13, 19, 29, 37, 53, 59, 61, 67, 79, 83, 97, 101, 103, 107, 131, 139, 149, 163, 173, 179, 181, 193, 197, 199, 211, 227, 269, 271, 293, 307, 313, 317, 347, 349, 367, 373, 379, 389, 409, 419, 421, 439, 443, 461, 463, 467, 487, 491, 499, 509, 523, 541, 547, 557, 563, 577, 587
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jun 03 2015

Keywords

Comments

Also prime factors of the numbers 2^k + 3.
Primes in A256397 do not belong to this sequence.

Crossrefs

Supersequence of A001122 and A039687.

Programs

  • PARI
    is(n)=if(!isprime(n), return(0)); if(n<5, return(n==2)); my(m=Mod(2,n)); while(m!=1, if(m==-3, return(1),m*=2)); 0 \\ Charles R Greathouse IV, Jun 03 2015

Formula

A prime p is in the sequence if and only if -3 == 2^k (mod p).

A332549 Numbers k such that A332547(k) = 3.

Original entry on oeis.org

5, 6, 8, 11, 12, 23, 47, 96, 191, 192, 383, 768, 6143, 12288, 786431, 786432, 3221225472, 51539607551, 206158430208, 824633720831, 6597069766656, 26388279066623, 108086391056891903, 55340232221128654847, 221360928884514619392, 226673591177742970257407
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2020

Keywords

Comments

The numbers k such that A332547(k) = 1 are given by A068194, a sequence of interest to Mersenne and Fermat, so this sequence may also be interesting.
The factors of the initial terms are 5, 2*3, 2^3, 11, 2^2*3, 23, 47, 2^5*3, 191, 2^6*3, 383, 2^8*3, 6143, 2^12*3, 786431, 2^18*3, ...
There are essentially two cases. Firstly n can be an odd prime and n+1 of the form 3*2^k. These are the terms of A007505 with 2 excluded. Otherwise n can be of the form 3*2^k and n+1 a prime. These are 1 less than the terms of A039687. In addition, 8 is a term which is a special case. - Andrew Howroyd, Feb 21 2020

Crossrefs

Programs

  • PARI
    upto(n)={Set(concat([if(n<8,[],[8]), select(isprime, [3*2^k-1 |k<-[1..logint((n+1)\3, 2)]]), select(p->isprime(p+1), [3*2^k |k<-[1..logint(n\3, 2)]])]))} \\ Andrew Howroyd, Feb 21 2020

Extensions

Terms a(17) and beyond from Andrew Howroyd, Feb 21 2020

A238739 Numbers n such that 2^n + 3 and 3*2^n + 1 are both prime.

Original entry on oeis.org

1, 2, 6, 12, 18, 30
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 04 2014

Keywords

Comments

Intersection of A057732 and A002253. - Joerg Arndt, Mar 04 2014
By checking primality of 2^n+3 for values n in A002253, it follows a(7) > 7033641. - Giovanni Resta, Mar 08 2014
Exponents of second Fermat prime pairs. - Juri-Stepan Gerasimov, Mar 08 2014
From Juri-Stepan Gerasimov, Mar 04 2014: (Start)
If prime pair {2^n + (2k+1), (2k+1)*2^n + 1} is called a Fermat prime pair, then numbers n such that 2^n + (2k + 1) and (2k + 1)*2^n + 1 are both prime:
for k = 0: 0, 1, 2, 4, 8, 16, ... the exponents first Fermat prime pairs;
for k = 1: 1, 2, 6, 12, 18, 30, ... the exponents second Fermat prime pairs;
for k = 2: 1, 3, ... the exponents third Fermat prime pairs;
for k = 3: 2, 4, 6, 20, 174, ... the exponents fourth Fermat prime pairs;
for k = 4: 1, 2, 3, 6, 7, ... the exponents fifth Fermat prime pairs;
for k = 5: 1, 3, 5, 7, ... the exponents sixth Fermat prime pairs;
for k = 6: 2, 8, 20, ... the exponents seventh Fermat prime pairs;
for k = 7: 1, 2, 4, 10, 12, ... the exponents eighth Fermat prime pairs;
for k = 8:
for k = 9: 6, ... the exponents tenth Fermat prime pairs;
for k = 10: 1, 4, 5, 7, 16, ... the exponents eleventh Fermat prime pairs;
for k = 11:
for k = 12: 2, 4, 6, 10, 20, 22, ...the exponents thirteenth Fermat prime pairs;
for k = 13: 2, 4, 16, 40, 44, ... the exponents fourteenth Fermat prime pairs;
for k = 14: 1, 3, 5, 27, 43, ... the exponents fifteenth Fermat prime pairs.
Semiprimes of the form (2^m+2k+1)*((2k+1)*2^m+1): 4, 9, 25, 35, 77, 91, 209, 289, 319, 481, 527, 533, 901, 989, ...
(End)

Examples

			a(1) = 1 because 2^1 + 3 = 5 and 3*2^1 + 1 = 7 are both prime,
a(2) = 2 because 2^2 + 3 = 7 and 3^2^2 + 1 = 13 are both prime,
a(3) = 6 because 2^6 + 3 = 67 and 3*2^6 + 1 = 193 are both prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..30] | IsPrime(2^n+3) and IsPrime(3*2^n+1)]; // Arkadiusz Wesolowski, Jan 23 2016
  • Mathematica
    Select[Range[30],AllTrue[{2^#+3,3*2^#+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 08 2015 *)
  • PARI
    isok(n) = isprime(2^n + 3) && isprime(3*2^n + 1); \\ Michel Marcus, Mar 04 2014
    
Previous Showing 11-19 of 19 results.