login
Values of n such that the perfect deficiency (A109883) of n and n+1 are both squares.
1

%I #17 Dec 28 2018 02:48:32

%S 1,4,5,16,37,256,65536,80656,3459600,166926400

%N Values of n such that the perfect deficiency (A109883) of n and n+1 are both squares.

%C Conjecture: sequence is infinite.

%C No more terms below 10^9. - _Amiram Eldar_, Dec 27 2018

%e A109883(37)=36 & A109883(38)=16, both of which are squares, so 37 is a term.

%t subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n]; a = False; Do[b = IntegerQ[ Sqrt[ f[ n]]]; If[{a, b} == {True, True}, Print[n - 1]]; a = b, {n, 10^7}] (* _Robert G. Wilson v_, Jul 21 2005 *)

%o (PARI) a109883(n) = {my(r = n); fordiv(n, d, if (r < d, return (r)); r -= d;); 0;}

%o isok(n) = issquare(a109883(n)) && issquare(a109883(n+1)); \\ _Michel Marcus_, Dec 28 2018

%Y Cf. A110277.

%K more,nonn

%O 1,2

%A _Jason Earls_, Jul 18 2005

%E a(10) from _Amiram Eldar_, Dec 27 2018