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 21-30 of 39 results. Next

A271782 Smallest n-Wall-Sun-Sun prime.

Original entry on oeis.org

13, 241, 2, 3, 191, 5, 2, 3, 2683
Offset: 2

Views

Author

Felix Fröhlich, Apr 18 2016

Keywords

Comments

A prime p is a k-Wall-Sun-Sun prime iff p^2 divides F_k(pi_k(p)), where F_k(n) is the k-Fibonacci numbers, i.e., a Lucas sequence of first kind with (P,Q) = (k,-1), and pi_k(p) is the Pisano period of k-Fibonacci numbers modulo p (cf. A001175, A175181-A175185).
For prime p > 2 not dividing k^2 + 4, it is a k-Wall-Sun-Sun prime iff p^2 | F_k(p-((k^2+4)/p)), where ((k^2+4)/p) is the Kronecker symbol.
a(1) would be the smallest Wall-Sun-Sun prime whose existence is an open question.
a(12)..a(16) = 2, 3, 3, 29, 2. a(18)..a(33) = 3, 11, 2, 23, 3, 3, 2, 5, 79, 3, 2, 7, 23, 3, 2, 239. a(36)..a(38) = 2, 7, 17. a(40), a(41) = 2, 3. a(43)..a(46) = 5, 2, 3, 41. - R. J. Mathar, Apr 22 2016
a(17) = 1192625911, a(35) = 153794959, a(39) = 30132289567, a(47)..a(50) = 139703, 2, 3, 3. If they exist, a(11), a(34), a(42) are greater than 10^12. - Max Alekseyev, Apr 26 2016
Column k = 1 of table T(n, k) of k-th n-Wall-Sun-Sun prime (that table is not yet in the OEIS as a sequence). - Felix Fröhlich, Apr 25 2016
From Richard N. Smith, Jul 16 2019: (Start)
a(n) = 2 if and only if n is divisible by 4.
a(n) = 3 if and only if n == 5, 9, 13, 14, 18, 22, 23, 27, 31 (mod 36). (End)

Crossrefs

Programs

  • PARI
    A271782(k) = forprime(p=2,10^8, if( (([0,1;1,k]*Mod(1,p^2))^(p-kronecker(k^2+4,p)))[1,2]==0, return(p);); ); \\ Max Alekseyev, Apr 22 2016, corrected by Richard N. Smith, Jul 16 2019 to include p=2 and p divides k^2+4

Formula

a(4n) = 2.

Extensions

Edited by Max Alekseyev, Apr 25 2016

A281001 Square array read by antidiagonals downwards: A(n, 1) = smallest Wieferich prime to base n and A(n, k) = smallest Wieferich prime to base A(n, k-1) for k > 1.

Original entry on oeis.org

1093, 2, 11, 1093, 71, 1093, 2, 3, 2, 2, 1093, 11, 1093, 1093, 66161, 2, 71, 2, 2, 2, 5, 1093, 3, 1093, 1093, 1093, 2, 3, 2, 11, 2, 2, 2, 1093, 11, 2, 1093, 71, 1093, 1093, 1093, 2, 71, 1093, 3, 2, 3, 2, 2, 2, 1093, 3, 2, 11, 71, 1093, 11, 1093, 1093, 1093, 2
Offset: 2

Views

Author

Felix Fröhlich, Jan 12 2017

Keywords

Comments

Row n becomes periodic, repeating the terms 2, 1093 if n is in A252801 when n is prime or if A039951(n) is in A252801 when n is composite.
Row n becomes periodic, repeating the terms 3, 11, 71 if n is in A252802 when n is prime or if A039951(n) is in A252802 when n is composite.
Row n becomes periodic, repeating the terms 83, 4871 if n is in A252812 when n is prime or if A039951(n) is in A252812 when n is composite.

Examples

			Array starts
   1093,    2, 1093,    2, 1093,    2, ...
     11,   71,    3,   11,   71,    3, ...
   1093,    2, 1093,    2, 1093,    2, ...
      2, 1093,    2, 1093,    2, 1093, ...
  66161,    2, 1093,    2, 1093,    2, ...
      5,    2, 1093,    2, 1093,    2, ...
  ....
		

Crossrefs

Programs

  • PARI
    smallestwieftobase(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
    table(rows, cols) = for(x=2, rows+1, my(i=0, w=smallestwieftobase(x)); while(i < cols, print1(w, ", "); w=smallestwieftobase(w); i++); print(""))
    table(7, 5) \\ print initial 5 terms of upper 7 rows of array

A178813 a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p is the first prime that divides (prime(n)^(p-1) - 1)/p.

Original entry on oeis.org

487, 4, 1, 1, 46, 1, 0, 1, 11, 1, 2, 1, 0, 2
Offset: 1

Views

Author

Jonathan Sondow, Jun 17 2010

Keywords

Comments

a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p = A174422(n) is the first Wieferich prime base prime(n).
a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p is the first prime such that p^2 divides prime(n)^(p-1) - 1.
See references and additional comments, links, and cross-refs in A001220 and A039951.
a(15) > 2451011, a(16) = 1, a(17) = 4, a(18) = 1, a(19) = 5, a(20) = 2, a(21) = 0, a(22) = 6, a(23) = 1186, a(24) = 0, a(25) = 0, a(26) = 1, a(27) > 10^5, a(28) = 0, a(29) = 1, a(30) = 0, a(31) = 1, a(32) = 7, a(33) = 0, a(35) = 1, a(36) = 4, a(37) = 1, a(38) = 0, a(40) = 1, a(41) = 2, a(42) = 1, a(43) = 2, a(44) = 0, a(45) = 1, a(46) = 2, a(48) = 30, a(49) = 3, a(50) = 1. - J.W.L. (Jan) Eerland, Sep 27 2024

Examples

			Prime(2) = 3 and the first prime p that divides (3^(p-1) - 1)/p is 11, so a(2) = (3^10 - 1)/11^2 mod 11 = 488 mod 11 = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[If[IntegerQ[s[[2]]],s,{s[[1]], "no solution in range 1 <= k <= 10^5"}], {s,Table[k = 1;Monitor[Parallelize[While[k <= 10^5,If[IntegerQ[((Prime[n]^(Prime[k] - 1) - 1)/Prime[k])/Prime[k]],Break[]]; k++];{n, Mod[(Prime[n]^(Prime[k] - 1) - 1)/Prime[k]^2, Prime[k]]}],k], {n, 1, 10}]}] (* J.W.L. (Jan) Eerland, Sep 27 2024 *)

Formula

a(n) = k mod 2, if prime(n) = 4k+1.
a(n) = A178814(prime(n)) .
a(1) = A178812(1).

A269111 a(n) = length of the repeating part of row n of A288097.

Original entry on oeis.org

2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Felix Fröhlich, Feb 19 2016

Keywords

Comments

a(n) + A268479(n) = total number of different terms in the trajectory of p.
a(15) is unknown, since there is no known Wieferich prime in base 47 (cf. Fischer link).
Obviously, a(n) != 1 for all n.
Period length of the repeating part of prime(n)-th row of A281001. - Felix Fröhlich, Jan 14 2017

Examples

			The trajectory of 31 starts 31, 7, 5, 2, 1093, 2, 1093, 2, 1093,  ...., entering a repeating cycle of length 2, so a(11) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@ DeleteCases[Values@ PositionIndex@ NestList[Function[n, Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]], Prime@ n, 12], ?(Length@ # == 1 &)], {n, 12}] (* _Michael De Vlieger, Jun 06 2017, Version 10 *)
  • PARI
    a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
    trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a039951(v[#v]))); v
    a(n) = my(p=prime(n), i=0, len=2, t=trajectory(p, len), k=#t); while(1, while(k > 1, k--; if(t[k]==t[#t], return(#t-k))); len++; t=trajectory(p, len); k=#t) \\ Felix Fröhlich, Jan 14 2017

Extensions

Definition simplified by Felix Fröhlich, Jun 05 2017

A270776 Smallest non-Wieferich prime to base n, i.e., smallest prime p such that n^(p-1) != 1 (mod p^2).

Original entry on oeis.org

2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2
Offset: 2

Views

Author

Felix Fröhlich, Mar 22 2016

Keywords

Comments

A256236 gives the smallest i such that a(i) = A000040(n).
a(n) > 2 iff A039951(n) = 2.
a(n) > 3 iff A268352(n) = 3.
Does every prime appear in the sequence?
It is easy to see that the answer to the previous question is "yes" if and only if A256236 is infinite.
The ABC-(k, Epsilon) conjecture with k >= 2 and Epsilon > 0 such that 1/(1/Epsilon + 1) + 1/k <= log(2)/(24*log(a)) implies that a(n) exists for all n (cf. Broughan, 2006; theorem 5.6).

Examples

			The sequence of base-17 Wieferich primes (A128668) starts 2, 3, 46021. Thus the smallest non-Wieferich prime to base 17 is 5 and hence a(17) = 5.
		

Crossrefs

Programs

  • Mathematica
    A270776[n_] := NestWhile[#+1 &, 2, CompositeQ[#] || PowerMod[n, #-1, #^2] == 1 &];
    Array[A270776, 100, 2] (* Paolo Xausa, Aug 15 2025 *)
  • PARI
    a(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)!=1, return(p)))

A278611 Bases b > 1 that set a new record for the size of the smallest base-b Wieferich prime.

Original entry on oeis.org

2, 6, 34
Offset: 1

Views

Author

Felix Fröhlich, Nov 23 2016

Keywords

Comments

Numbers n such that A039951(n) reaches a new record value.
a(1) = 2. Thereafter smallest number x that occurs later in column 1 of A244249 than any y with 1 < y < x.
Let b(n) be the sequence of corresponding smallest Wieferich primes. b(1)-b(3) are 1093, 66161 and 46145917691, respectively (cf. A307220).
No term is a perfect power, since then its smallest Wieferich prime is at most the size of the smallest Wieferich prime of the base that is raised to a power.
a(4) is either 47, 72 or 139, depending on which of those bases is the smallest where any Wieferich prime exists. The smallest base-139 Wieferich prime is 1822333408543 and any Wieferich primes in bases 47 and 72 are larger than 1.07*10^14 (cf. Fischer).

Examples

			a(2) = 6, since the smallest base-6 Wieferich prime is 66161 and that prime is the second term with a record value in A039951.
		

Crossrefs

Programs

  • PARI
    smallest_w_prime(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
    my(r=0, b=2); while(1, if(smallest_w_prime(b) > r, print1(b, ", "); r=smallest_w_prime(b)); b++)

A288097 Square array read by antidiagonals downwards: A(n, 1) = smallest base-prime(n) Wieferich prime and A(n, k) = smallest base-A(n, k-1) Wieferich prime for k > 1.

Original entry on oeis.org

1093, 2, 11, 1093, 71, 2, 2, 3, 1093, 5, 1093, 11, 2, 2, 71, 2, 71, 1093, 1093, 3, 2, 1093, 3, 2, 2, 11, 1093, 2, 2, 11, 1093, 1093, 71, 2, 1093, 3, 1093, 71, 2, 2, 3, 1093, 2, 11, 13, 2, 3, 1093, 1093, 11, 2, 1093, 71, 2, 2, 1093, 11, 2, 2, 71, 1093, 2, 3, 1093, 1093, 7
Offset: 1

Views

Author

Felix Fröhlich, Jun 05 2017

Keywords

Examples

			Array starts
1093,    2, 1093,    2, 1093,    2, 1093,    2, 1093,    2
  11,   71,    3,   11,   71,    3,   11,   71,    3,   11
   2, 1093,    2, 1093,    2, 1093,    2, 1093,    2, 1093
   5,    2, 1093,    2, 1093,    2, 1093,    2, 1093,    2
  71,    3,   11,   71,    3,   11,   71,    3,   11,   71
   2, 1093,    2, 1093,    2, 1093,    2, 1093,    2, 1093
   2, 1093,    2, 1093,    2, 1093,    2, 1093,    2, 1093
   3,   11,   71,    3,   11,   71,    3,   11,   71,    3
  13,    2, 1093,    2, 1093,    2, 1093,    2, 1093,    2
   2, 1093,    2, 1093,    2, 1093,    2, 1093,    2, 1093
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]; T[n_, k_] := T[n, k] = If[k == 1, f@ Prime@ n, f@ T[n, k - 1]]; Table[Function[n, T[n, k]][m - k + 1], {m, 12}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Jun 06 2017 *)
  • PARI
    a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
    table(rows, cols) = forprime(p=1, prime(rows), my(i=0, w=a039951(p)); while(i < cols, print1(w, ", "); w=a039951(w); i++); print(""))
    table(10, 10) \\ print initial 10 rows and 10 columns of table

Extensions

More terms from Michael De Vlieger, Jun 06 2017

A331424 Prime numbers p such that p^2 divides 31^(p-1) - 1.

Original entry on oeis.org

7, 79, 6451, 2806861
Offset: 1

Views

Author

Seiichi Manyama, Jan 16 2020

Keywords

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 233.

Crossrefs

Wieferich primes to base b: A001220 (b=2), A014127 (b=3), A123692 (b=5), A123693 (b=7), A128667 (b=13), A128668 (b=17), A090968 (b=19), A128669 (b=23), this sequence (b=31), A331426 (b=37), A331427 (b=41).
Cf. A039951.

Programs

  • Mathematica
    Select[Range[3*10^6], PrimeQ[#] && PowerMod[31, # - 1, #^2] == 1 &] (* Amiram Eldar, May 05 2021 *)
  • PARI
    forprime(p=2, 1e8, if(Mod(31, p^2)^(p-1)==1, print1(p", ")))

A331426 Prime numbers p such that p^2 divides 37^(p-1) - 1.

Original entry on oeis.org

2, 3, 77867, 76407520781
Offset: 1

Views

Author

Seiichi Manyama, Jan 16 2020

Keywords

Comments

a(4) from Fischer link. - M. F. Hasler, Jan 16 2020

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 233.

Crossrefs

Wieferich primes to base b: A001220 (b=2), A014127 (b=3), A123692 (b=5), A123693 (b=7), A128667 (b=13), A128668 (b=17), A090968 (b=19), A128669 (b=23), A331424 (b=31), this sequence (b=37), A331427 (b=41).
Cf. A039951.

Programs

  • Mathematica
    Select[Range[10^5], PrimeQ[#] && PowerMod[37, # - 1, #^2] == 1 &] (* Amiram Eldar, May 05 2021 *)
  • PARI
    forprime(p=2, 1e8, if(Mod(37, p^2)^(p-1)==1, print1(p", ")))

A331427 Prime numbers p such that p^2 divides 41^(p-1) - 1.

Original entry on oeis.org

2, 29, 1025273, 138200401
Offset: 1

Views

Author

Seiichi Manyama, Jan 16 2020

Keywords

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 233.

Crossrefs

Wieferich primes to base b: A001220 (b=2), A014127 (b=3), A123692 (b=5), A123693 (b=7), A128667 (b=13), A128668 (b=17), A090968 (b=19), A128669 (b=23), A331424 (b=31), A331426 (b=37), this sequence (b=41).
Cf. A039951.

Programs

  • Mathematica
    Select[Range[1.1*10^6], PrimeQ[#] && PowerMod[41, # - 1, #^2] == 1 &] (* Amiram Eldar, May 05 2021 *)
  • PARI
    forprime(p=2, 1e8, if(Mod(41, p^2)^(p-1)==1, print1(p", ")))
Previous Showing 21-30 of 39 results. Next