OFFSET
0,6
COMMENTS
It is conjectured that a(n) = 0 only for n in {0,1,2,3,4,7,9,10,14,15,17,26}.
Let N, K defined by: K = max {a(n) for all n <= N}. The following pairs (N : K) for N > 26 mark points where K increases.
(27 : 15), (49 : 21), (110 : 29), (118 : 34), (165 : 58), (2769 : 61), (2837 : 65), (3661 : 70), (14354 : 74), (59913 : 103), (1786453 : 112), (2702893 : 117), (2712849 : 121).
LINKS
Peter Luschny, An arithmetic conjecture.
EXAMPLE
a(20) = 4 because MOD([2^20 / 3^4], 6) = 3.
MAPLE
a := proc(m) local l, i, u, A; A := convert(2^m, base, 3); u := 0;
for i from 0 to nops(A)-1 do if A[i+1] = 1 then u := u + 1 ;
elif A[i+1] = 0 then if type(u, odd) then RETURN(i) fi fi od;
0 end: seq(a(i), i=0..62);
MATHEMATICA
a[n_] := Module[{k}, For[k = 1, k <= n, k++, If[Mod[Floor[2^n/3^k], 6] == 3, Return[k]]]; 0]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 17 2019 *)
PROG
(PARI) a(n) = my(v2=2^n); for(k=1, logint(v2, 3)-1, (3==v2\(3^k)%6) && return(k)); 0; \\ Ruud H.G. van Tol, May 09 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Peter Luschny, Mar 06 2009
STATUS
approved