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!)
A371760 a(n) is the smallest number k such that the k-th n-gonal number is a Fermat pseudoprime to base 2 (A001567), or -1 if no such number exists. 2
33, 1093, 73, 17, 97, 11, 193, 17, 89, 11, 193, 73, 673, 13, 257, 33, 41, 15, 97, 65, 1009, 13, 97, 149, 190, 23, 401, 41, 281, 31, 133, 17, 1033, 31, 89, 13, 6, 59, 241, 157, 1217, 91, 145, 37, 937, 29, 1289, 73, 97, 41, 617, 19, 137, 151, 34, 103, 8641, 47, 82 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
The corresponding pseudoprimes are in A371759.
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number.
Eric Weisstein's World of Mathematics, Poulet Number.
Wikipedia, Polygonal number.
Wikipedia, Pseudoprime.
MATHEMATICA
p[k_, n_] := ((n - 2)*k^2 - (n - 4)*k)/2; pspQ[n_] := CompositeQ[n] && PowerMod[2, n - 1, n] == 1; a[n_] := Module[{k = 2}, While[! pspQ[p[k, n]], k++]; k]; Array[a, 100, 3]
PROG
(PARI) p(k, n) = ((n-2)*k^2 - (n-4)*k)/2;
ispsp(n) = !isprime(n) && Mod(2, n)^(n-1) == 1;
a(n) = {my(k = 2); while(!ispsp(p(k, n)), k++); k; }
CROSSREFS
Sequence in context: A188989 A189199 A009977 * A293693 A187539 A130835
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 05 2024
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 1 03:10 EDT 2024. Contains 373008 sequences. (Running on oeis4.)