OFFSET
1,4
COMMENTS
Refer to arrangement same as A005169: "A fountain is formed by starting with a row of coins, then stacking additional coins on top so that each new coin touches two in the previous row". The 5 curves coins patterns consist of a part of each coin circumference and forms a continuous area. There are total 13 distinct patterns. For selected pattern, I would like to call "5C4S" type as it cover 4 coins and symmetry. When packing 5C4S into fountain of coins base n, the total number of 5C4S is A001399, the coins left is A230267 and void left is a(n). See illustration in links.
LINKS
Kival Ngaokrajang, Illustration of initial terms (V)
Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1,-1,1).
FORMULA
G.f.: x^2*(x^4 + 3*x^3 + 4*x^2 + 1)/((1-x)*(1-x^2)*(1-x^3)). - Ralf Stephan, Oct 17 2013
a(n) = (9*(-1)^n+18*n^2-48*n)/24 - A099837(n)/3. - R. J. Mathar, Feb 28 2018
MAPLE
A099837 := proc(n)
op(modp(n, 3)+1, [2, -1, -1]) ;
end proc:
A230276 := proc(n)
-A099837(n)/3 + (-48*n+31+18*n^2+9*(-1)^n)/24 ;
end proc:
seq(A230276(n), n=1..40) ; # R. J. Mathar, Feb 28 2018
MATHEMATICA
LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 1, 1, 6, 10, 16}, 45] (* Jean-François Alcover, May 05 2023 *)
PROG
(Small Basic)
a[1]=0
d[2]=1
For n = 1 To 100
If n+1 >= 3 Then
If Math.Remainder(n+1, 3)=math.Remainder(n+1, 6) Then
d2=2
Else
If Math.Remainder(n+1, 3)+math.Remainder(n+1, 6)=5 then
d2=5
Else
d2=-1
EndIf
EndIf
d[n+1]=d[n]+d2
EndIf
a[n+1]=a[n]+d[n+1]
TextWindow.Write(a[n]+", ")
EndFor
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Oct 15 2013
STATUS
approved