Nothing Special   »   [go: up one dir, main page]

login
Search: a081614 -id:a081614
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = ceiling((Sum_{k=1..n-1} a(k)) / 2) for n >= 2 starting with a(1) = 1.
+10
101
1, 1, 1, 2, 3, 4, 6, 9, 14, 21, 31, 47, 70, 105, 158, 237, 355, 533, 799, 1199, 1798, 2697, 4046, 6069, 9103, 13655, 20482, 30723, 46085, 69127, 103691, 155536, 233304, 349956, 524934, 787401, 1181102, 1771653, 2657479, 3986219, 5979328, 8968992
OFFSET
1,4
COMMENTS
a(n) is the number of even integers that have n-1 digits when written in base 3/2. For example, there are 2 even integers that use three digits in base 3/2: 6 and 8: they are written as 210 and 212, respectively. - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018
From Petros Hadjicostas, Jul 20 2020: (Start)
We describe Schuh's counting-off game (pp. 373-375 and 377-379). Assume m people are standing on a circle and they are labeled 1 through m (say clockwise). We start with the person labeled 1 and every 3rd person drops out (in a variation of the famous Josephus problem). The process is repeated until only one person is left.
This sequence describes those numbers m for which either the person labeled 1 or the person labeled 2 is the last survivor.
From a(4) = 2 to a(53) = 775795914 (see T. D. Noe's b-file), the values agree with those in Schuh (1968, p. 374) and Burde (1987, p. 207). a(54) = 1163693871 while both Schuh and Burde have 1063693871 (a difference in the 2nd digit starting on the left). a(55) = 1745540806 while both Schuch and Burde have 1595540806.
Schuh (1968) obtains the numbers in the following way. Suppose we know a(n) and the corresponding number i(n) of the last survivor (i(n) = 1 or 2). We multiply a(n) by 3/2 (cf. Burde's use of fractional bases).
If the product is an integer, that is a(n+1) and the corresponding last survivor is the same.
If the product is not an integer, then a(n+1) = floor(a(n)*3/2) if the last survivor i(n) = 2 (and the new last survivor is i(n+1) = 1), and a(n+1) = ceiling(a(n)*3/2) if the last survivor is i(n) = 1 (and the new last survivor is i(n+1) = 2).
Note that a(53) = 775795914 and a(54) = (3/2)*a(53) = 1163693871 (not 1063693871), so it seems Schuh did a mistake and Burde copied it. Also (3/2)*1163693871 = 1745540806.5. Since a(53) = 775795914 corresponds to number 2, we round down, i.e., a(54) = 1745540806 (and move to number 1). If, however, we multiply the incorrect 1063693871 by 3/2 and round down, we get Schuh and Burde's incorrect value 1595540806 for a(54).
Numbers a(n) that correspond to last survivors being number 1 are tabulated in A081614 while numbers a(n) that correspond to last survivors being number 2 are tabulated in A081615. (End)
a(n) is the number of times (n-1) appears in A061420. - Chinmaya Dash, Aug 19 2020
REFERENCES
Fred Schuh, The Master Book of Mathematical Recreations, Dover, New York, 1968. [See Table 18, p. 374. Only the terms from a(6) = 4 forward are shown in the table. The table is definitely related to this sequence.]
LINKS
K. Burde, Das Problem der Abzählreime und Zahlentwicklungen mit gebrochenen Basen [The problem of counting rhymes and number expansions with fractional bases], J. Number Theory 26(2) (1987), 192-209. [The author deals with the representation of n in fractional bases k/(k-1) and its relation to counting-off games. Here k = 3. See the table on p. 207. See also the review in MathSciNet (MR0889384) by R. G. Stoneham.]
B. Chen, R. Chen, J. Guo, S. Lee et al, On Base 3/2 and its sequences, arXiv:1808.04304 [math.NT], 2018.
Tom Edgar, Hailey Olafson, and James Van Alstine, Approximating the Fibonacci Sequence, Integers 16 (2016), #A63.
FORMULA
a(n) = ceiling(c*(3/2)^n-1/2) where c = 0.3605045561966149591015446628665... - Benoit Cloitre, Nov 22 2002
If 2^m divides a(i) then 2^(m-1)*3^1 divides a(i+1) and so on... until finally, 3^m divides a(i+m). - Ralf Stephan, Apr 20 2003
a(n) = A081848(n)/3. - Tom Edgar, Jul 21 2014
a(n) = A005428(n-2). - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018
MATHEMATICA
f[s_] := Append[s, Ceiling[Plus @@ s/2]]; Nest[f, {1}, 41] (* Robert G. Wilson v, Jul 07 2006 *)
PROG
(PARI) v=vector(100); s=v[1]=1; for(i=2, #v, s+=(v[i]=(s+1)\2)); v \\ Charles R Greathouse IV, Feb 11 2011
(Haskell)
a073941 n = a073941_list !! (n-1)
a073941_list = 1 : f [1] where
f xs = x' : f (x':xs) where x' = (1 + sum xs) `div` 2
-- Reinhard Zumkeller, Oct 26 2011
(Python)
from itertools import islice
def A073941_gen(): # generator of terms
a, c = 1, 0
yield 1
while True:
yield (a:=(c:=c+a)+1>>1)
A073941_list = list(islice(A073941_gen(), 70)) # Chai Wah Wu, Sep 20 2022
CROSSREFS
Same as log_2(A082125(n)), for n > 2. - Ralf Stephan, Apr 16 2002
Apart from initial term, same as A005428, which has further information.
a(n+4) = A079719(n)+2. Cf. A082416.
Partial sums for various start indices are in A006999, A061419, A061418. - Ralf Stephan, Apr 17 2003
Is this the same as A081848/3?
The constant c is (2/9)*K(3) (see A083286). - Ralf Stephan, May 29 2003
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Nov 20 2002
STATUS
approved
a(n) = ceiling((1 + sum of preceding terms) / 2) starting with a(0) = 1.
(Formerly M0572)
+10
24
1, 1, 2, 3, 4, 6, 9, 14, 21, 31, 47, 70, 105, 158, 237, 355, 533, 799, 1199, 1798, 2697, 4046, 6069, 9103, 13655, 20482, 30723, 46085, 69127, 103691, 155536, 233304, 349956, 524934, 787401, 1181102, 1771653, 2657479, 3986219, 5979328, 8968992, 13453488, 20180232, 30270348, 45405522, 68108283, 102162425, 153243637, 229865456, 344798184
OFFSET
0,3
COMMENTS
Original definition: a(0) = 1, state(0) = 2; for n >= 1, if a(n-1) is even then a(n) = 3*a(n-1)/2 and state(n) = state(n-1); if a(n-1) is odd and state(n-1) = 1 then a(n) = ceiling( 3*a(n-1)/2) and state(n) = 3 - state(n-1) and if a(n-1) is odd and state(n-1) = 2 then a(n) = floor( 3*a(n-1)/2) and state(n) = 3 - state(n-1). [See formula by M. Alekseyev for a simpler equivalent. - Ed.]
Arises from a version of the Josephus problem: sequence gives set of n where, if you start with n people and every 3rd person drops out, either it is person #1 or #2 who is left at the end. A081614 and A081615 give the subsequences where it is person #1 (respectively #2) who is left.
The state changes just when a(n) is odd: it therefore indicates whether the sum of a(0) to a(n) is odd (1 means no, 2 means yes).
The sum a(0) to a(n) is never divisible by 3 (for n >= 0); it is 1 mod 3 precisely when the sum a(0) to a(n-1) is odd and thus indicates the state at the previous step. - Franklin T. Adams-Watters, May 14 2008
The number of nodes at level n of a planted binary tree with alternating branching and non-branching nodes. - Joseph P. Shoulak, Aug 26 2012
Take Sum_{k=1..n} a(k) objects, and partition them into 3 parts. It is always possible to generate those parts using addends once each from the initial n terms, and this is the fastest growing sequence with this property. For example, taking 1+1+2+3+4+6+9 = 26 objects, if we partition them [10,9,7], we can generate these sizes as 10 = 9+1, 9 = 6+3, 7 = 4+2+1. The corresponding sequence partitioning into 2 parts is the powers of 2, A000079. In general, to handle partitioning into k parts, replace the division by 2 in the definition with division by k-1. - Franklin T. Adams-Watters, Nov 07 2015
a(n) is the number of even integers that have n+1 digits when written in base 3/2. For example, there are 2 even integers that use three digits in base 3/2: 6 and 8: they are written as 210 and 212, respectively. - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018
REFERENCES
F. Schuh, The Master Book of Mathematical Recreations. Dover, NY, 1968, page, 374, Table 18, union of columns 1 and 2 (which are A081614 and A081615).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
B. Chen, R. Chen, J. Guo, S. Lee et al., On Base 3/2 and its sequences, arXiv:1808.04304 [math.NT], 2018.
L. Halbeisen and N. Hungerbuehler, The Josephus Problem, J. Théor. Nombres Bordeaux 9(2) (1997), 303-318.
A. M. Odlyzko and H. S. Wilf, Functional iteration and the Josephus problem, Glasgow Math. J. 33 (1991), 235-240.
Eric Weisstein's World of Mathematics, Josephus Problem.
Wikipedia, Josephus problem.
FORMULA
a(0) = 1; a(n) = ceiling((1 + Sum_{k=0..n-1} a(k)) / 2). - Don Reble, Apr 23 2003
a(1) = 1, s(1) = 2, and for n > 1, a(n) = floor((3*a(n-1) + s(n-1) - 1) / 2), s(n) = (s(n-1) + a(n)) mod 3. - Max Alekseyev, Mar 28 2009
a(n) = floor(1 + (sum of preceding terms)/2). - M. F. Hasler, Oct 14 2012
EXAMPLE
n........0...1...2...3...4...5...6...7...8...9..10..11..12..13..14.
state=1......1...........4...6...9..........31.....70..105.........
state=2..1.......2...3..............14..21......47.........158..237
MATHEMATICA
f[s_] := Append[s, Ceiling[(1 + Plus @@ s)/2]]; Nest[f, {1}, 40] (* Robert G. Wilson v, Jul 07 2006 *)
nxt[{t_, a_}]:=Module[{c=Ceiling[(1+t)/2]}, {t+c, c}]; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, Nov 05 2017 *)
PROG
(PARI) { a=1; s=2; for(k=1, 50, print1(a, ", "); a=(3*a+s-1)\2; s=(s+a)%3; ) } \\ Max Alekseyev, Mar 28 2009
(PARI) s=0; vector(50, n, -s+s+=s\2+1) \\ M. F. Hasler, Oct 14 2012
(Haskell)
a005428 n = a005428_list !! n
a005428_list = (iterate j (1, 1)) where
j (a, s) = (a', (s + a') `mod` 2) where
a' = (3 * a + (1 - s) * a `mod` 2) `div` 2
-- Reinhard Zumkeller, May 10 2015 (fixed), Oct 26 2011
(Python)
from itertools import islice
def A005428_gen(): # generator of terms
a, c = 1, 0
yield 1
while True:
yield (a:=1+((c:=c+a)>>1))
A005428_list = list(islice(A005428_gen(), 30)) # Chai Wah Wu, Sep 21 2022
CROSSREFS
Cf. A005427, A073941, A082416. Union of A081614 and A081615.
First differences of D_3(n) (A061419) in the terminology of Odlyzko and Wilf. - Ralf Stephan, Apr 23 2002
Same as log_2(A082125(n+3)). - Ralf Stephan, Apr 16 2002
Apart from initial terms, same as A073941, which has further information.
a(n) is the number of positive even k for which A024629(k) has n+1 digits. - Glen Whitney, Jul 09 2017
Partial sums are in A061419, A061418, A006999.
KEYWORD
nonn,easy,nice,changed
EXTENSIONS
More terms from Hans Havermann, Apr 23 2003
Definition replaced with a simpler formula due to Don Reble, by M. F. Hasler, Oct 14 2012
STATUS
approved
Subsequence of A005428 where state = 2.
+10
5
1, 2, 3, 14, 21, 47, 158, 237, 533, 1199, 4046, 6069, 13655, 46085, 103691, 1181102, 1771653, 3986219, 102162425, 229865456, 344798184, 517197276, 775795914, 1163693871, 3927466814, 5891200221, 13255200497, 29824201118, 44736301677, 100656678773, 226477527239, 764361654431, 2579720583704, 3869580875556, 5804371313334, 8706556970001, 19589753182502, 29384629773753, 66115416990944, 99173125486416
OFFSET
0,2
COMMENTS
Excluding the initial 1, the values of n such that A054995(n) = 2. - Ryan Brooks, Jul 17 2020
From Petros Hadjicostas, Jul 20 2020: (Start)
From a(1) = 2 to a(22) = 775795914, the values appear in Table 18 (p. 374) in Schuh (1968) under the Survivor No. 2 column (in a variation of Josephus's counting off game where m people on a circle are labeled 1 through m and every third person drops out).
a(23) here is 1163693871 but 1063693871 in Schuh (1968). Burde (1987) agrees with Schuh (1968). See the table on p. 207 of the paper (with q = 1).
It seems Schuh (1968) made a calculation error and Burde (1987) copied it. See my comment for A073941 for more details. (End)
REFERENCES
Fred Schuh, The Master Book of Mathematical Recreations, Dover, New York, 1968. [See Table 18, p. 374.]
LINKS
K. Burde, Das Problem der Abzählreime und Zahlentwicklungen mit gebrochenen Basen [The problem of counting rhymes and number expansions with fractional bases], J. Number Theory 26(2) (1987), 192-209. [The author deals with the representation of n in fractional bases k/(k-1) and its relation to counting-off games. Here k = 3. See the table on p. 207. See also the review in MathSciNet (MR0889384) by R. G. Stoneham.]
PROG
(PARI) /* In the program below, we use a truncated version of either A005428 or A073941 and choose those terms that correspond to "state" or "number of last survivor" equal to 2. See A073941 or Schuh (1968) for more details. */
first(n) = {my(res = vector(n), t = 1, wn = wo = gn = go = 2); res[1] = 1; for(i = 1, oo, c = wo % 2; if(go == 2, t++; res[t] = wo; if(t >= n, return(res))); wn = floor(wo*3/2) + c * (2 - go); gn = 3 * c + go * (-1)^c; wo = wn; go = gn; )} \\ David A. Corneth and Petros Hadjicostas, Jul 21 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 23 2003
EXTENSIONS
More terms from Hans Havermann, Apr 23 2003
STATUS
approved
a(n) is half the n-th term of a truncated sesquinary (base 3/2) tree.
+10
3
1, 4, 2, 6, 10, 3, 13, 9, 22, 15, 121, 7, 5, 67, 20, 31, 14, 33, 76, 34, 23, 409, 182, 16, 11, 40, 8, 151, 101, 30, 46, 70, 47, 21, 49, 112, 50, 114, 172, 51, 175, 52, 35, 1381, 614, 273, 616, 24, 37, 25, 17, 60, 91, 12, 19, 340, 227, 769, 152, 45, 103, 69, 157
OFFSET
1,2
COMMENTS
The tree is created by planting a tree with alternating branching and nonbranching nodes (as described in A005428). The nodes are then labeled in order -- 1,2,3,4,... All odd nodes are removed, leaving an infinite binary tree of every even number. Finally, each node is divided by two. The first four rows of the resultant tree are as follows:
1
4 2
6 10 3 13
9 22 15 121 7 5 67 20
...
The first number of the n-th row, a(2^(n-1)), is A081614(n). The last number of the n-th row is A182459(n). The lowest number of the n-th row is A061419(n). It appears that when n is even, A189706(a(n)+1) = 0, and when n is odd A189706(a(n)+1) = 1. This is true for at least the first n = 1 through 40000.
MAPLE
a:= proc(n) option remember;
a(iquo(n, 2))*3 + irem(n, 2);
while %::odd do ceil(% * 3/2) od; %/2
end: a(1):=1:
seq(a(n), n=1..63); # Alois P. Heinz, May 29 2021
MATHEMATICA
a[n_] := a[n] = Module[{t}, t = a[Quotient[n, 2]]*3 + Mod[n, 2];
While[OddQ[t], t = Ceiling[t * 3/2] ]; t/2]; a[1] = 1;
Table[a[n], {n, 1, 63}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
PROG
(Java) See Links.
(PARI) a(n) = my(t=1); forstep(i=logint(n, 2)-1, 0, -1, t=3*t+1+bittest(n, i); my(k=valuation(t, 2)); t=(t*3^k)>>(k+1)); t; \\ Kevin Ryde, May 29 2021
CROSSREFS
Inverse is A345671.
KEYWORD
nonn,look
AUTHOR
John-Vincent Saddic, May 28 2021
STATUS
approved

Search completed in 0.009 seconds