login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199923 a(n) = Sum_{k=0..3^(n-1)} gcd(k,3^(n-1)) for n > 0 and a(0) = 1. 6

%I #19 Nov 27 2023 06:18:54

%S 1,2,8,30,108,378,1296,4374,14580,48114,157464,511758,1653372,5314410,

%T 17006112,54206982,172186884,545258466,1721868840,5423886846,

%U 17046501516,53464027482,167365651248,523017660150,1631815099668,5083731656658,15816054042936

%N a(n) = Sum_{k=0..3^(n-1)} gcd(k,3^(n-1)) for n > 0 and a(0) = 1.

%H G. C. Greubel, <a href="/A199923/b199923.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = 2 * (n+2) * 3^(n-2), n > 0. - _Sean A. Irvine_, Jun 27 2022

%F From _G. C. Greubel_, Nov 24 2023: (Start)

%F a(n) = (2*(n+2)*3^n + 5*[n=0])/9.

%F G.f.: (9 - 6*x))/(9*(1 - 3*x)^2).

%F E.g.f.: (1/9)*( 5 + 2*(2 + 3*x)*exp(3*x) ). (End)

%e a(3) = 9 + 1 + 1 + 3 + 1 + 1 + 3 + 1 + 1 + 9.

%t LinearRecurrence[{6,-9}, {1,2,8}, 41] (* _G. C. Greubel_, Nov 24 2023 *)

%o (Magma) [1] cat [n le 2 select 2^(2*n-1) else 6*Self(n-1) -9*Self(n-2): n in [1..40]]; // _G. C. Greubel_, Nov 24 2023

%o (SageMath) [(2*(n+2)*3^n + 5*int(n==0))//9 for n in range(41)] # _G. C. Greubel_, Nov 24 2023

%Y First differences of A086972.

%Y Row sums of A199922.

%K nonn

%O 0,2

%A _Peter Luschny_, Nov 12 2011

%E More terms from _Sean A. Irvine_, Jun 27 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 11:14 EDT 2024. Contains 371791 sequences. (Running on oeis4.)