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.

Showing 1-7 of 7 results.

A361943 a(n) is the least multiple of n whose binary expansion is an abelian square (A272653).

Original entry on oeis.org

3, 10, 3, 36, 10, 36, 63, 136, 9, 10, 33, 36, 130, 154, 15, 528, 34, 36, 190, 520, 63, 132, 46, 528, 150, 130, 54, 588, 725, 150, 1023, 2080, 33, 34, 630, 36, 222, 190, 156, 520, 615, 588, 43, 132, 45, 46, 235, 528, 147, 150, 51, 156, 53, 54, 165, 2296, 513
Offset: 1

Views

Author

Rémy Sigrist, Mar 31 2023

Keywords

Comments

This sequence is well defined as for any n > 0, A020330(n) is a multiple of n and its binary expansion is an abelian square.

Examples

			The first terms, alongside their binary expansion, are:
  n   a(n)  bin(a(n))
  --  ----  ----------
   1     3          11
   2    10        1010
   3     3          11
   4    36      100100
   5    10        1010
   6    36      100100
   7    63      111111
   8   136    10001000
   9     9        1001
  10    10        1010
  11    33      100001
  12    36      100100
  13   130    10000010
  14   154    10011010
  15    15        1111
  16   528  1000010000
		

Crossrefs

Programs

  • PARI
    a(n) = { forstep (m = n, oo, n, my (w = #binary(m)); if (w%2==0 && hammingweight(m)==2*hammingweight(m % (2^(w/2))), return (m))) }
    
  • Python
    from itertools import count
    def a(n): return next(m for m in count(n, n) if not (w:=m.bit_length())&1 and m.bit_count() == ((m>>(w>>1)).bit_count())<<1)
    print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Mar 31 2023 after Rémy Sigrist

Formula

a(n) = A361944(n) * n.
a(n) <= A020330(n).
a(n) >= n with equality iff n belongs to A272653.

A361944 a(n) is the least k > 0 such that the binary expansion of k*n is an abelian square (A272653).

Original entry on oeis.org

3, 5, 1, 9, 2, 6, 9, 17, 1, 1, 3, 3, 10, 11, 1, 33, 2, 2, 10, 26, 3, 6, 2, 22, 6, 5, 2, 21, 25, 5, 33, 65, 1, 1, 18, 1, 6, 5, 4, 13, 15, 14, 1, 3, 1, 1, 5, 11, 3, 3, 1, 3, 1, 1, 3, 41, 9, 37, 11, 10, 3, 39, 1, 129, 2, 2, 3, 2, 9, 9, 8, 11, 3, 3, 2, 27, 2, 2, 3
Offset: 1

Views

Author

Rémy Sigrist, Mar 31 2023

Keywords

Examples

			a(8) = A361943(8)/8 = 136/8 = 17.
		

Crossrefs

Programs

  • PARI
    a(n) = { forstep (m = n, oo, n, my (w = #binary(m)); if (w%2==0 && hammingweight(m)==2*hammingweight(m % (2^(w/2))), return (m/n))) }
    
  • Python
    from itertools import count
    def a(n): return next(m//n for m in count(n, n) if not (w:= m.bit_length())&1 and m.bit_count() == ((m>>(w>>1)).bit_count())<<1)
    print([a(n) for n in range(1, 80)]) # Michael S. Branicky, Mar 31 2023 after Rémy Sigrist

Formula

a(n) = A361943(n) / n.
a(n) = 1 iff n belongs to A272653.

A272655 Numbers whose decimal expansion is an abelian square.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 1001, 1010, 1111, 1212, 1221, 1313, 1331, 1414, 1441, 1515, 1551, 1616, 1661, 1717, 1771, 1818, 1881, 1919, 1991, 2002, 2020, 2112, 2121, 2222, 2323, 2332, 2424, 2442, 2525, 2552, 2626, 2662, 2727, 2772, 2828, 2882, 2929, 2992
Offset: 1

Views

Author

N. J. A. Sloane, May 14 2016

Keywords

Comments

Decimal numbers of the form uv where the decimal digits of v are some permutation of the decimal digits of u.

Examples

			12344132 is a member because v = 4132 is a permutation of u = 1234.
		

Crossrefs

Programs

  • Python
    from sympy.utilities.iterables import multiset_permutations
    A272655_list = [int(str(n)+''.join(s)) for n in range(1,100) for s in multiset_permutations(sorted(str(n)))] # Chai Wah Wu, May 15 2016

Extensions

More terms from Chai Wah Wu, May 15 2016

A272654 Binary words beginning with 1 which are abelian squares.

Original entry on oeis.org

11, 1001, 1010, 1111, 100001, 100010, 100100, 101011, 101101, 101110, 110011, 110101, 110110, 111111, 10000001, 10000010, 10000100, 10001000, 10010011, 10010101, 10010110, 10011001, 10011010, 10011100, 10100011, 10100101, 10100110, 10101001, 10101010, 10101100
Offset: 1

Views

Author

N. J. A. Sloane, May 14 2016

Keywords

Comments

Binary strings of the form uv, where u begins with 1 and v is some permutation of u.

Crossrefs

Programs

  • Python
    from sympy.utilities.iterables import multiset_permutations
    A272654_list = [int(b+''.join(s)) for b in (bin(n)[2:] for n in range(1,100)) for s in multiset_permutations(sorted(b))] # Chai Wah Wu, May 15 2016

Extensions

More terms from Chai Wah Wu, May 15 2016

A278709 Smallest number k such that each binary string of length at least k contains an abelian square of order at least n.

Original entry on oeis.org

4, 11, 19, 27, 35, 43, 51, 63, 77, 91, 107
Offset: 1

Views

Author

Keywords

Comments

In this context, a square is a repetition of one or more digits like 11 or 101101. An abelian square allows digits in each factor to be rearranged, so 1001 and 101110 are abelian squares (of orders 2 and 3, respectively). The order of an abelian square is half its length.
Evdokimov proves that a(1) <= 25. Entringer, Jackson, & Schatz prove that a(3) = 19.
At least the first 5 terms coincide with A063215. - Omar E. Pol, Dec 06 2016
Different from A063215: A063215(6) = 41, but a(6) > 42. - Charles R Greathouse IV, Dec 07 2016

Examples

			Without loss of generality the first digit of a binary string can be assumed to be 1. If the next were also a 1 the string would be a square, 1 followed by 1, and so let the second digit be 0. If the third digit were a 0 the string would contain the square 00, so let the third digit be 1. But 1010 and 1011 both contain squares (10 and 1, respectively), and so a(1) = 4.
		

References

  • A. A. Evdokimov, Strongly asymmetric sequence generated by a finite number of symbols, Dokl. Akad. Nauk SSSR, Tom 179 (1968), pp. 1268-1271, Also in: Soviet Math. Dokl., 9 (1968) 536-539. Cited in Brown 1971.

Crossrefs

Cf. A272653.

Programs

  • PARI
    hasAbelianSquare(v,minLen)=for(len=minLen,#v\2, for(i=1,#v+1-2*len, if(sum(j=i,i+len-1,v[j])==sum(j=i+len,i+2*len-1,v[j]), return(1)))); 0
    allHaveAbelianSquares(n,k)=my(v=vector(k),t); for(i=2^(k-1),2^k-1,t=valuation(i,2)+1; v[t]=1-v[t]; if(!hasAbelianSquare(v,n), return(0))); 1
    a(n,startSearch=2*n)=for(k=startSearch,n^2+6*n, if(allHaveAbelianSquares(n,k), return(k)))

Formula

Entringer, Jackson, & Schatz prove that a(n) <= n^2 + 6n. Grant proves that a(n) >= n^2/2 . This means that lim inf a(n)/n^2 >= 1/2 and lim sup a(n)/n^2 <= 1.

Extensions

a(6)-a(10) from Jeffrey Shallit, Feb 11 2019
a(11) from Bert Dobbelaere, Mar 25 2019

A321252 (Conjecturally) the lexicographically earliest infinite sequence over {0,1,2,3} avoiding abelian squares.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 1, 0, 1, 3, 1, 0, 1, 2, 1, 3, 2, 0, 2, 1, 0, 1, 3, 0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 2, 0, 2, 3, 1, 0, 1, 2, 0, 2, 3, 2, 0, 2, 1, 2, 3, 0, 3, 2, 3, 0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 2, 1, 3, 0, 1, 0, 2, 0, 3, 0, 1, 3, 0, 3, 2
Offset: 1

Views

Author

Jeffrey Shallit, Nov 01 2018

Keywords

Comments

An abelian square is a nonempty string where the second half is a rearrangement of the first half, like the English word "reappear". To "avoid" an abelian square means to have no contiguous block of that form. Although an easy compactness argument, combined with a result of Keränen (1992) shows that the lexicographically earliest infinite string avoiding abelian squares over the alphabet {0,1,2,3} must exist, the terms provided are only conjecturally part of the described sequence, because we have no proof currently that this particular string can be extended infinitely far to the right.

Crossrefs

A360445 a(n) = Sum_{k=1..n} A178244(k-1).

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 11, 14, 15, 19, 25, 31, 35, 41, 45, 49, 50, 55, 65, 75, 85, 95, 105, 115, 120, 130, 140, 150, 155, 165, 170, 175, 176, 182, 197, 212, 232, 247, 267, 287, 302, 317, 337, 357, 372, 392, 407, 422, 428, 443, 463, 483, 498, 518, 533, 548, 554, 574, 589
Offset: 0

Views

Author

M. F. Hasler, Feb 23 2023

Keywords

Comments

Partial sums of A178244, including the empty sum as initial term, so that a(n) gives the sum of all distinct permutations of the binary representation of all numbers less than n, which is also the index where terms with first half of binary expansion equal to n (in binary) start in A272653.

Crossrefs

Programs

  • PARI
    a(n)=sum(k=1,n,A178244(k-1))
Showing 1-7 of 7 results.