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-7 of 7 results.

A247219 Positive numbers m such that m^2 - 1 divides 2^m - 1.

Original entry on oeis.org

2, 4, 16, 36, 256, 456, 1296, 2556, 4356, 6480, 8008, 11952, 26320, 44100, 47520, 47880, 49680, 57240, 65536, 74448, 84420, 97812, 141156, 157080, 165600, 225456, 278496, 310590, 333432, 365940, 403900, 419710, 476736, 557040, 560736, 576720, 647088, 1011960, 1033056, 1204560, 1206180
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 26 2014

Keywords

Comments

Contains all numbers of the form m = A001146(k) = 2^2^k, k >= 0; and those with k > 1 seem to form the intersection with A247165. - M. F. Hasler, Jul 25 2015

Examples

			2 is in this sequence because 2^2 - 1 = 3 divides 2^2 - 1 = 3.
		

Crossrefs

Cf. A081762.

Programs

  • Magma
    [n: n in [2..122222] | Denominator((2^n - 1)/(n^2 - 1)) eq 1];
    
  • Mathematica
    Select[Range[10^4], Divisible[2^# - 1, #^2 - 1] &] (* Alonso del Arte, Nov 26 2014 *)
    Select[Range[2,121*10^4],PowerMod[2,#,#^2-1]==1&] (* Harvey P. Dale, Sep 08 2021 *)
  • PARI
    isok(n) = ((2^n - 1) % (n^2 - 1)) == 0; \\ Michel Marcus, Nov 26 2014
    
  • PARI
    forstep(n=0,1e8,2, Mod(2,n^2-1)^n-1 || print1(n", ")) \\ M. F. Hasler, Jul 25 2015
  • Python
    from gmpy2 import powmod
    A247219_list = [n for n in range(2,10**7) if powmod(2,n,n*n-1) == 1]
    # Chai Wah Wu, Dec 03 2014
    

Extensions

Corrected a(24) by Chai Wah Wu, Dec 03 2014

A249751 Numbers m such that m - 2 divides m^m + 2.

Original entry on oeis.org

3, 4, 7, 8, 67, 260, 379, 1191, 1471, 5076, 25807, 58591, 103780, 134947, 137347, 170587, 203236, 272611, 285391, 420211, 453748, 538735, 540856, 592411, 618451, 680707, 778807, 1163067, 1306936, 1520443, 1700947, 1891336, 2099203, 2831011, 3481960, 4020031
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 05 2014

Keywords

Examples

			3 is in this sequence because (3^3 + 2)/(3 - 2) = 29 is an integer.
		

Crossrefs

Programs

  • Magma
    [n: n in [3..10000] | Denominator((n^n+2)/(n-2)) eq 1];
    
  • Mathematica
    fQ[n_] := Mod[ PowerMod[ n, n, n - 2] + 2, n - 2] == 0; Select[ Range@ 4100000, fQ] (* Robert G. Wilson v, Dec 19 2014 *)
  • Python
    A249751_list = [n for n in range(3,10**7) if n==3 or pow(n,n,n-2) == n-4]
    # Chai Wah Wu, Dec 06 2014

Extensions

More terms from Chai Wah Wu, Dec 06 2014

A260406 Numbers n such that (n-1)^2-1 divides 2^(n-1)-1.

Original entry on oeis.org

1, 3, 5, 17, 37, 257, 457, 1297, 2557, 4357, 6481, 8009, 11953, 26321, 44101, 47521, 47881, 49681, 57241, 65537, 74449, 84421, 97813, 141157, 157081, 165601, 225457, 278497, 310591, 333433, 365941, 403901, 419711, 476737, 557041, 560737, 576721, 647089, 1011961
Offset: 1

Views

Author

M. F. Hasler, Jul 24 2015

Keywords

Comments

The initial 1 is conventional.
647089 is the smallest composite number of this sequence (which makes it different from A081762).
The next composite number in this sequence is a(1000) = F_5 = 4294967297. - Robert G. Wilson v, Jul 25 2015
The Fermat numbers 2^2^k+1 = A000215(k) with k>1 are a subsequence of this sequence. I conjecture that they are equal to the intersection of this and A260407 (apart from the conventional 1), i.e., the numbers such that (n-1)^4-1 divides 2^(n-1)-1.

Crossrefs

Programs

  • Magma
    [n: n in [3..6*10^5] | (2^(n-1)-1) mod ((n-1)^2-1) eq 0]; // Vincenzo Librandi, Jul 26 2015
  • Mathematica
    fQ[n_] := PowerMod[2, n - 1, (n - 1)^2 - 1] == 1; Select[ Range[3, 1200000], fQ] (* Robert G. Wilson v, Jul 25 2015 *)
  • PARI
    forstep(n=1,1e7,2,Mod(2,(n-1)^2-1)^(n-1)==1&&print1(n","))
    

A260072 Primes p such that (p-1)^2+1 divides 2^(p-1)-1.

Original entry on oeis.org

17, 257, 8209, 65537, 649801
Offset: 1

Views

Author

Jaroslav Krizek, Jul 22 2015

Keywords

Comments

a(6), if it exists, is larger than 1.7*10^12. - Giovanni Resta, Jul 23 2015
N = 1382401 is the smallest composite number such that (n-1)^2+1 divides 2^(n-1)-1, cf. A260407; see also A081762 and A260406. The sequence contains all Fermat primes 2^2^k+1 > 5 (A019434). - M. F. Hasler, Jul 24 2015

Examples

			17 is in this sequence because (17 - 1)^2 + 1 = 257 divides 2^(17 - 1) - 1 = 65535; 65535 / 257 = 255.
		

Crossrefs

Cf. A081762 (primes p such that (p-1)^2 - 1 divides 2^(p-1) - 1).

Programs

  • Magma
    [n: n in [1..2000000] | IsPrime(n) and (2^(n-1)-1) mod ((n-1)^2 + 1) eq 0];
  • Mathematica
    fQ[n_] := PowerMod[2, n-1, (n-1)^2 + 1] == 1; p = 2; lst = {}; While[p < 10^9, If[ fQ@ p, AppendTo[lst, p]]; p = NextPrime@ p] (* Robert G. Wilson v, Jul 24 2015 *)

A260407 Numbers n such that (n-1)^2+1 divides 2^(n-1)-1.

Original entry on oeis.org

1, 17, 257, 8209, 65537, 649801, 1382401, 4294967297
Offset: 1

Views

Author

M. F. Hasler, Jul 24 2015

Keywords

Comments

a(7) = 1382401 is the first composite number of this sequence (which makes it different from A260072).
The Fermat numbers 2^(2^k)+1 = A000215(k) with k>1 are a subsequence of this sequence. I conjecture that they are equal to the intersection of this and A260406 (except for the conventional 1).
Conjecture: also numbers n such that ((2^k)^(n-1)-1) == 0 mod ((n-1)^2+1) for all k >= 1. - Jaroslav Krizek, Jun 02 2016

Crossrefs

Programs

  • Magma
    [n: n in [1..10^6] | (2^(n-1)-1) mod ((n-1)^2+1) eq 0 ]; // Vincenzo Librandi, Jul 25 2015
  • Mathematica
    Join [{1},Select[Range[43*10^8],PowerMod[2,#-1,(#-1)^2+1]==1&]] (* Harvey P. Dale, Sep 07 2018 *)
  • PARI
    forstep(n=1,1e7,2,Mod(2,(n-1)^2+1)^(n-1)==1&&print1(n","))
    

Formula

a(n) = A247165(n)+1.

A337846 Odd integers k such that 2^((k-1)/2) == 1 (mod k*(k-2)).

Original entry on oeis.org

17, 257, 457, 1297, 6481, 11953, 26321, 47521, 47881, 49681, 65537, 74449, 157081, 165601, 278497, 333433, 476737, 557041, 560737, 576721, 1033057, 1266841, 1329337, 1463617, 1468897, 2291041, 2422201, 2754481, 2851633, 2969137, 3255281
Offset: 1

Views

Author

Benoit Cloitre, Sep 26 2020

Keywords

Comments

Computed terms are prime. Is this a possible primality test or are there pseudo primes? Terms are of the form 8k+1.
The Fermat number F(5) = A000215(5) = 4294967297 = 641*6700417 is the smallest composite counterexample. - Hugo Pfoertner, Sep 26 2020

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 10^6, 2], PowerMod[2, (# - 1)/2, #*(# - 2)] == 1 &] (* Amiram Eldar, Sep 26 2020 *)
  • PARI
    is(n) = n%2 && n>=3 && Mod(2, n*(n-2))^((n-1)/2) == 1

A337847 Odd integers k such that 3^((k-1)/2) == 1 (mod k*(k-2)).

Original entry on oeis.org

457, 1297, 6481, 14401, 26497, 44101, 47521, 47881, 165601, 225457, 446881, 560737, 576721, 677041, 1037857, 1049941, 1649341, 1903981, 1934137, 2291041, 3990601, 4110121, 4262161, 4663297, 4736341, 5293081, 5317057, 5372929, 6410497, 6535681, 6651361, 8122501
Offset: 1

Views

Author

Benoit Cloitre, Sep 26 2020

Keywords

Comments

Computed terms are prime. Is this a possible primality test or are there pseudo primes? Terms are of the form 12k+1.

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 10^6, 2], PowerMod[3, (# - 1)/2, #*(# - 2)] == 1 &] (* Amiram Eldar, Sep 26 2020 *)
  • PARI
    is(n) = n%2 && n>=3 && Mod(3, n*(n-2))^((n-1)/2) == 1

Extensions

More terms from Amiram Eldar, Sep 26 2020
Showing 1-7 of 7 results.