Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
Numbers that are the sum of two successive squarefree numbers.
2

%I #35 Oct 09 2018 16:32:44

%S 3,5,8,11,13,17,21,24,27,29,32,36,40,43,45,49,55,59,61,64,67,69,72,75,

%T 77,80,83,85,89,93,98,104,108,112,115,117,120,123,127,131,133,136,139,

%U 141,144,147,151,155,157,161,165,168,171,173,176,180,184,187,189,192,198,203

%N Numbers that are the sum of two successive squarefree numbers.

%H Robert Israel, <a href="/A240603/b240603.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A005117(n) + A005117(n+1).

%e 3 + 5 = 8, so 8 is in the sequence.

%e 5 + 6 = 11, so 11 is in the sequence.

%e Although 12 can be expressed as a sum of two squarefree numbers, none of those sums (1 + 11, 2 + 10, 5 + 7, 6 + 6) involve successive squarefree numbers. Therefore 12 is not in the sequence.

%p N:= 1000; # to get entries up to approximately 2*N

%p SF:= select(numtheory:-issqrfree,[$1..N]):

%p seq(SF[i]+SF[i+1],i=1..nops(SF)-1); # _Robert Israel_, Jun 08 2014

%t Abs[Differences[Select[Range[100], MoebiusMu[#] != 0 &] * (-1)^Range[61]]] (* _Alonso del Arte_, Jun 08 2014 *)

%t Total/@Partition[Select[Range[200],SquareFreeQ],2,1] (* _Harvey P. Dale_, Oct 09 2018 *)

%o (PARI) lista(nn) = {v = vector(nn, i, i); vsqf = select(n->issquarefree(n), v); for (i=1, #vsqf-1, print1(vsqf[i] + vsqf[i+1], ", "););} \\ _Michel Marcus_, May 31 2014

%Y Cf. A001043, A005117.

%K nonn,easy

%O 1,1

%A _Juri-Stepan Gerasimov_, May 30 2014