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 11 results. Next

A261117 Smallest positive integer b such that b^(2^n)+1 is divisible by the square of A035089(n+1).

Original entry on oeis.org

8, 7, 110, 40, 1497, 894, 315, 48, 166107, 95853, 63609, 71589, 492348, 209628, 388440, 48853, 6118793, 2684186, 25787045, 49643800, 54302036, 3969770538, 17592956651, 7347360617, 991255542, 8249087392, 11518171450, 51385581002, 2268777293, 21252616802, 2822082710511
Offset: 0

Views

Author

Jeppe Stig Nielsen, Aug 08 2015

Keywords

Comments

For given n, if A035089(n+1) exists (which is true by Dirichlet's theorem on arithmetic progressions), then a(n) exists. Proof: p := A035089(n+1) is a prime of the form p=k*2^(n+1)+1, then the group (Z/(p^2)Z)* is cyclic of order p*(p-1) = p*k*2^(n+1). It therefore has an element b of order exactly 2^(n+1). For that b we have then b^(2^n) == -1 (mod p^2).
For given n, a(n) is not necessarily the smallest b such that b^(2^n)+1 is nonsquarefree; see A260824.

Examples

			Consider n=4, hence generalized Fermat numbers b^16+1. The first prime (A035089(4+1)) of the form 32*k+1 is 97. It follows that 97 is the smallest prime whose square divides a number of the form b^16+1. The first time 97^2 divides b^16+1 is for b=1497. Hence a(4)=1497. However, A260824(4) is smaller, A260824(4)=392. This is because already 392^16+1 is nonsquarefree (but the prime with a square dividing it, 769, exceeds 97).
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,10^10,p=(k<<(n+1))+1;if(isprime(p),break()));for(b=1,p^2,b%p!=0&Mod(b,p^2)^(1<
    				
  • PARI
    a(n)=for(k=1, 10^10, p=(k<<(n+1))+1; if(isprime(p), break())); e=p*(p-1)/(1<<(n+1)); h=znprimroot(p^2)^e; g=h^2; m=p^2; for(i=1,1<
    				

A057775 a(n) is the least prime p such that p-1 is divisible by 2^n and not by 2^(n+1).

Original entry on oeis.org

2, 3, 5, 41, 17, 97, 193, 641, 257, 7681, 13313, 18433, 12289, 40961, 114689, 163841, 65537, 1179649, 786433, 5767169, 7340033, 23068673, 104857601, 377487361, 754974721, 167772161, 469762049, 2013265921, 3489660929, 12348030977, 3221225473, 75161927681
Offset: 0

Views

Author

Labos Elemer, Nov 02 2000

Keywords

Comments

If we drop the requirement that p-1 must not be divisible by 2^(n+1), we get instead A035089, which is a nondecreasing sequence. - Jeppe Stig Nielsen, Aug 09 2015

Examples

			a(13) = 40961 = 1 + 8192*5 where the last term is divisible by the 13th power of 2 and 40961 is the smallest prime with that property.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
      for p from 2^n+1 by 2^(n+1) do
        if isprime(p) then return p fi
      od
    end proc:
    map(f, [$0..100]); # Robert Israel, Aug 10 2015
  • Mathematica
    Table[k = 1; While[p = k*2^n + 1; ! PrimeQ[p], k = k + 2]; p, {n, 0, 40}] (* T. D. Noe, Dec 27 2011 *)
  • PARI
    a(n)=forstep(k=1,9e99,2,isprime((k<Jeppe Stig Nielsen, Aug 09 2015

Formula

a(n) = prime(A057776(n+1)). - Amiram Eldar, Mar 16 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Nov 03 2000

A133859 Smallest odd prime base q such that p^9 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

7681, 39367, 7812499, 135967277, 4715895383, 822557039, 48718117843, 513127081109, 147534349327, 21203414421907, 52879244321341, 15069267560119, 798099274499279, 164129642266943, 1740228634955257, 149381307185023
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(9) = 7681.
a(2) = A125609(9) = 39367.
a(3) = A125610(9) = 7812499.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^9 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133860 Smallest odd prime base q such that p^10 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

12289, 472391, 78124999, 135967277, 24262286441, 38050596989, 5498076927457, 8388044818849, 30794280412669, 45941644105613, 1205285836084793, 7909086479714171, 1438991183761177, 47101607991825047, 18067554193458689
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(10) = 12289.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^10 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133861 Smallest odd prime base q such that p^11 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

12289, 1062881, 292968749, 7909306973, 1194631280321, 2395794301259, 38413406256881, 77460384757423, 30794280412669, 4161130688896397, 3748333074529501, 240404931594746129, 191828075390557213
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(11) = 12289.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^11 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133862 Smallest odd prime base q such that p^12 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

12289, 1062881, 853235443, 92233439147, 3143820659087, 58713568184837, 2359162908109223, 2649283656602003, 53928980532177631, 557792163777408809, 2084452633098194627, 8958368398788306367, 15810453676175767201
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(12) = 12289.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^12 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133863 Smallest odd prime base q such that p^13 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

40961, 19131877, 2441406251, 115385868869, 138090848575723, 358661570404751, 44510586506850631, 252317900773542353, 4465433274456775633, 39171440762351329829, 11887418854442931407, 14582408526413537791
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(13) = 40961.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^13 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133864 Smallest odd prime base q such that p^14 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

65537, 19131877, 53834264557, 1356446145697, 488581592070877, 22771419458231473, 346100334752156863, 2467410166021233673, 19165875476832528551, 61879867860030528131, 1106827928513014993387
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(14) = 65537.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^14 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A133865 Smallest odd prime base q such that p^15 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

65537, 57395627, 122070312499, 56020344873707, 6266190914259137, 65106791321062951, 12132548193910221893, 50407811312994280933, 172048888780798211059, 16668261908754510204233, 35965174106571679882189
Offset: 1

Views

Author

Alexander Adamchuk, Sep 26 2007

Keywords

Examples

			a(1) = A035089(15) = 65537.
		

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ !PowerMod[ Prime[ k ], Prime[ n ] - 1, Prime[ n ]^15 ] == 1, k++ ]; Print[ { n, Prime[ k ] } ], {n, 1, 100} ]

Extensions

Extended by Max Alekseyev, May 08 2009

A334296 Smallest k such that (2k+1)*2^n+1 is prime.

Original entry on oeis.org

0, 0, 0, 2, 0, 1, 1, 2, 0, 7, 6, 4, 1, 2, 3, 2, 0, 4, 1, 5, 3, 5, 12, 22, 22, 2, 3, 7, 6, 11, 1, 17, 21, 4, 37, 29, 1, 7, 7, 2, 13, 1, 4, 4, 7, 17, 9, 13, 7, 11, 3, 8, 3, 25, 24, 2, 13, 14, 49, 13, 15, 26, 52, 4, 12, 4, 1, 4, 15, 11, 19, 19, 63, 11, 33, 2, 46
Offset: 0

Views

Author

Mike Speciner, Apr 21 2020

Keywords

Comments

A057775 is the corresponding sequence of primes.

Examples

			a(0)=a(1)=a(2)=0 because 2^0+1=2, 2^1+1=3, 2^2+1=5 are prime.
a(3)=2 because 2^8+1=9 and 3*2^8+1=25 are not prime, but 5*2^8+1=41 is.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, v, k;
       t:= 2^n; v:= -t+1;
       for k from 0 do
          v:= v+2*t;
          if isprime(v) then return k fi
       od
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 14 2020
  • Mathematica
    a[n_] := Block[{k = 0}, While[! PrimeQ[(2 k + 1) 2^n + 1], k++]; k]; Array[a, 77, 0] (* Giovanni Resta, May 08 2020 *)
  • PARI
    a(n) = my(k=0); while (!isprime((2*k+1)*2^n+1), k++); k; \\ Michel Marcus, Apr 30 2020
  • Python
    from itertools import count
    from sympy import isprime
    def pow2p1() : # generates the sequence
      for n in count() :
        for k in count() :
          if isprime(((2*k+1)<
    				

Formula

a(n) = (A057778(n)-1)/2.
a(n) = ((A057775(n)-1)/2^n-1)/2.
Showing 1-10 of 11 results. Next