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.

A054718 Number of ternary sequences with primitive period n.

This page as a plain text file.
%I A054718 #34 Apr 14 2021 22:25:07
%S A054718 1,3,6,24,72,240,696,2184,6480,19656,58800,177144,530640,1594320,
%T A054718 4780776,14348640,43040160,129140160,387400104,1162261464,3486725280,
%U A054718 10460350992,31380882456,94143178824,282428998560,847288609200,2541864234000,7625597465304
%N A054718 Number of ternary sequences with primitive period n.
%C A054718 Equivalently, output sequences with primitive period n from a simple cycling shift register.
%H A054718 Seiichi Manyama, <a href="/A054718/b054718.txt">Table of n, a(n) for n = 0..2095</a> (terms 0..650 from Alois P. Heinz)
%H A054718 E. N. Gilbert and J. Riordan, <a href="http://projecteuclid.org/euclid.ijm/1255631587">Symmetry types of periodic sequences</a>, Illinois J. Math., 5 (1961), 657-665.
%F A054718 a(n) = Sum_{d|n} mu(d)*3^(n/d).
%F A054718 a(0) = 1, a(n) = n * A027376(n).
%F A054718 a(n) = 3 * A034741(n).
%F A054718 G.f.: 1 + 3 * Sum_{k>=1} mu(k) * x^k / (1 - 3*x^k). - _Ilya Gutkovskiy_, Apr 14 2021
%p A054718 with(numtheory):
%p A054718 a:= n-> `if`(n=0, 1, add(mobius(d)*3^(n/d), d=divisors(n))):
%p A054718 seq(a(n), n=0..30);  # _Alois P. Heinz_, Oct 21 2012
%t A054718 a[0] = 1; a[n_] := Sum[MoebiusMu[d]*3^(n/d), {d, Divisors[n]}]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Mar 11 2014, after _Alois P. Heinz_ *)
%o A054718 (PARI) a(n) = if(n==0,1,sumdiv(n,d, moebius(d) * 3^(n/d) )); \\ _Joerg Arndt_, Apr 14 2013
%Y A054718 Column k=3 of A143324.
%Y A054718 Cf. A027375, A054719, A054720, A054721.
%K A054718 nonn
%O A054718 0,2
%A A054718 _N. J. A. Sloane_, Apr 20 2000