%I #26 Jan 14 2023 11:18:34
%S 7,13,31,91,307,1123,4291,16771,66307,263683,1051651,4200451,16789507,
%T 67133443,268484611,1073840131,4295163907,17180262403,68720263171,
%U 274879479811,1099514773507,4398052802563,17592198627331,70368769343491,281475027042307,1125900007505923
%N Least number k > 0 such that k*2^n+1 is a cube.
%C Terms are either 1, 3, or 7 mod 10.
%C Using the formula, we see that the cubes produced are (2^n+1)^3 for all n.
%C This is a particular case of general formula
%C (3 + 3 f + f^2) f + 1 = (1 + f)^3 with f = 2^n.
%C For the simplest case f = n, we have (3 + 3 n + n^2) = A002061 (Central polygonal numbers, with corresponding offset). - _Zak Seidov_, Mar 24 2014
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-14,8).
%F a(n) = 3 + 3*2^n + 2^(2*n).
%F G.f.: -(38*x^2-36*x+7) / ((x-1)*(2*x-1)*(4*x-1)). - _Colin Barker_, Mar 24 2014
%e 13*(2^1)+1 = 27 is a cube. Since 13 is the smallest coefficient that returns a cube, then a(1) = 13.
%o (Python) {print(3+3*(2**n)+2**(2*n)) for n in range(100)}
%o (PARI) for(n=0, 100, k=1; while(!ispower(k*2^n+1, 3), k++); print1(k, ", ")) \\ _Colin Barker_, Mar 24 2014
%o (PARI) a(n) = (3+3*2^n+4^n) \\ _Colin Barker_, Mar 24 2014
%o (PARI) Vec(-(38*x^2-36*x+7)/((x-1)*(2*x-1)*(4*x-1)) + O(x^100)) \\ _Colin Barker_, Mar 24 2014
%Y Cf. A239678.
%K nonn,easy
%O 0,1
%A _Derek Orr_, Mar 23 2014