login
Number of Fibonacci numbers in the partition having Heinz number n.
1

%I #13 Feb 14 2020 16:39:16

%S 0,1,1,2,1,2,0,3,2,2,1,3,0,1,2,4,0,3,1,3,1,2,0,4,2,1,3,2,0,3,0,5,2,1,

%T 1,4,0,2,1,4,1,2,0,3,3,1,0,5,0,3,1,2,0,4,2,3,2,1,0,4,0,1,2,6,1,3,0,2,

%U 1,2,0,5,1,1,3,3,1,2,0,5,4

%N Number of Fibonacci numbers in the partition having Heinz number n.

%C We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by _Alois P. Heinz_ in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436; consequently, a(2436) = 3.

%C The subprogram B of the Maple program gives the partition having Heinz number n.

%C a(m*n) = a(m)+a(n).

%H Alois P. Heinz, <a href="/A258120/b258120.txt">Table of n, a(n) for n = 1..10000</a>

%e a(2)=1 because B(2)=[1]; a(3)=1 because B(3)=[2]; a(4)=2 because B(4)=[1,1]; a(28)=2 because B(28)=[1,1,4].

%p with(numtheory): a := proc (n) local B, F, ct, q: B := proc (n) local nn, j, m; nn := op(2, ifactors(n)): for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc; F := {seq(combinat['fibonacci'](1+i), i = 1 .. max(B(n)))}: ct := 0; for q to nops(B(n)) do if member(B(n)[q], F) = true then ct := ct+1 else end if end do: ct end proc: seq(a(n), n = 1 .. 150);

%t B[n_] := Module[{nn, j, m}, nn = FactorInteger[n]; For[j = 1, j <= Length[nn], j++, m[j] = nn[[j]]]; Flatten[ Table[ Table[ PrimePi[ m[i][[1]]], {q, 1, m[i][[2]]}], {i, 1, Length[nn]}]]];

%t a[n_] := Module[{F, ct, q}, F = Union @ Table[Fibonacci[1 + i], {i, 1, Max[ B[n]]}]; ct = 0; For[q = 1, q <= Length[B[n]], q++, If[MemberQ[F, B[n][[q]]], ct++]]; ct];

%t Table[a[n], {n, 1, 150}] (* _Jean-François Alcover_, Apr 25 2017, translated from Maple *)

%Y Cf. A000045, A215366.

%K nonn

%O 1,4

%A _Emeric Deutsch_, Jun 14 2015