login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058665 a(n) = GCD(n+1,n-Phi(n)). 1
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = GCD(n+1, cototient(n)) = GCD(n+1, A051953(n)).

EXAMPLE

n = 247 = 13*19, n+1 = 248 = 8*31, Phi(247) = 12*18 = 216, cototient(247) = 247-216 = 31, so a(247) = GCD(248,31) = 31; For most n's, among others for primes a(n) = 1.

MATHEMATICA

Table[GCD[n+1, n-EulerPhi[n]], {n, 0, 110}] (* Harvey P. Dale, Dec 24 2012 *)

PROG

(PARI) A058665(n) = gcd(n+1, n-eulerphi(n)); \\ Antti Karttunen, Jul 28 2017

(Python)

from sympy import gcd, totient

def a(n): return gcd(n + 1, n - totient(n))

print map(a, xrange(1, 151)) # Indranil Ghosh, Jul 29 2017

CROSSREFS

Cf. A000010, A051953, A009195.

Sequence in context: A318829 A113515 A103754 * A290105 A191898 A043290

Adjacent sequences:  A058662 A058663 A058664 * A058666 A058667 A058668

KEYWORD

nonn

AUTHOR

Labos Elemer, Dec 28 2000

EXTENSIONS

Offset corrected by Antti Karttunen, Jul 28 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 14:49 EDT 2019. Contains 323532 sequences. (Running on oeis4.)