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-4 of 4 results.

A086066 a(n) = Sum_{d in D(n)} 2^d, where D(n) = set of digits of n in decimal representation.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 3, 2, 6, 10, 18, 34, 66, 130, 258, 514, 5, 6, 4, 12, 20, 36, 68, 132, 260, 516, 9, 10, 12, 8, 24, 40, 72, 136, 264, 520, 17, 18, 20, 24, 16, 48, 80, 144, 272, 528, 33, 34, 36, 40, 48, 32, 96, 160, 288, 544, 65, 66, 68, 72, 80
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Comments

For bitwise logical operations AND and OR:
a(m) = (a(m) AND a(n)) iff D(m) is a subset of D(n),
(a(m) AND a(n)) = 0 iff D(m) and D(n) are disjoint,
a(m) = (a(m) OR a(n)) iff D(n) is a subset of D(m),
a(m) = a(n) iff D(m) = D(n);
A086067(n) = A007088(a(n)).
From Reinhard Zumkeller, Sep 18 2009: (Start)
a(A052382(n)) mod 2 = 0; a(A011540(n)) mod 2 = 1;
for n > 0: a(A000004(n))=1, a(A000042(n))=2, a(A011557(n))=3, a(A002276(n))=4, a(A111066(n))=6, a(A002277(n))=8, a(A002278(n))=16, a(A002279(n))=32, a(A002280(n))=64, a(A002281(n))=128, a(A002282(n))=256, a(A002283(n))=512;
a(n) <= 1023. (End)

Examples

			n=242, D(242) = {2,4}: a(242) = 2^2 + 2^4 = 20.
		

Programs

  • Maple
    A086066 := proc(n) local d: if(n=0)then return 1: fi: d:=convert(convert(n,base,10),set): return add(2^d[j],j=1..nops(d)): end: seq(A086066(n),n=0..64); # Nathaniel Johnston, May 31 2011

A214218 List of words over {1,2} with equal numbers of 1's and 2's.

Original entry on oeis.org

12, 21, 1122, 1212, 1221, 2112, 2121, 2211, 111222, 112122, 112212, 112221, 121122, 121212, 121221, 122112, 122121, 122211, 211122, 211212, 211221, 212112, 212121, 212211, 221112, 221121, 221211, 222111, 11112222, 11121222, 11122122, 11122212, 11122221
Offset: 1

Views

Author

N. J. A. Sloane, Jul 18 2012

Keywords

Comments

Of course the empty word also has this property.
All of these, interpreted as decimal integers are divisible by 3, because each pair of "1" and "2" contributes a digital sum of 3, hence the total is divisible by 3. Is there a semiprime in the sequence after 21? - Jonathan Vos Post, Jul 18 2012
The semiprime subsequence contains 21, 11222121, 12122211, 21221121, 22211121, 22212111, and continues with 14 10-digit entries etc. - R. J. Mathar, Jul 19 2012

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 2.

Crossrefs

Subsequence of A007931, A111066.

Programs

  • Maple
    sort([seq(seq((10^(2*d)-1)/9+add(10^i,i=s),s=combinat:-choose([$0..(2*d-1)],d)),d=1..4)]); # Robert Israel, Jan 02 2018
  • Mathematica
    Sort[FromDigits/@Flatten[Table[Permutations[PadRight[{},2n,{1,2}]],{n,3}],1]] (* Harvey P. Dale, Aug 30 2016 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations as mp
    def agen():
        for d in count(2, 2):
            for s in mp("1"*(d//2) + "2"*(d//2), d):
                yield int("".join(s))
    print(list(islice(agen(), 33))) # Michael S. Branicky, Dec 21 2021

A318700 Positive numbers that contain odd and even digits.

Original entry on oeis.org

10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 114, 116, 118, 120, 121, 122
Offset: 1

Views

Author

Enrique Navarrete, Aug 31 2018

Keywords

Comments

The sequence of first differences takes on the values {1, 2, 3} only, and each of these values occurs infinitely often (the values 1 and 2 are clear; for the value 3, note that consecutive numbers such as 199..9, 200..0 and 399..9, 400..0 that are excluded from the sequence occur infinitely often).
Numbers n such that A065031(n) is a term of A111066. - Felix Fröhlich, Sep 01 2018
Nonnegative integers excluding those such that digits in their decimal representation share all the same parity. - R. J. Cano, Sep 10 2018

Examples

			49 and 50 are in the sequence but 19 and 20 are not.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 122, Union[Mod[IntegerDigits[#], 2]] == {0, 1} &] (* Michael De Vlieger, Sep 04 2018 *)
  • PARI
    is(n) = my(d=digits(n), v=[]); if(n < 10, return(0)); for(k=1, #d, v=concat(v, [d[k]%2])); vecmin(v)!=vecmax(v) \\ Felix Fröhlich, Sep 01 2018
    
  • PARI
    See Cano link.

A380435 Erase digit 0 from decimal expansion of n. Then repeatedly apply the number of divisor function (A000005) onto each digit until a stationary value is reached. a(n) is the final stationary value (if it is reached for all digits).

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 11, 12, 12, 12, 12, 12, 12, 12, 12, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22
Offset: 1

Views

Author

Ctibor O. Zizka, Jan 24 2025

Keywords

Comments

The number of iterations is 0, 1, 2, 3 for numbers containing the highest digits (1, 2), (3,5,7), (4, 9), (6, 8). n >= a(n) >= 1.

Examples

			For n = 21 a(21) = 21.
For n = 408 we iterate 48 --> 34 --> 23 --> 22, thus, after 3 iterations, a(408) = 22.
		

Crossrefs

Programs

Formula

a(A007931(n)) = A007931(n).
For r = 1, k >= 0:
a(10^k) = 1
a((10^k - 1)/9) = (10^k - 1)/9.
For r from [2, 9], k >= 0:
a(r*10^k) = 2.
a(r*(10^k - 1)/9) = 2*(10^k - 1)/9.
Showing 1-4 of 4 results.