OFFSET
1,3
COMMENTS
WARNING: The offset of this sequence has been changed from 0 to 1 without correcting the formulas and programs, many of them correspond to the original indexing a(0)=0, a(1)=1, ... - M. F. Hasler, Oct 06 2014
Numbers n such that no entry in n-th row of Pascal's triangle is divisible by 3, i.e., such that A062296(n) = 0.
The base 3 representation of these numbers is 222...222 or 122...222.
a(n+1) is the smallest number with ternary digit sum = n: A053735(a(n+1)) = n and A053735(m) <> n for m < a(n+1). - Reinhard Zumkeller, Sep 15 2006
A138002(a(n)) = 0. - Reinhard Zumkeller, Feb 26 2008
Also, number of terms in S(n), where S(n) is defined in A114482. - N. J. A. Sloane, Nov 13 2014
a(n+1) is also the Moore lower bound on the order of a (4,g)-cage. - Jason Kimberley, Oct 30 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Daniel Birmajer, Juan B. Gil, Jordan O. Tirrell, and Michael D. Weiner, Pattern-avoiding stabilized-interval-free permutations, arXiv:2306.03155 [math.CO], 2023.
Sayan Dutta, Lorenz Halbeisen, and Norbert Hungerbühler, Properties of Hesse derivatives of cubic curves, arXiv:2309.05048 [math.AG], 2023. See p. 9.
Gyula Tasi and Fujio Mizukami, Quantum algebraic-combinatoric study of the conformational properties of n-alkanes, J. Math. Chemistry, 25, 1999, 55-64 (see p. 60).
Index entries for linear recurrences with constant coefficients, signature (1,3,-3).
FORMULA
a(n) = 2*3^(n/2-1)-1 if n is even; a(n) = 3^(n/2-1/2)-1 if n is odd. - Emeric Deutsch, Feb 03 2005, offset updated.
From Paul Curtz, Feb 21 2008: (Start)
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3).
Partial sums of A108411. (End)
G.f.: x^2*(1+x)/((1-x)*(1-3*x^2)). - Colin Barker, Apr 02 2012
a(2n+1) = 3*a(2n-1) + 2; a(2n) = ( a(2n-1) + a(2n+1) )/2. See A060647 for case where a(1)= 1. - Richard R. Forberg, Nov 30 2013
a(n) = 2^((1+(-1)^n)/2) * 3^((2*n-3-(-1)^n)/4) - 1. - Luce ETIENNE, Aug 29 2014
E.g.f.: (1 - 3*cosh(x) + 2*cosh(sqrt(3)*x) - 3*sinh(x) + sqrt(3)*sinh(sqrt(3)*x))/3. - Stefano Spezia, Apr 06 2022
a(n) = (1/3)*([n=0] - 3 + (1+(-1)^n)*3^(n/2) + ((1-(-1)^n)/2)*3^((n+1)/2)). - G. C. Greubel, Apr 17 2023
EXAMPLE
The first rows in Pascal's triangle with no multiples of 3 are:
row 0: 1;
row 1: 1, 1;
row 2: 1, 2, 1;
row 5: 1, 5, 10, 10, 5, 1;
row 8: 1, 8, 28, 56, 70, 56, 28, 8, 1;
MAPLE
A062318 :=proc(n)
if n mod 2 = 1 then
3^((n-1)/2)-1
else
2*3^(n/2-1)-1
fi
end proc:
seq(A062318(n), n=1..37); # Emeric Deutsch, Feb 03 2005, offset updated
MATHEMATICA
CoefficientList[Series[x^2*(1+x)/((1-x)*(1-3*x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Apr 20 2012 *)
A062318[n_]:= (1/3)*(Boole[n==0] -3 +3^(n/2)*(2*Mod[n+1, 2] +Sqrt[3] *Mod[n, 2]));
Table[A062318[n], {n, 50}] (* G. C. Greubel, Apr 17 2023 *)
PROG
(Magma) I:=[0, 1, 2]; [n le 3 select I[n] else Self(n-1)+3*Self(n-2) -3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Apr 20 2012
(PARI) a(n)=3^(n\2)<<bittest(n, 0)-1 \\ [Program corresponds to offset=0, a(0)=0, a(1)=1.] - M. F. Hasler, Oct 06 2014
(SageMath)
def A062318(n): return (1/3)*(int(n==0) - 3 + 2*((n+1)%2)*3^(n/2) + (n%2)*3^((n+1)/2))
[A062318(n) for n in range(1, 41)] # G. C. Greubel, Apr 17 2023
CROSSREFS
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), this sequence (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A037233 (actual order of a (4,g)-cage).
KEYWORD
nonn,easy
AUTHOR
Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 05 2001
EXTENSIONS
More terms from Emeric Deutsch, Feb 03 2005
Entry revised by N. J. A. Sloane, Jul 29 2011
STATUS
approved