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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079115 Least k such that n+k is squarefree and coprime to n. 2
1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 5, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 4, 5, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 1, 1, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) = A079114(n) - n.

LINKS

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

EXAMPLE

From Michael De Vlieger, Nov 23 2017: (Start)

First positions of values in a(n):

        n   a(n)

  --------------

        1     1

        3     2

        7     3

       47     4

       24     5

     1679     6

      120     7

      843     8

     2522     9

    72471    10

      840    11

    64050    13

  1674274    15

   404580    17

  2042040    19

(End)

MATHEMATICA

Table[Block[{k = 1}, While[Nand[SquareFreeQ[n + k], CoprimeQ[n, n + k]], k++]; k], {n, 105}] (* Michael De Vlieger, Nov 23 2017 *)

PROG

(PARI) A079115(n) = { my(k=1); while((!issquarefree(n+k))||(gcd(n, n+k)>1), k++); k; } \\ Antti Karttunen, Nov 23 2017

CROSSREFS

Cf. A005117, A079114.

Sequence in context: A238016 A185812 A152798 * A072906 A239062 A201160

Adjacent sequences:  A079112 A079113 A079114 * A079116 A079117 A079118

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Dec 25 2002

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 March 25 10:23 EDT 2019. Contains 321470 sequences. (Running on oeis4.)