cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A106741 Numbers n such that n divides the denominator of 2n-th Bernoulli number.

Original entry on oeis.org

1, 2, 3, 6, 10, 21, 30, 42, 78, 110, 210, 330, 390, 546, 903, 930, 1218, 1806, 1830, 2310, 2530, 2730, 4134, 4290, 6090, 6162, 6510, 7590, 9030, 10230, 12090, 12246, 12810, 14910, 15834, 20130, 20670, 22110, 23478, 23790, 28938, 30030, 30810, 43134
Offset: 1

Views

Author

Benoit Cloitre, May 15 2005

Keywords

Comments

Numbers n such that the congruence k^(2n+1) == k (mod n) is true for 1<=k<=n. - Michel Lagneau, May 02 2012
In 2005, B. C. Kellner proved E. W. Weisstein's conjecture that denom(B_n) = n only if n = 1806. - Jonathan Sondow, Oct 14 2013.

Crossrefs

Programs

  • Maple
    for n from 1 to 10000 do:
        m:=2*n+1: i:=1:
        for k from 1 to n while(k &^ m mod n =k) do: i:=i+1: od:
        if i=n then print(n) fi:
    od: # Michel Lagneau, May 02 2012
    A106741_list := proc(searchlimit) local isA106741, i;
    isA106741 := proc(n)
      numtheory[divisors](2*n);
      map(i->i+1,%);
      select(isprime,%);
      mul(i,i=%) mod n = 0;
      if % then n else NULL fi end:
    seq(isA106741(i),i=1..searchlimit) end:
    A106741_list(30000); # Peter Luschny, May 04 2012
  • Mathematica
    okQ[n_] := AllTrue[Range[n], PowerMod[#, 2n+1, n] == Mod[#, n]&];
    Reap[For[n = 1, n < 50000, n++, If[okQ[n], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jun 11 2019, after Michel Lagneau *)
  • PARI
    is_A106741(n)=denominator(bernfrac(2*n))%n==0 \\ Charles R Greathouse IV, May 02 2012
    
  • PARI
    { for (n=1, 10^6, m = 2*n + 1; for (k=2, n, if ( Mod(k,n)^m != k,  next(2) ); ); print1(n,", "); ); } /* Joerg Arndt, May 04 2012 */
    
  • PARI
    is_A106741(n)={ my(m=2*n+1); for(k=2, n, Mod(k, n)^m - k & return); 1} /* more than twice faster (in PARI 2.4.2) than with "if(...)" */ \\ M. F. Hasler, May 06 2012

Extensions

Terms a(19)-a(29) from Michel Lagneau, May 02 2012
Terms >= 10230 by Joerg Arndt, May 04 2012