login
Fibonacci numbers such that some permutation of their digits is a perfect power.
5

%I #64 Mar 28 2024 00:01:03

%S 0,1,8,144,610,46368,1346269,14930352,63245986,165580141,267914296,

%T 2971215073,4807526976,7778742049,12586269025,139583862445,

%U 365435296162,591286729879,956722026041,1548008755920,2504730781961,4052739537881,6557470319842,17167680177565,27777890035288,190392490709135

%N Fibonacci numbers such that some permutation of their digits is a perfect power.

%C 0, 1, 8 and 144 are the only Fibonacci numbers that are themselves perfect powers (see A227875).

%C A term might have multiple permutations which are perfect powers.

%C Leading 0 digits are allowed in the perfect power, so that 610 is a term since 016 = 2^4.

%C From _David A. Corneth_, Feb 17 2024: (Start)

%C Four ideas to find terms:

%C 1. For each Fibonacci number, check each anagram to determine whether it is a perfect power. A Fibonacci number is a term if and only if such an anagram exists.

%C 2. Let q be the number of digits of some Fibonacci number F. Then check all perfect powers m < 10^q if the frequency of positive digits matches the corresponding positive digits of F and F has at least as many 0's as m. E.g., 610 is a term as the perfect power 16 has the same number of 1's, and the same number of 6's, and 610 has at least as many 0's as 16.

%C 3. Match the last digits of perfect powers and whittle down the number of candidates. So for 46368, a perfect square must end in 4 or 6 for the last digit, 36, 64 or 84 for the last two digits and so on.

%C 4. If some Fibonacci number F has q digits then we could list the possible strings the first floor((q + 1)/2) such numbers could form and see what squares start with those digits. (End)

%C a(46) = 1500520536206896083277. Some other terms: 3928413764606871165730, 6356306993006846248183, 10284720757613717413913, 16641027750620563662096, 26925748508234281076009, 43566776258854844738105, 3311648143516982017180081, 5358359254990966640871840, 8670007398507948658051921, 14028366653498915298923761, 155576970220531065681649693, 659034621587630041982498215, 30960598847965113057878492344. - _Chai Wah Wu_, Mar 27 2024

%H Michael S. Branicky, <a href="/A370071/b370071.txt">Table of n, a(n) for n = 1..45</a>

%e 46368 is a term because it is a Fibonacci number whose digits can be permuted to 36864 = 192^2 (and also to 86436 = 294^2).

%o (PARI) isok(f) = my(d=digits(f), n=#d); for (i=1, n!, my(p=numtoperm(n, i), dd=vector(#d, i, d[p[i]])); if (ispower(fromdigits(dd)), return(1)););

%o lista(nn) = my(list = List([0, 1])); for (n=3, nn, my(f=fibonacci(n)); if (isok(f), listput(list, f));); Vec(list); \\ _Michel Marcus_, Feb 17 2024

%o (Python)

%o from itertools import count, islice

%o from sympy import integer_log

%o def A370071_gen(): # generator of terms

%o a, b = 1, 2

%o yield from (0,1)

%o while True:

%o s = sorted(str(b))

%o l = len(s)

%o m = int(''.join(s[::-1]))

%o u = int(''.join(s))

%o for i in count(2):

%o if i**2 > m:

%o break

%o for j in count(max(2,integer_log(u,i)[0])):

%o if (k:=i**j) > m:

%o break

%o t = sorted(str(k))

%o if ['0']*(l-len(t))+t == s:

%o yield b

%o break

%o else:

%o continue

%o if k<=m:

%o break

%o a, b = b, a+b

%o A370071_list = list(islice(A370071_gen(),20)) # _Chai Wah Wu_, Mar 27 2024

%Y Cf. A000045, A227875, A001597, A118715.

%K nonn,base

%O 1,3

%A _Gonzalo Martínez_, Feb 08 2024

%E a(19) inserted and a(21)-a(23) by _Michael S. Branicky_, Feb 17 2024

%E More terms from _David A. Corneth_, Feb 17 2024