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

A267940 Binary representation of the n-th iteration of the "Rule 253" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 11, 11111, 1111111, 111111111, 11111111111, 1111111111111, 111111111111111, 11111111111111111, 1111111111111111111, 111111111111111111111, 11111111111111111111111, 1111111111111111111111111, 111111111111111111111111111, 11111111111111111111111111111
Offset: 0

Views

Author

Robert Price, Jan 22 2016

Keywords

Comments

With the exception of a(1) the same as A267937, A267889, A267887 and A100706. - R. J. Mathar, Jan 24 2016

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A060576.

Programs

  • Mathematica
    rule=253; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]]],{k,1,rows}]   (* Binary Representation of Rows *)

Formula

Conjectures from Colin Barker, Jan 23 2016 and Apr 16 2019: (Start)
a(n) = 101*a(n-1)-100*a(n-2) for n>3.
G.f.: (1-90*x+10100*x^2-10000*x^3) / ((1-x)*(1-100*x)).
(End)

A287336 Numbers k, not ending in 0, such that inserting a 0 between each pair of adjacent digits results in a multiple of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 18, 45, 111, 126, 222, 285, 333, 444, 555, 666, 777, 888, 999, 1041, 1185, 1395, 1443, 1554, 1665, 1893, 1998, 2082, 2331, 2528, 2757, 2886, 3885, 4662, 4995, 6055, 6993, 7245, 10101, 11111, 11655, 12321, 12987, 13206, 13986
Offset: 1

Views

Author

Giovanni Resta, May 23 2017

Keywords

Comments

Sequence is infinite since it contains all the numbers of the form (10^(2*t+1)-1)/9, i.e., repunits with an odd number of digits, like 111, 11111, and so on (A100706).

Examples

			41499585 is a term because 401040909050805 is a multiple of 41499585.
		

Crossrefs

Cf. A285176.

Programs

  • Mathematica
    ins[n_, c_] := Block[{d = IntegerDigits[n]}, FromDigits@ Most@ Flatten@ Transpose[{d, c + 0 Range[Length@d]}]]; Select[Range[10^5], Mod[#, 10] > 0 && Mod[ins[#, 0], #] == 0 &]

A356177 Palindromes in A333369.

Original entry on oeis.org

1, 3, 5, 7, 9, 22, 44, 66, 88, 111, 212, 232, 252, 272, 292, 333, 414, 434, 454, 474, 494, 555, 616, 636, 656, 676, 696, 777, 818, 838, 858, 878, 898, 999, 2002, 2222, 2442, 2662, 2882, 4004, 4224, 4444, 4664, 4884, 6006, 6226, 6446, 6666, 6886, 8008, 8228, 8448, 8668, 8888, 10101
Offset: 1

Views

Author

Bernard Schott, Jul 28 2022

Keywords

Comments

If a term has a decimal digit that is odd, it must have an odd number of decimal digits and all odd digits are the same. - Chai Wah Wu, Jul 29 2022
If a term has an even number of decimal digits, then it must have only even decimal digits. - Bernard Schott, Jul 30 2022

Examples

			474 is palindrome and 474 has two 4's and one 7 in its decimal expansion, hence 474 is a term.
		

Crossrefs

Intersection of A002113 and A333369.
Cf. A355770, A355771, A355772, A100706 (subsequence of repunits).

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[10^4], PalindromeQ[#] && simQ[#] &] (* Amiram Eldar, Jul 28 2022 *)
  • Python
    from itertools import count, islice, product
    def simb(n): s = str(n); return all(s.count(d)%2==int(d)%2 for d in set(s))
    def pals(): # generator of palindromes
        digits = "0123456789"
        for d in count(1):
            for p in product(digits, repeat=d//2):
                if d > 1 and p[0] == "0": continue
                left = "".join(p); right = left[::-1]
                for mid in [[""], digits][d%2]:
                    yield int(left + mid + right)
    def agen(): yield from filter(simb, pals())
    print(list(islice(agen(), 55))) # Michael S. Branicky, Jul 28 2022
    
  • Python
    # faster version based on Comments
    from itertools import count, islice, product
    def odgen(d): yield from [1, 3, 5, 7, 9] if d == 1 else sorted(int(f+"".join(p)+o+"".join(p[::-1])+f) for o in "13579" for f in o + "2468" for p in product(o+"02468", repeat=d//2-1))
    def evgen(d): yield from (int(f+"".join(p)+"".join(p[::-1])+f) for f in "2468" for p in product("02468", repeat=d//2-1))
    def A356177gen():
        for d in count(1, step=2): yield from odgen(d); yield from evgen(d+1)
    print(list(islice(A356177gen(), 55))) # Michael S. Branicky, Jul 30 2022
Previous Showing 11-13 of 13 results.