login
a(n) = 3^n + 1.
107

%I #109 Jul 13 2024 10:12:08

%S 2,4,10,28,82,244,730,2188,6562,19684,59050,177148,531442,1594324,

%T 4782970,14348908,43046722,129140164,387420490,1162261468,3486784402,

%U 10460353204,31381059610,94143178828,282429536482,847288609444,2541865828330,7625597484988

%N a(n) = 3^n + 1.

%C Companion numbers to A003462.

%C a(n) = A024101(n)/A024023(n). - _Reinhard Zumkeller_, Feb 14 2009

%C Mahler exhibits this sequence with n>=2 as a proof that there exists an infinite number of x coprime to 3, such that x belongs to A005836 and x^2 belong to A125293. - _Michel Marcus_, Nov 12 2012

%C a(n-1) is the number of n-digit base 3 numbers that have an even number of digits 0. - _Yifan Xie_, Jul 13 2024

%D Knuth, Donald E., Satisfiability, Fascicle 6, volume 4 of The Art of Computer Programming. Addison-Wesley, 2015, pages 148 and 220, Problem 191.

%D P. Ribenboim, The Little Book of Big Primes, Springer-Verlag, NY, 1991, pp. 35-36, 53.

%H T. D. Noe, <a href="/A034472/b034472.txt">Table of n, a(n) for n=0..200</a>

%H T. A. Gulliver, <a href="http://www.m-hikari.com/imf-2010/61-64-2010/gulliverIMF61-64-2010.pdf">Divisibility of sums of powers of odd integers</a>, Int. Math. For. 5 (2010) 3059-3066, eq 5.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=454">Encyclopedia of Combinatorial Structures 454</a>

%H Kurt Mahler, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa53/aa5316.pdf">The representation of squares to the base 3</a>, Acta Arith. Vol. 53, Issue 1 (1989), p. 99-106.

%H Burkard Polster, <a href="https://www.youtube.com/watch?v=9JN5f7_3YmQ">Special numbers in 3-coloring of Pascal's triangle</a>, Mathologer video (2019).

%H Amelia Carolina Sparavigna, <a href="https://doi.org/10.18483/ijSci.2188">Some Groupoids and their Representations by Means of Integer Sequences</a>, International Journal of Sciences (2019) Vol. 8, No. 10.

%H D. Suprijanto and I. W. Suwarno, <a href="http://dx.doi.org/10.12988/ams.2014.4139">Observation on Sums of Powers of Integers Divisible by 3k-1</a>, Applied Mathematical Sciences, Vol. 8, 2014, no. 45, 2211 - 2217.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LucasSequence.html">Lucas Sequence</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-3).

%F a(n) = 3*a(n-1) - 2 = 4*a(n-1) - 3*a(n-2). (Lucas sequence, with A003462, associated to the pair (4, 3).)

%F G.f.: 2*(1-2*x)/((1-x)*(1-3*x)). Inverse binomial transforms yields 2,2,4,8,16,... i.e., A000079 with the first entry changed to 2. Binomial transform yields A063376 without A063376(-1). - _R. J. Mathar_, Sep 05 2008

%F E.g.f.: exp(x) + exp(3*x). - _Mohammad K. Azarian_, Jan 02 2009

%F a(n) = A279396(n+3,3). - _Wolfdieter Lang_, Jan 10 2017

%F a(n) = 2*A007051(n). - _R. J. Mathar_, Apr 07 2022

%e a(3)=28 because 4*a(2)-3*a(1)=4*10-3*4=28 (28 is also 3^3 + 1).

%e G.f. = 2 + 4*x + 10*x^2 + 28*x^3 + 82*x^4 + 244*x^5 + 730*x^5 + ...

%p ZL:= [S, {S=Union(Sequence(Z), Sequence(Union(Z, Z, Z)))}, unlabeled]: seq(combstruct[count](ZL, size=n), n=0..25); # _Zerinvary Lajos_, Jun 19 2008

%p g:=1/(1-3*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)+1, n=0..31); # _Zerinvary Lajos_, Jan 09 2009

%t Table[3^n + 1, {n, 0, 24}]

%o (PARI) a(n) = 3^n + 1

%o (PARI) Vec(2*(1-2*x)/((1-x)*(1-3*x)) + O(x^50)) \\ _Altug Alkan_, Nov 15 2015

%o (Sage) [lucas_number2(n,4,3) for n in range(27)] # _Zerinvary Lajos_, Jul 08 2008

%o (Sage) [sigma(3,n) for n in range(27)] # _Zerinvary Lajos_, Jun 04 2009

%o (Sage) [3^n+1 for n in range(30)] # _Bruno Berselli_, Jan 11 2017

%o (Magma) [3^n+1: n in [0..30]]; // _Vincenzo Librandi_, Jan 11 2017

%Y Cf. A003462, A000204, A007051, A000051, A052539, A034474, A062394, A034491, A062395, A062396, A062397, A007689, A063376, A063481, A074600 - A074624, A034524, A178248, A228081, A279396.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_.

%E Additional comments from _Rick L. Shepherd_, Feb 13 2002