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.

A125609 Smallest prime p such that 3^n divides p^2 - 1.

Original entry on oeis.org

2, 17, 53, 163, 487, 1459, 4373, 13121, 39367, 472391, 1062881, 1062881, 19131877, 19131877, 57395627, 86093443, 258280327, 3874204891, 6973568801, 6973568801, 188286357653, 188286357653, 188286357653, 4518872583697, 15251194969973
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Comments

Smallest prime of the form k*3^n-1 or k*3^n+1. - Robert Israel, Oct 27 2019

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

  • Maple
    f:= proc(n) local k;
          for k from 1 do
            if isprime(k*3^n-1) then return k*3^n-1
            elif isprime(k*3^n+1) then return k*3^n+1
            fi
          od
    end proc:
    map(f, [$1..30]); # Robert Israel, Oct 27 2019
  • Mathematica
    f[n_] := Module[{k}, For[k = 1, True, k++, If[PrimeQ[k*3^n-1], Return[k*3^n-1], If[PrimeQ[k*3^n+1], Return[k*3^n+1]]]]];
    Array[f, 30] (* Jean-François Alcover, Jun 04 2020, after Maple *)
  • PARI
    \\ See link.

Extensions

Corrected and extended by Ryan Propper, Jan 01 2007
More terms from Martin Fuller, Jan 11 2007