OFFSET
0,2
COMMENTS
Conjecture: the sequence a(n) taken modulo a positive integer k is eventually periodic with the period dividing phi(k). For example, the sequence taken modulo 7 is [6, 2, 1, 6, 1, 4, 5, 2, 1, 0, 1, 5, 5, 2, 1, 0, 1, 5, 5, 2, 1, 0, 1, 5, 5, 2, 1, 0, 1, 5, ...] with an apparent period of 6 (= phi(7)) starting at n = 7. - Peter Bala, Aug 08 2025
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..300
FORMULA
E.g.f.: 2 - exp(3) + Sum_{n>=1} 3^n * exp(2*x^n) / n!.
For n >= 1, a(n) = Sum_{d divides n} 2^d * 3^(n/d) * n!/(d!*(n/d)!). - Peter Bala, Aug 08 2025
EXAMPLE
E.g.f.: A(x) = 1 + 6*x + 30*x^2/2! + 78*x^3/3! + 426*x^4/4! + 582*x^5/5! +...
where
A(x) = 2 - exp(2) + 2*exp(3*x) + 2^2*exp(3*x^2)/2! + 2^3*exp(3*x^3)/3! + 2^4*exp(3*x^4)/4! + 2^5*exp(3*x^5)/5! +...
A(x) = 2 - exp(3) + 3*exp(2*x) + 3^2*exp(2*x^2)/2! + 3^3*exp(2*x^3)/3! + 3^4*exp(2*x^4)/4! + 3^5*exp(2*x^5)/5! +...
MAPLE
with(numtheory): seq(n!*add(2^d*3^(n/d)/(d!*(n/d)!), d in divisors(n)), n = 1..25); # Peter Bala, Aug 08 2025
PROG
(PARI) {a(n) = local(A=1); A = 2-exp(2) + sum(m=1, n, 2^m/m!*exp(3*x^m +x*O(x^n))); if(n==0, 1, n!*polcoeff(A, n))}
for(n=0, 30, print1(a(n), ", "))
(PARI) {a(n) = local(A=1); A = 2-exp(3) + sum(m=1, n, 3^m/m!*exp(2*x^m +x*O(x^n))); if(n==0, 1, n!*polcoeff(A, n))}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 20 2015
STATUS
approved
