login
A253671
a(n) = floor(A000111(n)/A000111(n-1)).
1
1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40
OFFSET
1,3
COMMENTS
1, 2, 3, 4, ... first appear at n = 1, 3, 5, 7, 8, 10, 11, 13, ... . a(500) = 318.
Numbers appearing only once: interleave 4+7*n, 6+7*n, 9+7*n = 4, 6, 9, 11, 13, 16, ... .
This is a nondecreasing sequence.
The ratio a(n)/n asymptotically tends to 7/11 = 0.6363... - Jean-François Alcover, Jul 21 2015
FORMULA
a(n+2) = a(n+1) + (0, 1, 0, followed by a sequence of period 11: repeat 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1).
a(n+12) = a(n+1) + (6, 7, 6, followed by 7's = A010727).
a(n) = a(n-1) + a(n-11) - a(n-12) for n>15. - Colin Barker, Jan 22 2015
G.f.: x*(x^14-x^13+x^12-x^11+x^10+x^9+x^7+x^6+x^4+x^2+1) / ((x-1)^2*(x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)). - Colin Barker, Jan 22 2015
EXAMPLE
Floor of 1/1, 1/1, 2/1, 5/2, 16/5, 61/16, ... .
1=1*1+0, 1=1*1+0, 2=2*1+0, 5=2*2+1, 16=3*5+1, 61=3*16+13, 272=4*61+28, ... .
MATHEMATICA
max = 500; ee = Table[2^n*EulerE[n, 1] + EulerE[n] - 1, {n, 0, max}]; A000111 = Table[Differences[ee, n] // First // Abs, {n, 0, max}]; Table[Quotient[A000111[[n + 1]], A000111[[n]]], {n, 1, max}] (* Jean-François Alcover, Jan 08 2015 *)
PROG
(PARI) Vec(x*(x^14-x^13+x^12-x^11+x^10+x^9+x^7+x^6+x^4+x^2+1)/((x-1)^2*(x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)) + O(x^100)) \\ Colin Barker, Jan 22 2015
(Python)
# requires python 3.2 or higher
from itertools import accumulate
A253671_list, blist, l1, l2 = [1], [1], 1, 1
for n in range(10**2):
....blist = list(reversed(list(accumulate(reversed(blist))))) + [0] if n % 2 else [0]+list(accumulate(blist))
....l2, l1 = l1, sum(blist)
....A253671_list.append(l1//l2) # Chai Wah Wu, Jan 29 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jan 08 2015, with the help of Jean-François Alcover.
STATUS
approved