A323832
Start with n and repeatedly double it and apply the "repeatedly delete any run of identical digits" operation described in A323830; a(n) is the number of steps needed to reach one of 0, 1, or 5, or -1 if none of these three numbers is ever reached.
Original entry on oeis.org
0, 0, 19, 12, 18, 0, 11, 23, 17, 4, 19, 1, 10, 29, 22, 32, 16, 5, 3, 47, 18, 15, 1, 20, 9, 2, 28, 26, 21, 13, 31, 24, 15, 1, 4, 23, 2, 18, 46, 21, 17, 51, 14, 15, 1, 24, 19, 2, 8, 10, 1, 33, 27, 24, 25, 1, 20, 19, 12, 18, 30, 1, 23, 7, 14, 29, 5, 20, 3
Offset: 0
Starting with 2, the trajectory is 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 636, 1272, 25, 50, 1, reaching 1 in 20 steps, so a(2) = 20.
3 reaches 1 in 12 steps: 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 61, 1, so a(3) = 12.
10 reaches 5 in 19 steps: 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 6360, 12720, 250, 5, so a(10) = 19.
-
from re import split
def A321801(n):
return int('0'+''.join(d for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)',str(n)) if d != '' and d != None and len(d) == 1))
def f(n):
x = 2*n
y = A321801(x)
while x != y:
x, y = y, A321801(y)
return x
def A323832(n):
mset, m, c = set(), n, 0
while True:
if m == 1 or m == 0 or m == 5:
return c
m = f(m)
if m in mset:
return -1
mset.add(m)
c += 1 # Chai Wah Wu, Feb 04 2019, Feb 11 2019
A320487
a(0) = 1; thereafter a(n) is obtained by applying the "delete multiple digits" map m -> A320485(m) to 2*a(n-1).
Original entry on oeis.org
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 61, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 61, 1
Offset: 0
2*32768 = 65536 -> 3 since we delete the multiple digits 6 and 5.
2*61 = 122 -> 1 since we delete the multiple 2's.
- Eric Angelini, Posting to Sequence Fans Mailing List, Oct 24 2018
- N. J. A. Sloane, Coordination Sequences, Planing Numbers, and Other Recent Sequences (II), Experimental Mathematics Seminar, Rutgers University, Jan 31 2019, Part I, Part 2, Slides. (Mentions this sequence)
See
A035615 for a classic related base-2 sequence.
-
a[0] = 1;a[n_] := a[n] = FromDigits[First /@ Select[ Tally[IntegerDigits[2 a[n - 1]]], #[[2]] == 1 &]];Table[a[n], {n, 0, 56}] (* Stan Wagon, Nov 17 2018 *)
-
A=[2];for(i=1,99,A=concat(A,A320486(A[#A]*2)));A \\ M. F. Hasler, Oct 24 2018
A035615
Number of winning length n strings with a 2-symbol alphabet in "same game".
Original entry on oeis.org
1, 0, 2, 2, 6, 12, 26, 58, 126, 278, 602, 1300, 2774, 5878, 12350, 25778, 53470, 110332, 226610, 463602, 945214, 1921550, 3896642, 7885092, 15927086, 32121582, 64697726, 130166378, 261637446, 525478668, 1054673162, 2115601450, 4241716734, 8501080838, 17031744170
Offset: 0
11011001 is a winning string since 110{11}001 -> 11{000}1 -> {111} -> null.
- Robert Price, Table of n, a(n) for n = 0..1000
- Chris Burns and Benjamin Purcell, A note on Stephan's conjecture 77, preprint, 2005. [Cached copy]
- Chris Burns and Benjamin Purcell, Counting the number of winning strings in the 1-dimensional same game, Fibonacci Quarterly, 45(3) (2007), 233-238.
- Sascha Kurz, Polynomials for same game, pdf.
- Ralf Stephan, Prove or disprove: 100 conjectures from the OEIS, arXiv:math/0409509 [math.CO], 2004.
- Index entries for linear recurrences with constant coefficients, signature (4, -2, -8, 6, 6, -3, -2).
See
A309874 for the losing strings.
-
Join[{1}, Rest[CoefficientList[Series[x (2x^6 - 6x^5 + 8x^4 + 2x^3 - 6x^2 + 2x)/((1 - x^2)(1 - 2x)(1 - x - x^2)^2), {x, 0, 40}], x]]] (* or *) Join[{1}, LinearRecurrence[{4, -2, -8, 6, 6, -3, -2}, {0, 2, 2, 6, 12, 26, 58}, 40]] (* Harvey P. Dale, Sep 26 2012 *)
-
a(n)=if(n, ([0,1,0,0,0,0,0; 0,0,1,0,0,0,0; 0,0,0,1,0,0,0; 0,0,0,0,1,0,0; 0,0,0,0,0,1,0; 0,0,0,0,0,0,1; -2,-3,6,6,-8,-2,4]^(n-1)*[0;2;2;6;12;26;58])[1,1], 1) \\ Charles R Greathouse IV, Jun 15 2015
A323831
a(0) = 5; thereafter a(n) is obtained by doubling a(n-1) and repeatedly deleting any string of identical digits.
Original entry on oeis.org
5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 6360, 12720, 250, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 6360, 12720, 250
Offset: 0
- Paolo Xausa, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
-
dad[n_]:=FromDigits[FixedPoint[Flatten[Select[Split[#],Length[#]==1&]]&,IntegerDigits[2n]]];NestList[dad,5,100] (* Paolo Xausa, Nov 14 2023 *)
Showing 1-4 of 4 results.
Comments