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.

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

This page as a plain text file.
%I A199923 #23 Oct 24 2024 05:41:22
%S A199923 1,2,8,30,108,378,1296,4374,14580,48114,157464,511758,1653372,5314410,
%T A199923 17006112,54206982,172186884,545258466,1721868840,5423886846,
%U A199923 17046501516,53464027482,167365651248,523017660150,1631815099668,5083731656658,15816054042936
%N A199923 a(n) = Sum_{k=0..3^(n-1)} gcd(k,3^(n-1)) for n > 0 and a(0) = 1.
%H A199923 G. C. Greubel, <a href="/A199923/b199923.txt">Table of n, a(n) for n = 0..1000</a>
%H A199923 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6,-9).
%F A199923 a(n) = 2 * (n+2) * 3^(n-2), n > 0. - _Sean A. Irvine_, Jun 27 2022
%F A199923 From _G. C. Greubel_, Nov 24 2023: (Start)
%F A199923 a(n) = (2*(n+2)*3^n + 5*[n=0])/9.
%F A199923 G.f.: (1-4*x+5*x^2)/(1-3*x)^2. [corrected by _Jason Yuen_, Oct 24 2024]
%F A199923 E.g.f.: (1/9)*( 5 + 2*(2 + 3*x)*exp(3*x) ). (End)
%e A199923 a(3) = 9 + 1 + 1 + 3 + 1 + 1 + 3 + 1 + 1 + 9.
%t A199923 LinearRecurrence[{6,-9}, {1,2,8}, 41] (* _G. C. Greubel_, Nov 24 2023 *)
%o A199923 (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 A199923 (SageMath) [(2*(n+2)*3^n + 5*int(n==0))//9 for n in range(41)] # _G. C. Greubel_, Nov 24 2023
%Y A199923 First differences of A086972.
%Y A199923 Row sums of A199922.
%K A199923 nonn,easy
%O A199923 0,2
%A A199923 _Peter Luschny_, Nov 12 2011
%E A199923 More terms from _Sean A. Irvine_, Jun 27 2022