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 11-20 of 27 results. Next

A213974 List of imprimitive words over the alphabet {2,3}.

Original entry on oeis.org

22, 33, 222, 333, 2222, 2323, 3232, 3333, 22222, 33333, 222222, 223223, 232232, 232323, 233233, 322322, 323232, 323323, 332332, 333333, 2222222, 3333333, 22222222, 22232223, 22322232, 22332233, 23222322, 23232323, 23322332, 23332333, 32223222, 32233223, 32323232, 32333233, 33223322, 33233323, 33323332, 33333333
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2012

Keywords

Comments

A word w is primitive if it cannot be written as u^k with k>1; otherwise it is imprimitive.
The {0,1} version of this sequence is 00, 11, 000, 111, 0000, 0101, 1010, 1111, 00000, 11111, 000000, 001001, 010010, 010101, 011011, 100100, 101010, 101101, 110110, 111111 but this cannot be included as a sequence in the OEIS since it contains nonzero "numbers" beginning with 0.
This sequence results from A213973 by replacing each digit 1 by 2, and from A213972 by replacing all digits 2 by 3 and all digits 1 by 2. - M. F. Hasler, Mar 10 2014

References

  • A. de Luca and S. Varricchio, Finiteness and Regularity in Semigroups and Formal Languages, Monographs in Theoretical Computer Science, Springer-Verlag, Berlin, 1999. See p. 10.

Crossrefs

Programs

  • PARI
    for(n=1, 8, p=vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [2, 3]), is_A239017(m=d*p)||print1(m", "))) \\ M. F. Hasler, Mar 10 2014

Formula

Equals A032810 intersect A239018. - M. F. Hasler, Mar 10 2014

Extensions

More terms from M. F. Hasler, Mar 10 2014

A143967 Numbers containing only digits 3 or 7 in decimal representation.

Original entry on oeis.org

3, 7, 33, 37, 73, 77, 333, 337, 373, 377, 733, 737, 773, 777, 3333, 3337, 3373, 3377, 3733, 3737, 3773, 3777, 7333, 7337, 7373, 7377, 7733, 7737, 7773, 7777, 33333, 33337, 33373, 33377, 33733, 33737, 33773, 33777, 37333, 37337, 37373, 37377
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2008

Keywords

Comments

See A020463 for primes.

Crossrefs

Programs

  • Haskell
    a143967 = f 0 . (+ 1) where
       f y 1 = a004086 y
       f y x = f (10 * y + 3 + 4 * r) x' where (x', r) = divMod x 2
    -- Reinhard Zumkeller, Mar 18 2015
  • Mathematica
    Table[FromDigits/@Tuples[{3,7},n],{n,5}]//Flatten (* Harvey P. Dale, Aug 28 2017 *)

Formula

a(n) = f(n+1, 0) with f(n, x) = if n=1 then A004086(x) else f(floor(n/2), 10*x + 3 + 4*(n mod 2)).

A248907 Numbers consisting only of digits 2 and 3, ordered according to the value obtained when the digits are interspersed with (right-associative) ^ operators.

Original entry on oeis.org

2, 3, 22, 23, 32, 222, 33, 322, 223, 232, 323, 332, 2222, 3222, 233, 333, 2322, 3322, 2223, 3223, 2232, 3232, 2323, 3323, 2332, 3332, 22222, 32222, 23222, 33222, 2233, 3233, 2333, 3333, 22322, 32322, 23322, 33322, 22223, 32223, 23223, 33223, 22232, 32232
Offset: 1

Views

Author

Keywords

Comments

A256179(n) is found by treating the digits of a(n) as power towers. So for example, a(11) = 323, so A256179(11) = 6561 because 3^(2^3) = 6561. - Bob Selcoe, Mar 18 2015
This is a permutation of the list A032810 (numbers having only digits 2 and 3) in the sense that is a list with exactly the same terms but in different order, namely such that the ("power tower") function A256229 yields an increasing sequence. The permutation of the indices is given by A185969, cf. formula. - M. F. Hasler, Mar 21 2015

Crossrefs

For another version, see A299229 (each digit is a separate term).

Programs

  • Haskell
    a248907 = a032810 . a185969
    
  • Mathematica
    ClearAll[a, p];
    p[d_, n_] := d 10^IntegerLength[n] + n;
    a[n_ /; n <= 12] := a[n] = {2, 3, 22, 23, 32, 222, 33, 322, 223, 232, 323, 332}[[n]];
    a[n_ /; OddQ[n]]  := a[n] = p[2, a[(n - 1)/2]];
    a[n_] := a[n] = p[3, a[(n - 2)/2]];
    Array[a, 100]
  • PARI
    vecsort(A032810,(a,b)->A256229(a)>A256229(b)) \\ Assuming that A032810 is defined as a vector. Append [1..N] if the vector A032810 has too many (thus too large) elements: recall that 33333 => 3^(3^(3^(3^3))). - M. F. Hasler, Mar 21 2015

Formula

a(n) = A032810(A185969(n)).

Extensions

Edited by M. F. Hasler, Mar 21 2015

A256077 Repeat 2^d times the repunit A002275(d); d = 1, 2, 3...

Original entry on oeis.org

1, 1, 11, 11, 11, 11, 111, 111, 111, 111, 111, 111, 111, 111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111, 11111
Offset: 1

Views

Author

M. F. Hasler, Mar 21 2015

Keywords

Comments

Yields the length of the n-th (nonempty) binary word (or word over any 2-letter alphabet, like A007931 or A032810 or A032834) in tally mark notation (A000042).

Programs

  • Mathematica
    lim = 5; lst = Table[(10^n - 1)/9, {n, 0, lim}]; Reap@ For[i = 1, i <= lim, i++, Sow@ Table[lst[[i + 1]], {d, 2^i}]] // Flatten // Rest (* Michael De Vlieger, Apr 01 2015 *)
  • PARI
    a(n)=10^#binary(n+1)\90
    
  • Python
    def A256077(n): return (10**((n+1).bit_length()-1)-1)//9 # Chai Wah Wu, Nov 07 2024

Formula

a(n) = A002275(A000523(n+1)) = A032810(n)-A007931(n) = A032834(n)-A032810(n), etc.

A284634 Numbers with digits 4 and 6 only.

Original entry on oeis.org

4, 6, 44, 46, 64, 66, 444, 446, 464, 466, 644, 646, 664, 666, 4444, 4446, 4464, 4466, 4644, 4646, 4664, 4666, 6444, 6446, 6464, 6466, 6644, 6646, 6664, 6666, 44444, 44446, 44464, 44466, 44644, 44646, 44664, 44666, 46444, 46446, 46464, 46466, 46644, 46646
Offset: 1

Views

Author

Jaroslav Krizek, Apr 02 2017

Keywords

Comments

All terms are even.

Crossrefs

Numbers n with digits 6 and k only for k = 0 - 5 and 7 - 9: A204093 (k = 0), A284293 (k = 1), A284632 (k = 2), A284633 (k = 3), this sequence (k = 4), A256291 (k = 5), A256292 (k = 7), A284635 (k = 8), A284636 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 6}]
  • Mathematica
    Table[FromDigits /@ Tuples[{4, 6}, n], {n, 5}] // Flatten (* or *)
    Select[Range@ 50000, Total@ Pick[DigitCount@ #, {0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, 0] == 0 &] (* Michael De Vlieger, Apr 02 2017 *)

Formula

a(n) = 2 * A032810(n).

A284920 Numbers with digits 2 and 4 only.

Original entry on oeis.org

2, 4, 22, 24, 42, 44, 222, 224, 242, 244, 422, 424, 442, 444, 2222, 2224, 2242, 2244, 2422, 2424, 2442, 2444, 4222, 4224, 4242, 4244, 4422, 4424, 4442, 4444, 22222, 22224, 22242, 22244, 22422, 22424, 22442, 22444, 24222, 24224, 24242, 24244, 24422, 24424
Offset: 1

Views

Author

Jaroslav Krizek, Apr 05 2017

Keywords

Comments

All terms are even.

Crossrefs

Cf. Numbers with digits 2 and k only for k = 0 - 1 and 3 - 9: A169965 (k = 0), A007931 (k = 1), A032810 (k = 3), this sequence (k = 4), A072961 (k = 5), A284632 (k = 6), A284921 (k = 7), A284922 (k = 8), A284923 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 4}]
  • Mathematica
    Flatten@ Array[FromDigits /@ Tuples[{2, 4}, #] &, 5] (* Michael De Vlieger, Apr 06 2017 *)

Formula

a(n) = 2 * A007931(n).

A239019 Numbers which are not primitive words over the alphabet {0,...,9} (when written in base 10).

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1010, 1111, 1212, 1313, 1414, 1515, 1616, 1717, 1818, 1919, 2020, 2121, 2222, 2323, 2424, 2525, 2626, 2727, 2828, 2929, 3030, 3131, 3232, 3333, 3434, 3535, 3636, 3737, 3838, 3939, 4040, 4141, 4242, 4343, 4444, 4545, 4646, 4747, 4848, 4949
Offset: 1

Views

Author

M. F. Hasler, Mar 08 2014

Keywords

Comments

A word is primitive iff it is not a power, i.e., repetition, of a subword. The only non-primitive words with a prime number of letters (here: digits) are the repdigit numbers. Thus, the first nontrivial terms of this sequence are 1010,1212,...
This sequence does *not* contain all non-primitive words over the alphabet {0,...,9}, namely, it excludes those which would be numbers with leading zeros: 00,000,0000,0101,0202,...
Lists of non-primitive words over a sub-alphabet of {1...9}, like A213972, A213973, A213974, A239018, ... are given as intersection of this with the set of all words in that alphabet, e.g., A007931, A032810, A032917, A007932, ...

Programs

  • Maple
    F:= proc(d) local p,R,q;
      R:= {seq(x*(10^d-1)/9, x=1..9)};
      for p in numtheory:-factorset(d) minus {d} do
        q:= d/p;
        R:= R union {seq(x*(10^d-1)/(10^q-1),x=10^(q-1)..10^q-1)};
      od:
      sort(convert(R,list))
    end proc:
    [seq(op(F(i)),i=2..4)]; # Robert Israel, Nov 14 2017
  • PARI
    is_A239019(n)=fordiv(#n=digits(n),L,L<#n && n==concat(Col(vector(#n/L,i,1)~*vecextract(n,2^L-1))~)&&return(1))

A256179 Sequence of power towers in ascending order, using all possible permutations of 2's and 3's.

Original entry on oeis.org

2, 3, 4, 8, 9, 16, 27, 81, 256, 512, 6561, 19683, 65536, 43046721, 134217728, 7625597484987, 2417851639229258349412352, 443426488243037769948249630619149892803, 115792089237316195423570985008687907853269984665640564039457584007913129639936
Offset: 1

Views

Author

Bob Selcoe, Mar 18 2015

Keywords

Comments

a(n) is found by treating the digits of A248907(n) as power towers, so the sequence starts 2, 3, 2^2=4, 2^3=8, 3^2=9, 2^(2^2)=16, 3^3=27, 3^(2^2)=81, 2^(2^3)=256...

Examples

			a(12) = 19683 because A248907(12) = 332, and 3^(3^2) = 19683.
a(23) = 2^3^2^3 = 11423...73952 (1976 digits), because A248907(23) = 2323.
		

Crossrefs

Programs

Formula

Recurrence: a(1)=2, a(2)=3, a(3)=2^2, a(4)=2^3, a(5)=3^2, a(6)=2^(2^2), a(7)=3^3, a(8)=3^(2^2), a(9)=2^(2^3), a(10)=2^(3^2), a(11)=3^(2^3), a(12)=3^(3^2); and for n>6, a(2n)=3^a(n-1), a(2n-1)=2^a(n-1). - Vladimir Reshetnikov, Mar 19 2015

Extensions

More terms from M. F. Hasler, Mar 19 2015

A284636 Numbers with digits 6 and 9 only.

Original entry on oeis.org

6, 9, 66, 69, 96, 99, 666, 669, 696, 699, 966, 969, 996, 999, 6666, 6669, 6696, 6699, 6966, 6969, 6996, 6999, 9666, 9669, 9696, 9699, 9966, 9969, 9996, 9999, 66666, 66669, 66696, 66699, 66966, 66969, 66996, 66999, 69666, 69669, 69696, 69699, 69966, 69969
Offset: 1

Views

Author

Jaroslav Krizek, Apr 02 2017

Keywords

Comments

All terms are composite.
All terms are divisible by 3. - Michael S. Branicky, Jun 09 2021

Crossrefs

Cf. A032810.
Numbers n with digits 6 and k only for k = 0 - 5 and 7 - 9: A204093 (k = 0), A284293 (k = 1), A284632 (k = 2), A284633 (k = 3), A284634 (k = 4), A256291 (k = 5), A256292 (k = 7), A284635 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {6, 9}]
    
  • Mathematica
    Table[FromDigits /@ Tuples[{6, 9}, n], {n, 5}] // Flatten (* or *)
    Select[Range@ 70000, Total@ Pick[DigitCount@ #, {0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, 0] == 0 &] (* Michael De Vlieger, Apr 02 2017 *)
  • PARI
    a(n) = {
      my(z, e = logint(n+1,2,&z),
         t1 = 9 * subst(Pol(binary(n+1-z),'x), 'x, 10),
         t2 = 6 * subst(Pol(binary(2*z-2-n),'x), 'x, 10));
      t1+t2;
    };
    vector(44, n, a(n)) \\ Gheorghe Coserea, Apr 04 2017
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '6').replace('1', '9'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jun 09 2021

Formula

a(n) = 3 * A032810(n).

A284921 Numbers with digits 2 and 7 only.

Original entry on oeis.org

2, 7, 22, 27, 72, 77, 222, 227, 272, 277, 722, 727, 772, 777, 2222, 2227, 2272, 2277, 2722, 2727, 2772, 2777, 7222, 7227, 7272, 7277, 7722, 7727, 7772, 7777, 22222, 22227, 22272, 22277, 22722, 22727, 22772, 22777, 27222, 27227, 27272, 27277, 27722, 27727
Offset: 1

Views

Author

Jaroslav Krizek, Apr 05 2017

Keywords

Comments

Prime terms are in A020459.

Crossrefs

Cf. Numbers with digits 2 and k only for k = 0 - 1 and 3 - 9: A169965 (k = 0), A007931 (k = 1), A032810 (k = 3), A284920 (k = 4), A072961 (k = 5), A284632 (k = 6), this sequence (k = 7), A284922 (k = 8), A284923 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 7}]
  • Mathematica
    Flatten@ Array[FromDigits /@ Tuples[{2, 7}, #] &, 5] (* Michael De Vlieger, Apr 06 2017 *)
Previous Showing 11-20 of 27 results. Next