A180942 Odd composite numbers m for which A000111(m) == (-1)^( (m-1)/2 ) (mod m).
91, 561, 781, 1105, 1661, 1729, 2465, 2737, 2821, 6601, 8911, 10585, 15841, 29341, 30433, 41041, 46657, 52633, 62745, 63973, 75361, 90241, 101101, 115921, 126217, 136371, 136741, 137149, 162401, 172081, 176565, 188461, 251251, 252601, 278545, 294409, 314821, 334153
Offset: 1
Keywords
Links
- Vladimir Shevelev, The number of permutations with prescribed up-down structure as a function of two variables, INTEGERS 12 (2012), article #A1. - From _N. J. A. Sloane_, Feb 07 2013
Crossrefs
Cf. A000111.
Programs
-
Mathematica
fQ[n_] := ! PrimeQ@n && Mod[ (-1)^((n - 1)/2)*2^(n + 1)*(2^(n + 1) - 1)*BernoulliB[n + 1]/(n + 1), n] == Mod[(-1)^((n - 1)/2), n]; k = 3; lst = {}; While[k < 50000, If[ fQ@k, AppendTo[lst, k]; Print@k]; k += 2]; lst (* Robert G. Wilson v, Sep 29 2010 *)
-
Python
from itertools import count, islice, accumulate from sympy import isprime def A180942_gen(): # generator of terms blist = (0,1) for n in count(2): blist = tuple(accumulate(reversed(blist),initial=0)) if n & 1 and (blist[-1] + (1 if (n-1)//2 & 1 else -1)) % n == 0 and not isprime(n): yield n A180942_list = list(islice(A180942_gen(),5)) # Chai Wah Wu, Jun 09-11 2022
Extensions
Extended to a(13) by D. S. McNeil, Sep 01 2010
Comments rephrased by R. J. Mathar, Sep 29 2010
a(14)-a(17) from Robert G. Wilson v, Sep 29 2010
a(18)-a(38) from Amiram Eldar, Dec 28 2019
Comments