login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285718 a(1) = 0, and for n > 1, a(n) = the least squarefree number x such that n-x is also squarefree. 4
0, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 3, 5, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 3, 6, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

For any n > 1 there is at least one decomposition of n as a sum of two squarefree numbers (cf. A071068 and Math Stackexchange link). Of all pairs (x,y) of positive squarefree numbers for which x <= y and x+y = n, sequences A285718 and A285719 give the unique pair for which the difference y-x is the largest possible.

Question: Are there arbitrarily large terms in this sequence?

LINKS

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

Math Stackexchange, Sums of square free numbers, is this conjecture equivalent to Goldbach's conjecture? (See especially the answer of Aryabhata)

K. Rogers, The Schnirelmann density of the squarefree integers, Proc. Amer. Math. Soc. 15 (1964), pp. 515-516.

FORMULA

a(n) = n - A285719(n).

EXAMPLE

For n=51 we see that 50 (2*5*5), 49 (7*7) and 48 (2^4 * 3) are all nonsquarefree (A013929). 47 (a prime) is squarefree, but 51 - 47 = 4 is not. On the other hand, both 46 (2*23) and 5 are squarefree numbers, thus a(51) = 5.

MATHEMATICA

Table[If[n == 1, 0, x = 1; While[Nand[SquareFreeQ@ x, SquareFreeQ[n - x]], x++]; x], {n, 120}] (* Michael De Vlieger, May 03 2017 *)

PROG

(Scheme)

(define (A285718 n) (if (= 1 n) 0 (let loop ((k 1)) (if (not (zero? (A008683 (- n (A005117 k))))) (A005117 k) (loop (+ 1 k))))))

(Python)

from sympy.ntheory.factor_ import core

def issquarefree(n): return core(n) == n

def a285718(n):

    if n==1: return 0

    x = 1

    while True:

        if issquarefree(x) and issquarefree(n - x):return x

        else: x+=1

print([a285718(n) for n in range(1, 121)]) # Indranil Ghosh, May 02 2017

CROSSREFS

Cf. A005117, A008683, A013929, A071068, A285719, A285720, A285734.

Sequence in context: A340811 A340812 A228349 * A205792 A249739 A249740

Adjacent sequences:  A285715 A285716 A285717 * A285719 A285720 A285721

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 02 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 July 30 16:50 EDT 2021. Contains 346359 sequences. (Running on oeis4.)