%I #8 Dec 03 2019 14:18:28
%S 289,341,561,1105,1369,1387,1729,2465,2821,4097,5365,6179,6601,8911,
%T 9105,9537,10585,12673,14433,14531,15457,15841,28033,29341,33901,
%U 41041,41905,42141,46657,48705,52633,52741,62745,63253,63973,75361,80185,82621,99937
%N Composite numbers n such that E(n+1)+1 is divisible by n, where E(n) is the n-th Euler number (A122045).
%C Kummer proved in 1851 that E(2k + p - 1) == E(2k) (mod p) for k > 0 and all odd primes p. This sequence consists of composite numbers for which the congruence, with k=1, also holds. In terms of A000364, the sequence consists of composite odd numbers n that divide A000364((n + 1)/2) + (-1)^((n + 1)/2).
%D Jozsef Sandor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 5, p. 556.
%H Leonard Carlitz, <a href="http://dx.doi.org/10.1215/S0012-7094-55-02220-1">Congruences for generalized Bell and Stirling numbers</a>, Duke Mathematical Journal, Vol. 22, No. 2 (1955), pp. 193-205.
%H Ernst Eduard Kummer, <a href="http://eudml.org/doc/147490">Über eine allgemeine Eigenschaft der rationalen Entwickelungscoefficienten einer bestimmten Gattung analytischer Functionen</a>, Journal für die reine und angewandte Mathematik, Vol. 41 (1851), pp. 368-372.
%H Samuel S. Wagstaff, Jr., <a href="https://homes.cerias.purdue.edu/~ssw/bernoulli/full.pdf">Prime divisors of the Bernoulli and Euler numbers</a>, Number Theory for the Millenium III (Urbana, IL, 2000), AK Peters, Natick, MA, 2002, pp. 357-374.
%t a={}; For[n = 1, n < 100000, n++; If[!PrimeQ[n] && Divisible[EulerE[n + 1] + 1, n], a=AppendTo[a,n]]];a
%t Select[Range[100000],CompositeQ[#]&&Divisible[EulerE[#+1]+1,#]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 03 2019 *)
%o (PARI) e(n) = 2^n*2^(n+1)*(subst(bernpol(n+1, x), x, 3/4) - subst(bernpol(n+1, x), x, 1/4))/(n+1);
%o isok(n) = (((e(n+1)+1) % n) == 0);
%o lista(nn) = forcomposite(n=1, nn, if (isok(n), print1(n, ", "))); \\ _Michel Marcus_, Jun 10 2017
%Y Cf. A000364, A035163, A081730, A122045, A180942.
%K nonn
%O 1,1
%A _Amiram Eldar_, Jun 03 2017