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.

Showing 1-4 of 4 results.

A014117 Numbers n such that m^(n+1) == m (mod n) holds for all m.

Original entry on oeis.org

1, 2, 6, 42, 1806
Offset: 1

Views

Author

Keywords

Comments

"Somebody incorrectly remembered Fermat's little theorem as saying that the congruence a^{n+1} = a (mod n) holds for all a if n is prime" (Zagier). The sequence gives the set of integers n for which this property is in fact true.
If i == j (mod n), then m^i == m^j (mod n) for all m. The latter congruence generally holds for any (m, n)=1 with i == j (mod k), k being the order of m modulo n, i.e., the least power k for which m^k == 1 (mod n). - Lekraj Beedassy, Jul 04 2002
Also, numbers n such that n divides denominator of the n-th Bernoulli number B(n) (cf. A106741). Also, numbers n such that 1^n + 2^n + 3^n + ... + n^n == 1 (mod n). Equivalently, numbers n such that B(n)*n == 1 (mod n). Equivalently, Sum_{prime p, (p-1) divides n} n/p == -1 (mod n). It is easy to see that for n > 1, n must be an even squarefree number. Moreover, the set P of prime divisors of all such n satisfies the property: if p is in P, then p-1 is the product of distinct elements of P. This set is P = {2, 3, 7, 43}, implying that the sequence is finite and complete. - Max Alekseyev, Aug 25 2013
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
Squarefree numbers n such that b^n == 1 (mod n^2) for every b coprime to n. Squarefree terms of A341858. - Thomas Ordowski, Aug 05 2024
Conjecture: Numbers n such that gcd(d+1, n) > 1 for every proper divisor d of n. Verified up to 10^696. - David Radcliffe, May 29 2025

Crossrefs

Squarefree terms of A124240. - Robert Israel and Thomas Ordowski, Jun 23 2017

Programs

  • Mathematica
    r[n_] := Reduce[ Mod[m^(n+1) - m, n] == 0, m, Integers]; ok[n_] := Range[n]-1 === Simplify[ Mod[ Flatten[ m /. {ToRules[ r[n][[2]] ]}], n], Element[C[1], Integers]]; ok[1] = True; A014117 = {}; Do[ If[ok[n], Print[n]; AppendTo[ A014117, n] ], {n, 1, 2000}] (* Jean-François Alcover, Dec 21 2011 *)
    Select[Range@ 2000, Function[n, Times @@ Boole@ Map[Function[m, PowerMod[m, n + 1, n] == Mod[m, n]], Range@ n] > 0]] (* Michael De Vlieger, Dec 30 2016 *)
  • Python
    [n for n in range(1, 2000) if all(pow(m, n+1, n) == m for m in range(n))] # David Radcliffe, May 29 2025

Formula

For n <= 5, a(n) = a(n-1)^2 + a(n-1) with a(0) = 1. - Raphie Frank, Nov 12 2012
a(n+1) = A007018(n) = A054377(n) = A100016(n) for n = 1, 2, 3, 4. - Jonathan Sondow, Oct 01 2013

A281662 (Denominator of Bernoulli(2*n)) read mod n.

Original entry on oeis.org

0, 0, 0, 2, 1, 0, 6, 6, 6, 0, 6, 6, 6, 2, 12, 14, 6, 12, 6, 10, 0, 8, 6, 18, 16, 4, 15, 2, 6, 0, 6, 30, 9, 30, 31, 30, 6, 30, 3, 10, 6, 0, 6, 30, 3, 30, 6, 42, 6, 30, 42, 30, 6, 30, 33, 6, 42, 30, 6, 30, 6, 30, 42, 62, 1, 24, 6, 30, 42, 50, 6, 6, 6, 30, 72, 30, 61
Offset: 1

Views

Author

Seiichi Manyama, Jan 26 2017

Keywords

Comments

Odd terms at: 5, 27, 33, 35, 39, 45, 55, 65, 77, 81, 99, 105, 121, etc. - Robert G. Wilson v, Jan 26 2017

Crossrefs

Programs

  • Mathematica
    f[n_] := Mod[Denominator[BernoulliB[2 n]], n]; Array[f, 77] (* Robert G. Wilson v, Jan 26 2017 *)
  • PARI
    a(n) = denominator(bernfrac(2*n)) % n; \\ Michel Marcus, Jan 29 2017
  • Ruby
    def bernoulli(n)
      ary = []
      a = []
      (0..n).each{|i|
        a << 1r / (i + 1)
        i.downto(1){|j| a[j - 1] = j * (a[j - 1] - a[j])}
        ary << a[0]
      }
      ary
    end
    def A281662(n)
      a = bernoulli(2 * n)
      (1..n).map{|i| a[2 * i].denominator % i}
    end
    

Formula

a(n) = A002445(n) mod n.

A099008 Numbers n such that the denominator of the 2n-th Bernoulli number is divisible by n but sum_{d|n} sigma(d)/phi(d) is not an integer.

Original entry on oeis.org

546, 903, 1806, 2730, 6162, 6510, 9030, 10230, 12090, 12246, 12810, 15834, 20130, 20670, 23478, 23790, 28938, 30030, 30810, 43134, 44310, 52374, 56730, 61230, 71610, 79170, 84630, 85722, 88410, 99330, 109230, 117390, 132990, 140910, 144690, 154770, 164010
Offset: 1

Views

Author

Benoit Cloitre, Nov 07 2004

Keywords

Comments

Intersection of A106741 and complement of A068991. - Michel Marcus, Dec 07 2013

Examples

			The denominator of the 1806th Bernoulli number is 1806 and Sum_{d|1806} sigma(d)/phi(d) = 172/3 is not an integer.
		

Crossrefs

Cf. A068991.

Programs

  • PARI
    lista() = {v = readvec("b106741.txt"); for (i=1, #v, vi = v[i]; if (denominator(sumdiv(vi, d, sigma(d)/eulerphi(d))) != 1, print1(vi, ", ")));} \\ Michel Marcus, Dec 07 2013

Extensions

Extended using b-file from A106741 by Michel Marcus, Dec 07 2013

A212197 Numbers k that divide the 3k-th Clausen number.

Original entry on oeis.org

1, 2, 6, 14, 42, 114, 602, 798, 1806, 5334, 34314, 101346, 229362, 4357878, 9786714, 12198858, 168241542, 185947566, 231778302, 524550894
Offset: 1

Views

Author

Peter Luschny, May 05 2012

Keywords

Comments

The classical Clausen numbers are given in A141056. See A160014 for generalizations. Related sequences are A014117 and A106741.

Crossrefs

Programs

  • Mathematica
    (* This program is not convenient for more than 15 terms *) c[n_] := Sum[Boole[PrimeQ[d+1]]/(d+1), {d, Divisors[n]}] // Denominator; Reap[For[n = 1, n < 10^7, n++, If[Divisible[c[3*n], n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, May 21 2013 *)
  • PARI
    A212197_list(searchlimit) =
    {
        for (n=1, searchlimit,
            p = 1;
            fordiv(3*n, d,
                r = d + 1;
                if (isprime(r), p = p*r;)
            );
            if (Mod(p, n) == 0, print1(n, ", "));
        );
    }
Showing 1-4 of 4 results.