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.

User: David Morales Marciel

David Morales Marciel's wiki page.

David Morales Marciel has authored 2 sequences.

A257886 Least positive m such that floor(n! / (2*(floor(n/2)!))) + m is prime.

Original entry on oeis.org

2, 1, 2, 1, 1, 1, 1, 13, 1, 1, 29, 1, 1, 37, 29, 17, 31, 71, 71, 37, 23, 1, 37, 1, 41, 41, 31, 31, 59, 31, 41, 41, 41, 41, 41, 37, 41, 193, 83, 41, 53, 67, 149, 97, 59, 73, 113, 107, 137, 59, 137, 67, 101, 83, 73, 101, 241, 71, 73, 79, 83, 227, 199, 223, 127, 83, 83, 181, 227, 149, 103, 1, 587, 179, 229, 167, 127, 163, 109, 83
Offset: 1

Author

David Morales Marciel, May 11 2015

Keywords

Comments

Conjecture: No term is composite (similar conjecture to A033932 for a different expression).

Examples

			n = 1, floor(1! / (2*(floor(1/2)!)))=0, m = 2, and 0+2=2 is prime.
n = 2, floor(2! / (2*(floor(2/2)!)))=1, m = 1, and 1+1=2 is prime.
...
n = 15, floor(15! / (2*(floor(15/2)!)))=129729600, m = 29, and 129729600+29 = 129729629 is prime.
		

Crossrefs

Cf. A033932.

Programs

  • Mathematica
    lpm[n_]:=Module[{c=Floor[n!/(2Floor[n/2]!)]},NextPrime[c]-c]; Array[lpm,80] (* Harvey P. Dale, May 15 2018 *)
  • Python
    from sympy import factorial, nextprime
    [(nextprime(int(factorial(n)/(2*factorial(n//2)))))-int(factorial(n)/(2*factorial(n//2))) for n in range(1,10**5)]

Extensions

Edited. Wolfdieter Lang, Jun 08 2015

A256241 Numbers n whose Euler's totient function phi(n), divided by two, plus one, p = (phi(n) / 2) + 1, is a divisor of n.

Original entry on oeis.org

4, 6, 12, 15, 20, 21, 28, 30, 33, 39, 42, 44, 51, 52, 57, 66, 68, 69, 76, 78, 87, 92, 93, 102, 111, 114, 116, 123, 124, 129, 138, 141, 148, 159, 164, 172, 174, 177, 183, 186, 188, 201, 212, 213, 219, 222, 236, 237, 244, 246, 249, 258, 267, 268, 282, 284, 291, 292, 303, 309, 316, 318, 321, 327, 332, 339, 354, 356, 366
Offset: 1

Author

David Morales Marciel, Apr 19 2015

Keywords

Comments

p is always a prime factor of n as well.
Except for the case n=6, p is always the greatest prime factor of n.
(n/p) is an upper bound on the rest of the prime factors 'q' of n, so always q <= (n/p).

Examples

			For n = 4, phi(n) = 2, p = (phi(n)/2)+1 = 2, is prime and is a prime factor of 4.
For n = 6, phi(n) = 2, p = (phi(n)/2)+1 = 2, is prime and is a prime factor of 6.
		

Crossrefs

Cf. A000010.

Programs

  • Magma
    [k:k in [1..370]| IsIntegral(k/(EulerPhi(k)/2+1))]; // Marius A. Burtea, Nov 06 2019
  • Mathematica
    aQ[n_] := Divisible[n, 1 + EulerPhi[n] / 2]; Select[Range[400], aQ] (* Amiram Eldar, Nov 06 2019 *)
  • PARI
    isok(n) = (n % (eulerphi(n)/2+1)) == 0; \\ Michel Marcus, Apr 20 2015
    
  • Python
    from sympy import totient
    [n for n in range(1, 10**5) if n%((totient(n)/2)+1)==0]
    

Extensions

Removed long Python code, and added very simple Python program (two lines) with sympy as suggested by the Editor.