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.

A339531 Numbers b > 1 such that the smallest two primes, i.e., 2 and 3 are base-b Wieferich primes.

Original entry on oeis.org

17, 37, 53, 73, 89, 109, 125, 145, 161, 181, 197, 217, 233, 253, 269, 289, 305, 325, 341, 361, 377, 397, 413, 433, 449, 469, 485, 505, 521, 541, 557, 577, 593, 613, 629, 649, 665, 685, 701, 721, 737, 757, 773, 793, 809, 829, 845, 865, 881, 901, 917, 937, 953
Offset: 1

Views

Author

Felix Fröhlich, Dec 08 2020

Keywords

Crossrefs

Cf. A256236, A263941. Row 1 of A319059.
Cf. smallest k primes are base-b Wieferich primes: A339532 (k=3), A339533 (k=4), A339534 (k=5), A339535 (k=6), A339536 (k=7), A339537 (k=8).

Programs

  • Mathematica
    Select[Range[2, 10^3], Function[b, AllTrue[{2, 3}, PowerMod[b, (# - 1), #^2] == 1 &]]] (* Michael De Vlieger, Dec 10 2020 *)
  • PARI
    is(n) = forprime(p=1, 3, if(Mod(n, p^2)^(p-1)!=1, return(0))); 1

Formula

a(n) = 4*A263941(n) + 1 for n>=2, a(n) = 4*floor((9*n)/2) + 1 for all n. - Hugo Pfoertner, Dec 08 2020
From Chai Wah Wu, Aug 18 2025: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
G.f.: x*(-x^2 + 20*x + 17)/((x - 1)^2*(x + 1)). (End)