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.

A297412 Numbers k such that A019320(k) is in A217468.

Original entry on oeis.org

43, 114, 163, 258, 326, 379, 487, 758, 762, 883, 974, 978, 1459, 1766, 2274, 2647, 2918, 2922, 3079, 3943, 5294, 5298, 5419, 6158, 7886, 8754, 9199, 10838, 11827, 14407, 15882, 16759, 18398, 18474, 18523, 23654, 23658, 24967, 26407, 28814, 32514, 33518, 37046, 37339, 39367
Offset: 1

Views

Author

Max Alekseyev, Dec 29 2017

Keywords

Crossrefs

Set difference of A297413 and A072226.

Programs

  • PARI
    is_A297412(n) = my(m=polcyclo(n, 2)); Mod(2, m*(m-1))^m==2 && !ispseudoprime(m);

A069051 Primes p such that p-1 divides 2^p-2.

Original entry on oeis.org

2, 3, 7, 19, 43, 127, 163, 379, 487, 883, 1459, 2647, 3079, 3943, 5419, 9199, 11827, 14407, 16759, 18523, 24967, 26407, 37339, 39367, 42463, 71443, 77659, 95923, 99079, 113779, 117307, 143263, 174763, 175447, 184843, 265483, 304039, 308827
Offset: 1

Views

Author

Benoit Cloitre, Apr 03 2002

Keywords

Comments

These are the prime values of n such that 2^n == 2 (mod n*(n-1)). - V. Raman, Sep 17 2012
These are the prime values p such that n^(2^(p-1)) is congruent to n or -n (mod p) for all n in Z/pZ, the commutative ring associated with each term. This results follows from Fermat's little theorem. - Philip A. Hoskins, Feb 08 2013
A prime p is in this sequence iff p-1 belongs to A014741. For p>2, this is equivalent to (p-1)/2 belonging to A014945. - Max Alekseyev, Aug 31 2016
From Thomas Ordowski, Nov 20 2018: (Start)
Conjecture: if n-1 divides 2^n-2, then (2^n-2)/(n-1) is squarefree.
Numbers n such that b^n == b (mod (n-1)*n) for every integer b are 2, 3, 7, and 43; i.e., only prime numbers of the form A014117(k) + 1. (End)
These are primes p such that p^2 divides b^(2^p-2) - 1 for every b coprime to p. - Thomas Ordowski, Jul 01 2024

Crossrefs

a(n)-1 form subsequence of A014741; (a(n)-1)/2 for n>1 forms a subsequence of A014945.

Programs

  • GAP
    Filtered([1..350000],p->IsPrime(p) and (2^p-2) mod (p-1)=0); # Muniru A Asiru, Dec 03 2018
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^p-2) mod (p-1))]; // Vincenzo Librandi, Dec 03 2018
    
  • Mathematica
    Select[Prime[Range[10000]], Mod[2^# - 2, # - 1] == 0 &] (* T. D. Noe, Sep 19 2012 *)
    Join[{2,3},Select[Prime[Range[30000]],PowerMod[2,#,#-1]==2&]] (* Harvey P. Dale, Apr 17 2022 *)
  • PARI
    isA069051(p)=Mod(2,p-1)^p==2 && isprime(p); \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    from sympy import prime
    for n in range(1,350000):
        if (2**prime(n)-2) % (prime(n)-1)==0:
            print(prime(n)) # Stefano Spezia, Dec 07 2018

Extensions

a(1) added by Charles R Greathouse IV, Sep 19 2012

A217465 Composite integers k such that 2^k == 2 (mod k*(k+1)).

Original entry on oeis.org

561, 1905, 4033, 4681, 5461, 6601, 8481, 11305, 13741, 13981, 16705, 23377, 30121, 31417, 41041, 49141, 52633, 57421, 88357, 88561, 101101, 107185, 121465, 130561, 162193, 196021, 196093, 204001, 208465, 219781, 266305, 276013, 278545, 282133, 285541, 314821, 334153, 341497, 390937, 399001
Offset: 1

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Terms A019320(k) belongs to this sequence for k in A297415. - Max Alekseyev, Dec 29 2017

Crossrefs

Subsequence of A216822.
Contains A303531 as a subsequence.

Programs

  • Mathematica
    Select[Range[400000],!PrimeQ[#]&&PowerMod[2,#,#(#+1)]==2&] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    for(n=1,10000,if((2^n)%(n*(n+1))==2&&isprime(n)==0,printf(n",")))
    
  • PARI
    forcomposite(n=4,10^6, if(Mod(2,n*(n+1))^n==2, print1(n", "))) \\ Charles R Greathouse IV, Aug 29 2024
    
  • Python
    from sympy import isprime
    A217465_list = [n for n in range(1,10**6) if pow(2,n,n*(n+1)) == 2 and not isprime(n)] # Chai Wah Wu, Mar 25 2021

A219037 Numbers k such that k divides 2^k + 2 and (k-1) divides 2^k + 1.

Original entry on oeis.org

2, 6, 66, 73786976294838206466
Offset: 1

Views

Author

Max Alekseyev, Nov 10 2012

Keywords

Comments

Also, numbers k such that 2^k == k-2 (mod k*(k-1)).
The sequence is infinite: if m is in this sequence, then so is 2^m + 2.
No other terms below 10^20.

References

  • W. Sierpinski, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #18.

Crossrefs

Intersection of A006517 and A055685.

Formula

Conjecture: a(n+1) = 2^a(n) + 2 for all n.

A330382 Composite numbers k such that k-1 divides 2^k-2.

Original entry on oeis.org

55, 295, 343, 1027, 1135, 1315, 1807, 2059, 2395, 3403, 4375, 5335, 6175, 6499, 7183, 7939, 9235, 10207, 12643, 13123, 14155, 16003, 16255, 19495, 21547, 23815, 27595, 27703, 30619, 35479, 37927, 43219, 45487, 48007, 48763, 50275, 55567, 58483, 64387, 64639, 74899
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, Dec 12 2019

Keywords

Comments

If k is in this sequence, then 2^k-1 is also a term, so this sequence is infinite.
Also 2^p-1 is in this sequence for such prime p in A069051 that 2^p-1 is composite.
Theorem: if k-1 | 2^k-2, then m-1 | 2^m-2, where m = 2^k-1.
Conjecture: k-1 | 2^k-2 for k = (2^n-1)^3 if and only if n(n-1) | 2^n-2 for n > 2.
It seems that A007013(n)^3 for n > 1 and A007013(n) for n > 4 are in this sequence.
These are the composites k for which M - 1 divides 2^M - 2 where M = 2^k - 1. - Thomas Ordowski, Jul 01 2024

Crossrefs

A217468 is a subsequence.

Programs

  • Mathematica
    Select[Range[75000], CompositeQ[#] && Divisible[PowerMod[2, #, # - 1] - 2, # - 1] &]
  • PARI
    forcomposite(k=1,75000,if(!((2^k-2)%(k-1)),print1(k,", "))) \\ Hugo Pfoertner, Dec 12 2019

Formula

Composites of A014741(n) + 1. - Thomas Ordowski, Jul 01 2024

A374841 Numbers k such that 2^(2^k-2) == 1 (mod k^2).

Original entry on oeis.org

3, 7, 19, 43, 73, 127, 163, 337, 341, 379, 487, 601, 881, 883, 937, 1387, 1459, 1801, 2593, 2647, 2857, 3079, 3529, 3673, 3943, 4057, 4201, 4681, 5419, 5461, 5881, 6121, 6481, 6529, 6553, 6571, 6841, 7481, 7993, 8233, 8911, 9001, 9199, 9241, 9721, 10261, 10657, 11161, 11827, 12241
Offset: 1

Views

Author

Thomas Ordowski, Jul 22 2024

Keywords

Comments

If p is an odd prime and 2^(2^p-2) == 1 (mod p), then 2^(2^p-2) == 1 (mod p^2).
If 2^(k-1) == 1 (mod k) and 2^(2^k-2) == 1 (mod k), then 2^(2^k-2) == 1 (mod k^2).
Composite terms that are not Fermat pseudoprimes to base 2 are 66709, 951481, ...
Note that 66709 = 19*3511 and 951481 = 271*3511, where 3511 is a Wieferich prime.

Examples

			3 is a term, because 3^2 divides 2^(2^3-2) - 1 = 2^6 - 1 = 63.
		

Crossrefs

Cf. A001220, A001567, A069051 (> 2 is a subsequence), A217468 (subsequence).

Programs

  • Mathematica
    Select[Range[12500], PowerMod[2, 2^# - 2, #^2] == 1 &] (* Amiram Eldar, Jul 22 2024 *)
  • PARI
    isok(k) = Mod(2, k^2)^(2^k-2) == 1; \\ Michel Marcus, Jan 05 2025

Extensions

More terms from Amiram Eldar Jul 22 2024

A297413 Numbers k such that 2^m == 2 (mod m*(m-1)), where m=A019320(k).

Original entry on oeis.org

2, 3, 6, 7, 14, 19, 38, 42, 43, 86, 114, 127, 163, 254, 258, 326, 379, 487, 758, 762, 883, 974, 978, 1459, 1766, 2274, 2647, 2918, 2922, 3079, 3943, 5294, 5298, 5419, 6158, 7886, 8754, 9199, 10838, 11827, 14407, 15882, 16759, 18398, 18474, 18523, 23654, 23658, 24967, 26407, 28814, 32514, 33518, 37046, 37339, 39367
Offset: 1

Views

Author

Max Alekseyev, Dec 29 2017

Keywords

Comments

Also, numbers k such that A019320(k) belongs to A069051 or A217468.

Crossrefs

Contains A297412 as a subsequence.

Programs

  • PARI
    is_A297413(k) = my(m=polcyclo(k,2)); Mod(2,m*(m-1))^m==2;
Showing 1-7 of 7 results.