The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125609 Smallest prime p such that 3^n divides p^2 - 1. 22
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Smallest prime of the form k*3^n-1 or k*3^n+1. - Robert Israel, Oct 27 2019
LINKS
Martin Fuller, PARI program
W. Keller and J. Richstein, Fermat quotients that are divisible by p.
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 *)
PROG
For PARI program see link.
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.
Sequence in context: A192345 A212836 A338564 * A100518 A367032 A125200
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 28 2006
EXTENSIONS
Corrected and extended by Ryan Propper, Jan 01 2007
More terms from Martin Fuller, Jan 11 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 08:55 EDT 2024. Contains 373105 sequences. (Running on oeis4.)