login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285719 a(1) = 1, and for n > 1, a(n) = the largest squarefree number k such that n-k is also squarefree. 4

%I #27 Apr 27 2023 15:15:35

%S 1,1,2,3,3,5,6,7,7,7,10,11,11,13,14,15,15,17,17,19,19,21,22,23,23,23,

%T 26,26,26,29,30,31,31,33,34,35,35,37,38,39,39,41,42,43,43,43,46,47,47,

%U 47,46,51,51,53,53,55,55,57,58,59,59,61,62,62,62,65,66,67,67,69,70,71,71,73,74,74,74,77,78,79,79,79,82,83,83,85,86,87,87,89,89,91,91

%N a(1) = 1, and for n > 1, a(n) = the largest squarefree number k such that n-k is also squarefree.

%C For any n > 1 there is at least one decomposition of n as a sum of two squarefree numbers (cf. A071068 and the Mathematics Stack Exchange 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.

%C Note: a(n+1) differs from A070321(n) for the first time at n=50, with a(51) = 46, while A070321(50) = 47.

%H Antti Karttunen, <a href="/A285719/b285719.txt">Table of n, a(n) for n = 1..10000</a>

%H Mathematics Stack Exchange, <a href="https://math.stackexchange.com/questions/20564/sums-of-square-free-numbers-is-this-conjecture-equivalent-to-goldbachs-conjec">Sums of square free numbers, is this conjecture equivalent to Goldbach's conjecture?</a> (See especially the answer of Aryabhata)

%H K. Rogers, <a href="http://dx.doi.org/10.1090/S0002-9939-1964-0163893-X">The Schnirelmann density of the squarefree integers</a>, Proc. Amer. Math. Soc. 15 (1964), pp. 515-516.

%F a(n) = n - A285718(n).

%e 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) = 46.

%t lsfn[n_]:=Module[{k=n-1},While[!SquareFreeQ[k]||!SquareFreeQ[n-k],k--];k]; Join[{1},Array[ lsfn,100,2]] (* _Harvey P. Dale_, Apr 27 2023 *)

%o (Scheme)

%o (define (A285719 n) (- n (A285718 n)))

%o (define (A285719 n) (if (= 1 n) n (let loop ((k (A013928 n))) (if (not (zero? (A008683 (- n (A005117 k))))) (A005117 k) (loop (- k 1))))))

%o (Python)

%o from sympy.ntheory.factor_ import core

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

%o def a285718(n):

%o if n==1: return 0

%o x = 1

%o while True:

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

%o else: x+=1

%o def a285719(n): return n - a285718(n)

%o print([a285719(n) for n in range(1, 121)]) # _Indranil Ghosh_, May 02 2017

%Y Cf. A005117, A008683, A013928, A013929, A070321, A071068, A285718, A285735.

%K nonn

%O 1,3

%A _Antti Karttunen_, May 02 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)