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.

A156787 Composite integers n such that 2^{n-1}=1 mod s(n), where s(n) is the sum of the distinct prime factors of n.

Original entry on oeis.org

9, 10, 25, 27, 40, 49, 81, 100, 105, 116, 121, 125, 160, 169, 243, 250, 289, 343, 361, 400, 525, 529, 561, 568, 625, 640, 729, 805, 841, 945, 961, 1000, 1001, 1018, 1045, 1105, 1309, 1331, 1369, 1596, 1600, 1681, 1729, 1849, 1856, 1881, 2001, 2187, 2197, 2205
Offset: 1

Views

Author

Florian Luca (fluca(AT)matmor.unam.mx), Feb 15 2009

Keywords

Examples

			For n=2, the second number is a(2)=10 because s(10)=2+5=7 divides 2^{10-1}-1=2^9-1=511.
		

Crossrefs

Cf. A006145.

Programs

  • Maple
    B := {}; for n from 2 to 1000 do A := (numtheory[factorset])(n); b := add(a, `in`(a, A)); if `and`(b < n, `mod`(2^(n-1), b) = 1) then B := [op(B), n] else end if end do; print(c := 2);
  • Mathematica
    Select[Range[2, 2300], CompositeQ[#] && PowerMod[2, #-1, Total[First /@ FactorInteger[#]]] == 1 &] (* Amiram Eldar, Nov 20 2019 *)
  • PARI
    is(n)=if(isprime(n),0,my(f=factor(n)[,1]);Mod(2, sum(i=1, #f, f[i]))^(n-1)==1) \\ Charles R Greathouse IV, Feb 01 2013

Formula

n log n << a(n) << n^(1+e) for any e > 0. See Luca & Tipu for more precise results. - Charles R Greathouse IV, Feb 01 2013

Extensions

More terms from Amiram Eldar, Nov 20 2019