OFFSET
1,3
COMMENTS
Leading zeros are not allowed, but digits > 9 are permitted.
Derived from A001250: 1, 2, 4, 10, 32, 122, 544, 2770, 15872, 101042, 707584, 5405530, ... giving 1, 1 and 4-2/2, 10-4/2, 32-10/2, 122-32/2=106, 544-122/2=483, ...
LINKS
D. Berry, J. Broom, D. Dixon, and A. Flaherty, Umbral Calculus and the Boustrophedon Transform, 2013.
FORMULA
a(n) = 2*A000111(n+1)-A000111(n) [Berry et al., 2013] (but compare A231895). - N. J. A. Sloane, Nov 18 2013
E.g.f: 1+(sec(x)+tan(x)-1)*(sec(x)+tan(x)). - Sergei N. Gladkovskii, Nov 07 2014
EXAMPLE
The n-digit numbers contributing to the counts are:
n=1: 0;
n=2: 10;
n=3: 102, 120, 201;
n=4: 1032, 1203, 1302, 2031, 2130, 2301, 3021, 3120;
n=5: 10324, 10423, 12043,...,41302, 42301;
G.f.: 1 + x + 3*x^2 + 8*x^3 + 27*x^4 + 106*x^5 + 483*x^6 + 2498*x^7 + ...
MAPLE
MATHEMATICA
m = 23;
CoefficientList[1 + (Sec[x] + Tan[x] - 1)(Sec[x] + Tan[x]) + O[x]^m, x]* Range[0, m - 1]! (* Jean-François Alcover, Mar 31 2020 *)
PROG
(Python)
from itertools import accumulate, islice
def A104854_gen(): # generator of terms
yield 1
blist = (0, 1)
while True:
yield -blist[-1]+2*(blist := tuple(accumulate(reversed(blist), initial=0)))[-1]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Criton (mcriton(AT)wanadoo.fr), Apr 23 2005 and May 29 2005
EXTENSIONS
More terms from R. J. Mathar, Feb 14 2008
STATUS
approved