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

A258367 a(n) is the smallest A (in absolute value) such that for p = prime(n), 2^{(p-1)/2} == +-1 + A*p (mod p^2), i.e., such that p is a near-Wieferich prime.

Original entry on oeis.org

1, 1, 1, 3, 5, 2, 8, 3, 14, 3, 18, 9, 9, 22, 18, 4, 18, 5, 1, 28, 30, 24, 3, 20, 46, 22, 47, 21, 15, 9, 57, 42, 15, 48, 28, 41, 48, 60, 85, 25, 74, 25, 52, 11, 32, 51, 17, 13, 34, 113, 13, 71, 2, 16, 64, 130, 81, 35, 37, 29, 39, 147, 68, 60, 71, 96, 92, 99, 12
Offset: 2

Views

Author

Felix Fröhlich, May 28 2015

Keywords

Comments

p is in A001220 iff a(n) = 0. This is the case iff A014664(n) = A243905(n), which happens for n = 183 and n = 490.
Is a(n) = 0 for any other n, and, if yes, are there infinitely many such n?

Crossrefs

Programs

  • PARI
    a(n,p=prime(n))=abs(centerlift(Mod(2,p^2)^((p-1)/2))\/p)
    apply(p->a(0,p), primes(100)[2..100]) \\ Charles R Greathouse IV, Jun 15 2015

Formula

a(n) = min(b(n) mod p, -b(n) mod p) where p = prime(n) and b(n) = Sum_{i=1..ceiling((p-1)/4)} (2i-1)^(p-2). - Daniel Chen, Sep 01 2022

A282902 Square array A(n, k) read by antidiagonals downwards: multiplicative order of 2 modulo prime(n)^k, where k runs over the positive integers.

Original entry on oeis.org

2, 6, 4, 18, 20, 3, 54, 100, 21, 10, 162, 500, 147, 110, 12, 486, 2500, 1029, 1210, 156, 8, 1458, 12500, 7203, 13310, 2028, 136, 18, 4374, 62500, 50421, 146410, 26364, 2312, 342, 11, 13122, 312500, 352947, 1610510, 342732, 39304, 6498, 253, 28, 39366, 1562500, 2470629, 17715610, 4455516, 668168, 123462, 5819, 812, 5
Offset: 2

Views

Author

Felix Fröhlich, Feb 24 2017

Keywords

Comments

The number of initial terms in row n with constant values is equal to the highest value of x such that p = prime(n) satisfies 2^(p-1) == 1 (mod p^x).
From Robert Israel, Feb 24 2017: (Start)
a(n,k+1) is either a(n,k) or a(n,k)*prime(n). If it is a(n,k)*prime(n), then a(n,k+j) = a(n,k)*prime(n)^j for all j>=1.
a(n,2) = a(n,1) if and only if prime(n) is a Wieferich prime (A001220).
(End)

Examples

			Array A(n, k) starts
   2,   6,   18,     54,     162,      486,      1458
   4,  20,  100,    500,    2500,    12500,     62500
   3,  21,  147,   1029,    7203,    50421,    352947
  10, 110, 1210,  13310,  146410,  1610510,  17715610
  12, 156, 2028,  26364,  342732,  4455516,  57921708
   8, 136, 2312,  39304,  668168, 11358856, 193100552
  18, 342, 6498, 123462, 2345778, 44569782, 846825858
		

Crossrefs

Cf. A014664 (column 1), A243905 (column 2).
Cf. A001220.

Programs

  • Maple
    seq(seq(numtheory:-order(2,ithprime(i)^(m-i)),i=2..m-1),m=2..10); # Robert Israel, Feb 24 2017
  • Mathematica
    A[n_, k_] := MultiplicativeOrder[2, Prime[n]^k];
    Table[A[n-k+1, k], {n, 2, 11}, {k, n-1, 1, -1}] // Flatten (* Jean-François Alcover, Mar 02 2020 *)
  • PARI
    a(n, k) = znorder(Mod(2, prime(n)^k))
    array(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(a(n, k), ", ")); print(""))
    array(7, 8) \\ print 7 X 8 array

A187965 Numbers k such that 2^k - 1 and 2^k + 1 are not squarefree.

Original entry on oeis.org

21, 30, 63, 78, 90, 105, 110, 147, 150, 189, 204, 210, 231, 234, 270, 273, 310, 315, 330, 340, 357, 390, 399, 441, 450, 465, 483, 510, 525, 546, 550, 567, 570, 609, 612, 630, 651, 657, 666, 690, 693, 702, 735, 750, 759, 770, 777, 810, 819, 858, 861, 870, 903, 930, 945, 987, 990, 1014, 1020, 1029, 1050, 1071
Offset: 1

Views

Author

Keywords

Comments

If k is in the sequence, then so is m*k for any odd m. - Thomas Ordowski, Nov 23 2015
Note that 110, 310, 340, 550, 770 are not divisible by 3.
Let b(p) be the multiplicative order of 2 modulo p^2. Then k is in this sequence if and only if there exists odd primes p, q such that b(p) | k and k == b(q)/2 (mod b(q)) with even b(q). For example, we have b(7) = 21, b(3) = 6 so b(7) | 21, 21 == b(3)/2 (mod b(3)), hence 21 is a term; likewise, b(3) = 6, b(5) = 20, so b(3) | 30, 30 == b(5)/2 (mod b(5)), hence 30 is a term. - Jianing Song, Jan 20 2021

Examples

			2^21 - 1 = 7^2 * 127 * 337, 2^21 + 1 = 3^2 * 43 * 5419.
		

Crossrefs

Cf. A243905 (multiplicative orders of 2 modulo p^2), A242777 (k+1 is prime).

Programs

  • Magma
    [n: n in [1..250] | not IsSquarefree(2^n-1) and not IsSquarefree(2^n+1)]; // Vincenzo Librandi, Nov 23 2015
  • Mathematica
    Select[ Range@ 500, !(SquareFreeQ[2^# - 1] || SquareFreeQ[2^# + 1]) &]
    Select[Range[1100],NoneTrue[2^#+{1,-1},SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 22 2019 *)
  • PARI
    is(n) = !issquarefree(2^n-1) && !issquarefree(2^n+1);
    for(n=1, 1e3, if(is(n), print1(n, ", "))) \\ Altug Alkan, Nov 22 2015
    

Extensions

More terms from Joerg Arndt, Nov 23 2015

A282552 Difference between the multiplicative orders of 2 modulo p^2 and 2 modulo p, where p = prime(n).

Original entry on oeis.org

4, 16, 18, 100, 144, 128, 324, 242, 784, 150, 1296, 800, 588, 1058, 2704, 3364, 3600, 4356, 2450, 648, 3042, 6724, 968, 4608, 10000, 5202, 11236, 3888, 3136, 882, 16900, 9248, 19044, 21904, 2250, 8112, 26244, 13778, 29584, 31684, 32400, 18050, 18432, 38416
Offset: 2

Views

Author

Felix Fröhlich, Feb 18 2017

Keywords

Comments

a(n) = 0 iff A014664(n) = A243905(n), i.e., iff prime(n) is a Wieferich prime (A001220). So far this is known to be the case only for prime(183) = 1093 and prime(490) = 3511, i.e., a(183) = 0 and a(490) = 0.

Crossrefs

Programs

  • Mathematica
    Table[MultiplicativeOrder[2, #^2] - MultiplicativeOrder[2, #] &@ Prime@ n, {n, 2, 45}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = my(p=prime(n)); znorder(Mod(2, p^2)) - znorder(Mod(2, p))

Formula

a(n) = A243905(n) - A014664(n).

A305184 Multiplicative order of 2 (mod p^2), where p is the n-th Wieferich prime (A001220).

Original entry on oeis.org

364, 1755
Offset: 1

Views

Author

Felix Fröhlich, May 30 2018

Keywords

Comments

Meissner discovered the congruence 2^364 == 1 (mod 1093^2) and thus proved that 1093 is a Wieferich prime, i.e., a term of A001220 (cf. Meissner, 1913).
Later, Beeger discovered the congruence 2^1755 == 1 (mod 3511^2) and proved that 3511 is also a Wieferich prime (cf. Beeger, 1922).
Let b(n) = (A001220(n)-1)/a(n). Then b(1) = 3 and b(2) = 2.
From the fact that a(1) and a(2) are composite it follows that A001220(1) = 1093 and A001220(2) = 3511 do not divide any terms of A001348 (cf. Dobson).
Curiously, both 364 and 1755 are repdigits in some base. 364 = 444 in base 9 and 1755 = 3333 in base 8. Compare this with Dobson's observation that 1092 and 3510 are 444 in base 16 and 6666 in base 8, respectively (cf. Dobson).

Crossrefs

Programs

  • PARI
    forprime(p=1, , if(Mod(2, p^2)^(p-1)==1, print1(znorder(Mod(2, p^2)), ", ")))

Formula

a(n) = A014664(A000720(A001220(n))) = A243905(A000720(A001220(n))). [Corrected by Jianing Song, Sep 20 2019]
Showing 1-5 of 5 results.