cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-30 of 32 results. Next

A323830 a(0) = 1; thereafter a(n) is obtained by doubling a(n-1) and repeatedly deleting any string of identical digits.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 636, 1272, 25, 50, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 636, 1272, 25, 50, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 636, 1272, 25, 50
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2019, following a suggestion from Yukun Yao

Keywords

Comments

Periodic with period length 20.
Conjecture: If we start with any nonnegative number, and repeatedly double it and apply the "repeatedly delete any run of identical digits" operation described here, we eventually reach one of 0, 1, or 5.
In other words, the conjecture is that eventually we reach 0 or join the trajectory shown here or the trajectory shown in A323831.
The number of steps to reach 0, 1, or 5 is given in A323832.

Examples

			After a(15) = 32768 we get 65536 which becomes 636 after deleting "55". Then doubling 636 we get 1272, then 2544 which becomes 25 after deleting "44", then 50, then 100 which becomes 1 after deleting "00", and now the sequence repeats.
		

Crossrefs

See A035615 for a classic related base-2 sequence.

Programs

  • Mathematica
    dad[n_]:=FromDigits[FixedPoint[Flatten[Select[Split[#],Length[#]==1&]]&,IntegerDigits[2n]]];NestList[dad,1,100] (* Paolo Xausa, Nov 14 2023 *)
  • PARI
    Vec((1 + 2*x)*(1 + 4*x^2 + 16*x^4 + 64*x^6 + 256*x^8 + 1024*x^10 + 4096*x^12 + 16384*x^14 + 636*x^16 + 25*x^18) / (1 - x^20) + O(x^40)) \\ Colin Barker, Feb 03 2019

Formula

From Colin Barker, Feb 03 2019: (Start)
G.f.: (1 + 2*x)*(1 + 4*x^2 + 16*x^4 + 64*x^6 + 256*x^8 + 1024*x^10 + 4096*x^12 + 16384*x^14 + 636*x^16 + 25*x^18) / (1 - x^20).
a(n) = a(n-20) for n>19.
(End)
a(n+1) = A321801(2*a(n)). For general numbers, the "repeatedly delete any run of identical digits" operation corresponds to repeatedly applying A321801. - Chai Wah Wu, Feb 11 2019

A007212 Oscillates under partition transform.

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 7, 11, 12, 16, 18, 25, 28, 36, 41, 53, 59, 73, 82, 102, 115, 138, 155, 186, 209, 246, 275, 324, 363, 420, 468, 541, 605, 691, 768, 877, 976, 1103, 1222, 1380, 1530, 1716, 1895, 2122, 2343, 2609, 2872, 3192, 3514, 3890, 4269, 4716, 5172, 5697
Offset: 1

Views

Author

Keywords

Comments

Georg Fischer observes that A027595 and A007212 appear to be identical - is this a theorem? - N. J. A. Sloane, Oct 17 2018
In reply to the above, no they are different, although the first difference probably does not occur until n=5935. The difference arises due to the handling of multiples of 5 in the respective transforms as explained in A027596. In particular, since A007213(50)=5936 while A027595(50)=5935, this sequence will differ from A007212 at n=5935. - Sean A. Irvine, Nov 10 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A027595 Sequence satisfies T^2(a)=a, where T is defined below.

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 7, 11, 12, 16, 18, 25, 28, 36, 41, 53, 59, 73, 82, 102, 115, 138, 155, 186, 209, 246, 275, 324, 363, 420, 468, 541, 605, 691, 768, 877, 976, 1103, 1222, 1380, 1530, 1716, 1895, 2122, 2343, 2609, 2872, 3192, 3514, 3890, 4269, 4716, 5172, 5697
Offset: 1

Views

Author

Keywords

Comments

Georg Fischer observes that A027595 and A007212 appear to be identical - is this a theorem? - N. J. A. Sloane, Oct 17 2018
In reply to the above, no they are different, although the first difference probably does not occur until n=5935. The difference arises due to the handling of multiples of 5 in the respective transforms as explained in A027596. In particular, since A007213(50)=5936 while A027595(50)=5935, this sequence will differ from A007212 at n=5935. - Sean A. Irvine, Nov 10 2019

References

  • S. Viswanath (student, Dept. Math, Indian Inst. Technology, Kanpur) A Note on Partition Eigensequences, preprint, Nov 15 1996.

Crossrefs

Cf. A027595.

Formula

Define T:a->b by: given a1<=a2<=..., let b(n) = number of ways of partitioning n into parts from a1, a2, ... such that parts = 0 mod 5 do not occur more than once.
A027595 = T(A027596). - Sean A. Irvine, Nov 10 2019

Extensions

More terms and offset corrected by Sean A. Irvine, Nov 10 2019

A303981 Coordination sequence for a node with global 8-fold symmetry in the Ammann-Beenker tiling (also known as the Standard Octagonal tiling).

Original entry on oeis.org

1, 8, 16, 32, 32, 40, 48, 72, 64, 96, 80, 104, 112, 112, 128, 152, 160, 144, 160, 168, 192, 216, 176, 208, 224, 232, 256, 240, 272, 264, 256, 296, 304, 336, 288, 312, 352, 320, 416, 312, 384, 392, 352, 432, 400, 456, 400, 416, 464, 440, 544, 416, 496, 488, 480
Offset: 0

Views

Author

Rémy Sigrist, May 04 2018

Keywords

Comments

Although there are infinitely many inequivalent vertices with local eight-fold symmetry in the tiling, there is (presumably) a unique vertex with global eight-fold symmetry, which makes this sequence well-defined. - N. J. A. Sloane, Oct 20 2018

References

  • F. P. M. Beenker, Algebraic theory of non-periodic tilings of the plane by two simple building blocks: a square and a rhombus, Eindhoven University of Technology 1982, TH-Report, 82-WSK04.
  • A. Bellos and E. Harriss, Patterns of the Universe: A Coloring Adventure in Math and Beauty, unnumbered pages, 2015. See illustration about halfway through the book.

Crossrefs

Cf. A302841, A302842, A304033 (partial sums).

A319419 In binary expansion of n, delete one symbol from each run. Set a(n)=-1 if the result is the empty string.

Original entry on oeis.org

-1, -1, -1, 1, 0, -1, 1, 3, 0, 0, -1, 1, 2, 1, 3, 7, 0, 0, 0, 1, 0, -1, 1, 3, 4, 2, 1, 3, 6, 3, 7, 15, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, -1, 1, 2, 1, 3, 7, 8, 4, 2, 5, 2, 1, 3, 7, 12, 6, 3, 7, 14, 7, 15, 31, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, 0, 1, 2, 1, 3, 7, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Sep 21 2018

Keywords

Comments

If the binary expansion of n is 1^b 0^c 1^d 0^e ..., then a(n) is the number whose binary expansion is 1^(b-1) 0^(c-1) 1^(d-1) 0^(e-1) .... Leading 0's are omitted, and if the result is the empty string, here we set a(n) = -1. See A318921 for a version which represents the empty string by 0.
Lenormand refers to this operation as planing ("raboter") the runs (or blocks) of the binary expansion.
A175046 expands the runs in a similar way, and a(A175046(n)) = A001477(n). - Andrew Weimholt, Sep 08 2018 (Comment copied from A318921.)
a(n) = -1 iff n in A000975.

Examples

			n / "planed" string / a(n)
0 e -1 (e = empty string)
1 e -1
10 e -1
11 1 1
100 0 0
101 e -1
110 1 1
111 11 3
1000 00 0
1001 0 0
1010 e -1
1011 1 1
1100 10 2
1101 1 1
1110 11 3
1111 111 7
10000 000 0
...
		

Crossrefs

Programs

  • Maple
    r:=proc(n) local t1, t2, L, len, i, j, k, b1;
    if n <= 2 then return(-1); fi;
    b1:=[]; t1:=convert(n, base, 2); L:=nops(t1); p:=1; len:=1;
    for i from 2 to L do
    t2:=t1[L+1-i];
    if (t2=p) and (i1 then for j from 1 to len-1 do b1:=[op(b1), p]; od: fi;
       p:=t2; len:=1;
    fi;               od;
    if nops(b1)=0 then return(-1);
    else k:=b1[1];
    for i from 2 to nops(b1) do k:=2*k+b1[i]; od;
    return(k);
    fi;
    end;
    [seq(r(n), n=0..120)];
  • Python
    from re import split
    def A319419(n):
        s = ''.join(d[:-1] for d in split('(0+)|(1+)',bin(n)[2:]) if d not in {'','0','1',None})
        return -1 if s == '' else int(s,2) # Chai Wah Wu, Sep 24 2018
    
  • Python
    from itertools import groupby
    def a(n):
        s = "".join(k*(len(list(g))-1) for k, g in groupby(bin(n)[2:]))
        return int(s, 2) if s != "" else -1
    print([a(n) for n in range(82)]) # Michael S. Branicky, Jun 01 2025

A319434 Take Golomb's sequence A001462 and shorten all the runs by 1.

Original entry on oeis.org

2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2018

Keywords

Comments

In other words, apply Lenormand's "raboter" transformation (see A318921) to A001462.
Each value of n (n >= 2) appears exactly A001462(n)-1 times.
There should be a simple formula for a(n), just as there is for Golomb's sequence. - N. J. A. Sloane, Nov 15 2018. After 10000 terms, a(n) seems to be growing like constant*n^0.640. - N. J. A. Sloane, Jun 04 2021

Examples

			Golomb's sequence begins 1, 2,2, 3,3, 4,4,4, 5,5,5, ...
and we just shorten each run by one term, getting 2, 3, 4,4, 5,5, ...
		

Crossrefs

Formula

a(n) = A001462(A001462(A001462(n) + n) + n). - Alan Michael Gómez Calderón, Aug 14 2025

Extensions

More terms from Rémy Sigrist, Oct 04 2018

A321008 a(1)=1; thereafter a(n) is obtained by applying Eric Angelini's remove-repeated-digits map, x->A320486(x), to n*a(n-1), stopping when 0 is reached.

Original entry on oeis.org

1, 2, 6, 24, 120, 720, 54, 432, 3, 30, 0
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2018

Keywords

Examples

			a(6)=720, so for a(7) we compute 7*720 = 5040 which becomes 54 = a(7).
		

References

  • Eric Angelini, Posting to Sequence Fans Mailing List, Oct 24 2018

Crossrefs

A321020 A hybrid of Kolakoski's sequence A000002 and Golomb's sequence A001462: if A001462(n) is odd replace it with 1, if even with 2.

Original entry on oeis.org

1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 11 2018

Keywords

Comments

This is A000002 rewritten so the run lengths are given by A001462.
The companion sequence, A001462 rewritten so the run lengths are given by A000002, seems to be A156253.
Note that Kolakoski's sequence A000002 and Golomb's sequence A001462 have very similar definitions, although the asymptotic behavior of A001462 is well-understood, while that of A000002 is a mystery. The asymptotic behavior of the two hybrids A156253 and A321020 might be worth investigating.

Crossrefs

Programs

  • PARI
    a = vector(84, k, k); for (i=1, oo, for (j=1, a[i], a[n++] = i; print1 (2-(i%2) ", "); if (n==#a, break(2)))) \\ Rémy Sigrist, Nov 12 2018

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

Views

Author

N. J. A. Sloane, Feb 03 2019

Keywords

Comments

Periodic with period length 20.
Conjecture: If we start with any nonnegative number, and repeatedly double it and apply the "repeatedly delete any run of identical digits" operation described here, we eventually reach one of 0, 1, or 5.
In other words, the conjecture is that eventually we reach 0 or join the trajectory shown here or the trajectory shown in A323830.
The number of steps to reach 0, 1, or 5 is given in A323832.

Crossrefs

Programs

  • Mathematica
    dad[n_]:=FromDigits[FixedPoint[Flatten[Select[Split[#],Length[#]==1&]]&,IntegerDigits[2n]]];NestList[dad,5,100] (* Paolo Xausa, Nov 14 2023 *)

Formula

a(n+1) = A321801(2*a(n)). For general numbers, the "repeatedly delete any run of identical digits" operation corresponds to repeatedly applying A321801. - Chai Wah Wu, Feb 11 2019

A323835 Start with n and repeatedly double it and apply the "delete multiple digits" map m -> A320485(m); a(n) is the number of steps needed to reach either 0 or 1, or -1 if neither 0 nor 1 is ever reached.

Original entry on oeis.org

0, 0, 27, 12, 26, 41, 11, 31, 25, 4, 40, 1, 10, 37, 30, 43, 24, 35, 3, 42, 39, 15, 1, 20, 9, 2, 36, 26, 29, 13, 42, 32, 23, 1, 34, 44, 2, 18, 41, 21, 38, 45, 14, 15, 1, 45, 19, 2, 8, 30, 1, 20, 35, 2, 25, 1, 28, 27, 12, 26, 41, 1, 31, 43, 22, 34, 5, 20, 33, 30
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2019

Keywords

Comments

The first values of k for which a(k) = -1 are 91, 182, 364, 455, 728, 910, 1456, 1729, 1820, 1853, 1879. - Giovanni Resta, Feb 04 2019
From Chai Wah Wu, Feb 04 2019: (Start)
a(n) <= 64 for all n.
Let f(n) = A320486(2*n) and k = 9876543210. If n > k/2, then f(n) <= k. Note that a(n) = a(f(n)) + 1 if a(f(n)) >= 0 and a(n) = -1 if a(f(n)) = -1.
If k/2 < n <= k, then f(n) <= n*198/1000 < k/2. Thus if n > k, f(f(n)) <= k/2.
This means that we only need to study trajectories for 0 <= n <= k. The longest trajectories in this range have 64 steps and are reached by the 9 numbers 1233546907, 1323546907, 1335246907, 1335467407, 1335469072, 1335469207, 1335471907, 1337046907, 2133546907. The first application of f(.) takes all these numbers to the number 26709381, which then follows 63 steps to 1. Since these 9 numbers all have a double digit 3, they are not in the range of f and thus not part of a longer trajectory. Thus for all n > k, a(f(n)) <= 63, and a(n) <= 64.
There are 74801508 numbers in the range 0 <= n <= k such that a(n) = -1.
(End)
All trajectories will reach one of four cycles: 0, 1, 91, or 910. - Chai Wah Wu, Feb 11 2019

Examples

			As we can see from A320487, 2 reaches 1 in 27 steps: 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, so a(2)=27.
		

Crossrefs

Programs

  • Python
    def A323835(n):
        mset, m, c = set(), n, 0
        while True:
            if m == 0 or m == 1:
                return c
            m = int('0'+''.join(d if str(2*m).count(d) == 1 else '' for d in str(2*m)))
            if m in mset:
                return -1
            mset.add(m)
            c += 1  # Chai Wah Wu, Feb 04 2019

Extensions

More terms from David Consiglio, Jr., Feb 04 2019
Previous Showing 21-30 of 32 results. Next