%I #28 Jul 07 2021 08:20:21
%S 0,29,49,78,110,152,220,314,330,364,440,550,628,660,683,770,880,990,
%T 997,2207,5346,13064,30254,35422,37862,38006,65676,73805,143662,
%U 202196,933138,977909,3120796,3242189,3363582,3606368,3727761,3849154,3970547,4484776,4848955
%N Gilda's numbers: numbers k such that if a Fibonacci sequence is formed with first term = a certain absolute value between decimal digits in k (A007953) and second term = sum of decimal digits in k (A040997), then k itself occurs as a term in the sequence.
%C Is this sequence infinite?
%H Amiram Eldar, <a href="/A042947/b042947.txt">Table of n, a(n) for n = 1..632</a> (terms below 10^100)
%H Felice Russo, <a href="http://www.gallup.unm.edu/~smarandache/Felice-Russo-book1.pdf">A Set of New Smarandache Functions, Sequences and Conjectures in Numer Theory.</a>, Lupton, AZ: American Research Press, 2000.
%F Let [x1.x2.x3. ... .xi] be the decimal expansion of n. Then define F(0) = |x1-x2-...-xi|, F(1) = x1 + x2 + x3 + ... + xi, and for k>1, F(k) = F(k-1) + F(k-2). If F(k)=n for some k, then n belongs to the sequence.
%t check[abs_, sum_, max_] := Module[{s = {}, a = abs, b = sum, c}, c = b; While[c <= max, id = IntegerDigits[c]; If[c > 10 && abs == Abs[id[[1]] - Total[Rest@id]] && sum == Total[id ], AppendTo[s, c]]; c = a + b; a = b; b = c]; s]; seq[digmax_] := Module[{s = {}}, Do[s = Join[s, check[a, b, 10^digmax]], {a, 0, 10*digmax}, {b, 1, 10*digmax}]; Join[{0}, Sort[s]]]; seq[7] (* _Amiram Eldar_, Jul 07 2021 *)
%o (PARI) for(n=0,10000000,s=eval(Vec(Str(n)));f1=sum(i=1,#s,s[i]);f0=abs(2*s[1]-f1);f=f0+f1;while(f<=n,if(f==n,print1(n",");break);f0=f1;f1=f;f=f0+f1)) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 30 2008
%Y Cf. A007953, A038868, A040997.
%K base,nonn
%O 1,2
%A _Felice Russo_
%E Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 28 2000
%E 2 more terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 30 2008
%E Offset corrected by _Amiram Eldar_, Jul 07 2021