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.
%I A198410 #43 May 13 2023 05:49:55 %S A198410 7,37,271,2269,19927,177877,1596511,14355469,129159847,1162320517, %T A198410 10460530351,94143710269,847290203767,7625602267957,68630391713791, %U A198410 617673439330669,5559060695695687,50031545486420197,450283907053258831,4052555156505760669,36472996387631139607 %N A198410 a(n) = ((3^(n-1) + 1)^3 -1)/3^n. %C A198410 This sequence is generalizable : %C A198410 Proposition: p^n divide (p^(n-1) + 1)^ p - 1. %C A198410 Proof: Let a and p be two integers such that p>=2, and k = gcd(a, p). Then ak divides (a + 1)^p - 1 because (a+1)^p - 1 = [a^p + binomial(p,1)*a^(p-1) + … + binomial(p,p-2)*a^2] + pa == binomial(p,1)*n^(n-1) == 0 (mod p^n) with a = p^(n-1) and k = p. %C A198410 a(n) is the least k such that k*3^n+1 is a cube. Thus, the cube is given by (3^(n-1)+1)^3. - _Derek Orr_, Mar 23 2014 %H A198410 Vincenzo Librandi, <a href="/A198410/b198410.txt">Table of n, a(n) for n = 2..200</a> %H A198410 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (13,-39,27). %F A198410 G.f.: -x^2*(7-54*x+63*x^2) / ( (x-1)*(3*x-1)*(9*x-1) ). - _R. J. Mathar_, Oct 25 2011 %F A198410 a(n) = 13*a(n-1)-39*a(n-2)+27*a(n-3) for n>2. - _Vincenzo Librandi_, Mar 25 2014 %e A198410 a(2) = ((3 + 1)^3 - 1)/3^2 = 63/9 = 7. %p A198410 A198410 := proc(n) %p A198410 (3^(n-1)+1)^3 ; %p A198410 (%-1)/3^n ; %p A198410 end proc: %p A198410 seq(A198410(n), n=2..20) ; # _R. J. Mathar_, Oct 25 2011 %t A198410 Table[((3^(n - 1) + 1)^3 - 1)/3^n, {n, 2, 20}] (* _Wesley Ivan Hurt_, Mar 24 2014 *) %t A198410 CoefficientList[Series[(7 - 54 x + 63 x^2)/((1 - x) (3 x - 1) (9 x - 1)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Mar 25 2014 *) %t A198410 LinearRecurrence[{13,-39,27},{7,37,271},30] (* _Harvey P. Dale_, Mar 04 2015 *) %o A198410 (Magma) I:=[7,37,271]; [n le 3 select I[n] else 13*Self(n-1)-39*Self(n-2)+27*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Mar 25 2014 %o A198410 (PARI) a(n)=9^n/27+3^n/3+1 \\ _Charles R Greathouse IV_, Jun 11 2015 %Y A198410 Cf. A060073. %K A198410 nonn,easy %O A198410 2,1 %A A198410 _Michel Lagneau_, Oct 24 2011