OFFSET
0,2
COMMENTS
LINKS
Eric Weisstein's World of Mathematics, Fibonacci polynomial
Wikipedia, Fibonacci polynomials
FORMULA
EXAMPLE
n a(n) prime factorization Fibonacci polynomial
------------------------------------------------------------
0 1 (empty) F_0(x) = 0
1 2 p_1 F_1(x) = 1
2 3 p_2 F_2(x) = x
3 10 p_3 * p_1 F_3(x) = x^2 + 1
4 63 p_4 * p_2^2 F_4(x) = x^3 + 2x
5 2750 p_5 * p_3^3 * p_1 F_5(x) = x^4 + 3x^2 + 1
6 842751 p_6 * p_4^4 * p_2^3 F_6(x) = x^5 + 4x^3 + 3x
MATHEMATICA
c[n_] := CoefficientList[Fibonacci[n, x], x]
f[n_] := Product[Prime[k]^c[n][[k]], {k, 1, Length[c[n]]}]
Table[f[n], {n, 1, 11}] (* A206296 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A206296 n) (cond ((<= n 1) (+ 1 n)) (else (* (A003961 (A206296 (- n 1))) (A206296 (- n 2))))))
(Python)
from sympy import factorint, prime, primepi
from operator import mul
def a003961(n):
F=factorint(n)
return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**F[i] for i in F])
l=[1, 2]
for n in range(2, 11):
l.append(a003961(l[n - 1])*l[n - 2])
print(l) # Indranil Ghosh, Jun 21 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 05 2012
EXTENSIONS
a(0) = 1 prepended (to indicate 0-polynomial), Name changed, Comments and Example section rewritten by Antti Karttunen, Jul 29 2015
STATUS
approved