OFFSET
0,3
COMMENTS
a(n) is the least number x such that gcd(2^x, x-phi(x)) = 2^n. If cototient is replaced by totient, analogous values are different: A053576.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (2).
FORMULA
a(n) = A007283(n-1) for n>1, with a(0) = 0 and a(1) = 1.
G.f.: x * (1 + 4*x) / (1 - 2*x) = x / (1 - 6*x / (1 + 4*x)). - Michael Somos, Jun 15 2012
Starting (1, 6, 12, 24, 48, ...) = binomial transform of [1, 5, 1, 5, 1, 5, ...]. - Gary W. Adamson, Nov 18 2007
a(n) = (-6*n + 16) * a(n-1) + 2 * Sum_{k=1..n-1} a(k) * a(n-k) if n>1. - Michael Somos, Jul 23 2011
E.g.f.: (-3 - 4*x + 3*exp(2*x))/2. - Ilya Gutkovskiy, Jul 04 2016
a(n) = 3*2^(n-1) - (3/2)*[n=0] - 2*[n=1]. - G. C. Greubel, Apr 27 2021
EXAMPLE
G.f. = x + 6*x^2 + 12*x^3 + 24*x^4 + 48*x^5 + 96*x^6 + 192*x^7 + 384*x^8 + ...
MAPLE
0, 1, seq(3*2^(n-1), n=2..40); # G. C. Greubel, Apr 27 2021
MATHEMATICA
{0}~Join~Map[Total, {{1}}~Join~Table[3 Binomial[n, k], {n, 30}, {k, 0, n}]] (* Michael De Vlieger, Jul 03 2016, after Harvey P. Dale at A134059 *)
Table[3*2^(n-1) -(3/2)*Boole[n==0] -2*Boole[n==1], {n, 0, 40}] (* G. C. Greubel, Apr 27 2021 *)
Join[{0, 1}, NestList[2#&, 6, 30]] (* Harvey P. Dale, Jan 22 2024 *)
PROG
(Magma) [0, 1] cat [ &+[ 3*Binomial(n, k): k in [0..n] ]: n in [1..30] ]; // Klaus Brockhaus, Dec 02 2009
(PARI) {a(n) = local(A); if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (-6*k + 16) * A[k-1] + 2 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */
(PARI) a(n)=if(n<2, n, 3<<(n-1)) \\ Charles R Greathouse IV, Jun 16 2012
(Sage) [0, 1]+[3*2^(n-1) for n in (2..40)] # G. C. Greubel, Apr 27 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Apr 28 2003
EXTENSIONS
More terms from Klaus Brockhaus, Dec 02 2009
STATUS
approved