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-2 of 2 results.

A085118 Primes together with twice the odd primes.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 14, 17, 19, 22, 23, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 53, 58, 59, 61, 62, 67, 71, 73, 74, 79, 82, 83, 86, 89, 94, 97, 101, 103, 106, 107, 109, 113, 118, 122, 127, 131, 134, 137, 139, 142, 146, 149, 151, 157, 158, 163, 166, 167, 173, 178
Offset: 1

Views

Author

Leroy Quet, Apr 25 2004

Keywords

Comments

Probably the same sequence as: numbers n such that phi(n)+1 divides n.
Cohen and Segal showed that in case there were other solutions to this problem (which appeared to be posed by Schinzel), then they should have at least 15 distinct prime factors. Moreover, there is a connection with the Lehmer's totient problem which asks whether there is a composite n such that phi(n)|(n-1). If no such composite exists, then p and 2p are the only members for Leroy's sequence. - Francisco Salinas (franciscodesalinas(AT)hotmail.com), Apr 25 2004

Crossrefs

Equals A001751\{4}.

Programs

  • Mathematica
    With[{nn=40},Take[Sort[Join[Prime[Range[2nn]],2Prime[Range[2,nn]]]],2nn]] (* Harvey P. Dale, Oct 03 2013 *)
  • Python
    from sympy import primepi
    def A085118(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-primepi(x)-primepi(x>>1)+(x>=4))
        return bisection(f,n,n) # Chai Wah Wu, Oct 17 2024

Extensions

More terms from David Wasserman, Jan 27 2005

A055164 (n - phi(n)) | sigma(n) for composite n not congruent to 2 (mod 4).

Original entry on oeis.org

99, 168, 187, 493, 637, 780, 943, 1273, 1537, 1836, 2183, 2225, 2976, 3103, 3589, 4183, 5353, 5928, 6201, 6468, 6667, 8881, 9553, 9727, 13393, 13888, 14453, 15397, 17587, 19897, 24253, 24883, 30883, 33667, 36259, 36853, 37523, 43657, 45901
Offset: 1

Views

Author

Robert G. Wilson v, Jun 30 2000

Keywords

Comments

Let p be an odd prime. If d > p+1 is a divisor of p^2 - p - 2 such that d+1-p is prime, then p*(d+1-p) is in the sequence. - Robert Israel, May 03 2019

Crossrefs

Programs

  • Maple
    filter:= proc(n) uses numtheory;
      if isprime(n) then return false fi;
      type(sigma(n)/(n-phi(n)), integer)
    end proc:
    select(filter, [seq(seq(4*i+j,j=[0,1,3]),i=1..20000)]); # Robert Israel, May 03 2019
  • Mathematica
    Do[ If[ !PrimeQ[ n ], If[ Mod[ n, 4 ] != 2, If[ Mod[ DivisorSigma[ 1, n ], n-EulerPhi[ n ] ] == 0, Print[ n ] ] ] ], {n, 2, 50000} ]
  • Sage
    [n for n in (1..50000) if not mod(n, 4)==2 and not is_prime(n) and mod(sigma(n), n - euler_phi(n))==0] # G. C. Greubel, May 03 2019
Showing 1-2 of 2 results.