cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A288492 Indices of terms of A288349 that are powers of 2.

This page as a plain text file.
%I A288492 #43 Jul 19 2017 21:36:31
%S A288492 1,2,3,18,95,440,1897,7882,32139,129804,521741,2092046,8378383,
%T A288492 33533968,134176785,536789010,2147319827,8589606932,34359083029,
%U A288492 137437642774,549753192471,2199018012696,8796082536473,35184351117338,140737446412315,562949869535260
%N A288492 Indices of terms of A288349 that are powers of 2.
%C A288492 The sequence is derived from Chinese 2017 college entrance examination mathematics questions.
%H A288492 Zhining Yang, <a href="/A288492/b288492.txt">Table of n, a(n) for n = 1..200</a>
%H A288492 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (8,-21,22,-8).
%F A288492 From _Colin Barker_, Jun 23 2017: (Start)
%F A288492 G.f.: x*(1 - 6*x + 8*x^2 + 14*x^3 - 22*x^4 + 8*x^5) / ((1 - x)^2*(1 - 2*x)*(1 - 4*x)).
%F A288492 a(n) = 2 - 5*2^(n-2) + 2^(2*n-3) + n for n>2.
%F A288492 a(n) = 8*a(n-1) - 21*a(n-2) + 22*a(n-3) - 8*a(n-4) for n>6.
%F A288492 (End)
%e A288492 a(4) = 18 means the 18th element of the sum of the concatenate subsequences [2^0, 2^1, ..., 2^k] = 1+1+2+1+2+4+1+2+4+8+1+2+4+8+16+1+2+4 = 64, and 64 is power of 2.
%t A288492 Position[Accumulate@ Flatten@ Array[2^Range[0, #] &, 2000, 0], k_ /; IntegerQ@ Log2@ k][[All, 1]] (* per Name, or *)
%t A288492 Table[2 - 5*2^(n - 2) + 2^(2 n - 3) + n + Boole[n == 2], {n, 26}] (* or *)
%t A288492 LinearRecurrence[{8, -21, 22, -8}, {1, 2, 3, 18, 95, 440}, 26] (* or *)
%t A288492 Rest@ CoefficientList[Series[x (1 - 6 x + 8 x^2 + 14 x^3 - 22 x^4 + 8 x^5)/((1 - x)^2*(1 - 2 x) (1 - 4 x)), {x, 0, 26}], x] (* _Michael De Vlieger_, Jun 19 2017 *)
%o A288492 (PARI) for(k=0,100,p=(2^k-3)*(2^k-2)/2+k; print1(p, ", "))
%o A288492 (PARI) ispower2(n) = (n==1) || (n==2) || (ispower(n,,&two) && (two==2));
%o A288492 lista(nn) = select(x->ispower2(x), vector(nn, n, t=floor(sqrt(2*n)+1/2); 2^t+2^(n-t*(t-1)/2)-t-2), 1); \\ _Michel Marcus_, Jun 20 2017
%o A288492 (PARI) Vec(x*(1 - 6*x + 8*x^2 + 14*x^3 - 22*x^4 + 8*x^5) / ((1 - x)^2*(1 - 2*x)*(1 - 4*x)) + O(x^30)) \\ _Colin Barker_, Jun 23 2017
%Y A288492 Cf. A059268, A288349.
%K A288492 nonn,easy
%O A288492 1,2
%A A288492 _Zhining Yang_, Jun 10 2017