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!)
A371759 a(n) is the smallest n-gonal number that is a Fermat pseudoprime to base 2 (A001567), or -1 if no such number exists. 2
561, 1194649, 7957, 561, 23377, 341, 129889, 1105, 35333, 561, 204001, 31609, 2940337, 1105, 493697, 8481, 13981, 1905, 88561, 41665, 10680265, 1729, 107185, 264773, 449065, 6601, 2165801, 23001, 1141141, 13981, 272251, 4369, 17590957, 15841, 137149, 2821, 561 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
The corresponding indices of the n-gonal numbers are 33, 1093, 73, 17, 97, ... (A371760).
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number.
Eric Weisstein's World of Mathematics, Poulet Number.
Wikipedia, Polygonal number.
Wikipedia, Pseudoprime.
FORMULA
a(n) = ((n-2)*k^2 - (n-4)*k)/2, where k = A371760(n).
EXAMPLE
a(4) = A001220(1)^2 = 1093^2 = 1194649. The only known square base-2 pseudoprimes are the squares of the Wieferich primes (A001220).
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++]; p[k, n]]; Array[a, 50, 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++); p(k, n); }
CROSSREFS
Sequence in context: A097061 A290497 A258839 * A213867 A139089 A202562
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 May 17 06:15 EDT 2024. Contains 372579 sequences. (Running on oeis4.)