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

A265721 Decimal representation of the n-th iteration of the "Rule 1" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 0, 4, 99, 16, 1935, 64, 32319, 256, 522495, 1024, 8381439, 4096, 134189055, 16384, 2147368959, 65536, 34359279615, 262144, 549753978879, 1048576, 8796085682175, 4194304, 140737458995199, 16777216, 2251799696244735, 67108864, 36028796549201919, 268435456
Offset: 0

Views

Author

Robert Price, Dec 14 2015

Keywords

Comments

Rule 33 also generates this sequence.

Examples

			From _Michael De Vlieger_, Dec 14 2015: (Start)
First 8 rows, replacing leading zeros with ".", the row converted to its binary (A265720), then decimal equivalent at right:
              1                ->               1  =     1
            . . 0              ->               0  =     0
          . . 1 0 0            ->             100  =     4
        1 1 0 0 0 1 1          ->         1100011  =    99
      . . . . 1 0 0 0 0        ->           10000  =    16
    1 1 1 1 0 0 0 1 1 1 1      ->     11110001111  =  1935
  . . . . . . 1 0 0 0 0 0 0    ->         1000000  =    64
1 1 1 1 1 1 0 0 0 1 1 1 1 1 1  -> 111111000111111  = 32319
(End)
		

References

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

Crossrefs

Programs

  • Mathematica
    rule = 1; rows = 30; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]],2], {k,1,rows}]
  • Python
    print([2*4**n  - 7*2**(n-1) - 1 if n%2 else 2**n for n in range(50)]) # Karl V. Keller, Jr., Aug 24 2021

Formula

From Colin Barker, Dec 14 2015 and Apr 16 2019: (Start)
a(n) = 21*a(n-2) - 84*a(n-4) + 64*a(n-6) for n>5.
G.f.: (1-17*x^2+99*x^3+16*x^4-144*x^5) / ((1-x)*(1+x)*(1-2*x)*(1+2*x)*(1-4*x)*(1+4*x)).
(End)
a(n) = 2*4^n - 7*2^(n-1) - 1 for odd n; a(n) = 2^n for even n. - Karl V. Keller, Jr., Aug 24 2021

A059848 As a square table by antidiagonals, the n-digit number which in base k starts 1010101...

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 2, 2, 0, 0, 1, 3, 5, 2, 1, 0, 1, 4, 10, 10, 3, 0, 0, 1, 5, 17, 30, 21, 3, 1, 0, 1, 6, 26, 68, 91, 42, 4, 0, 0, 1, 7, 37, 130, 273, 273, 85, 4, 1, 0, 1, 8, 50, 222, 651, 1092, 820, 170, 5, 0, 0, 1, 9, 65, 350, 1333, 3255, 4369, 2460, 341, 5, 1, 0, 1, 10
Offset: 0

Views

Author

Henry Bottomley, Feb 26 2001

Keywords

Examples

			T(5,3)=10101 base 3=81+9+1=91; T(4,6)=1010 base 6=216+6=222. Table starts {0,0,0,0,...}, {1,1,1,1,...}, {0,1,2,3,...}, {1,2,5,10,...}, ...
		

Crossrefs

Formula

T(n, k)=floor[k^(n+1)/(k^2-1)] =T(n-2, k)+k^(n-1) =k*T(n-1, k)-((-1)^n-1)/2

A089815 a(n) = floor((n+2)^(n+2)/((n+2)^2-1)).

Original entry on oeis.org

1, 3, 17, 130, 1333, 17157, 266305, 4842756, 101010101, 2377597255, 62350352785, 1802828015430, 56984650387477, 1954883439200265, 72340172838076673, 2872362020438669320, 121815504877079063701, 5495610154611982192011, 262801002506265664160401
Offset: 0

Views

Author

Paul Barry, Nov 12 2003

Keywords

Crossrefs

Programs

  • Magma
    [Floor((n+2)^(n+2)/((n+2)^2-1)): n in [0..50]]; // G. C. Greubel, Oct 10 2017
  • Maple
    A089815:=n->floor((n+2)^(n+2)/((n+2)^2-1)): seq(A089815(n), n=0..30); # Wesley Ivan Hurt, Apr 11 2017
  • Mathematica
    Table[Floor[(n + 2)^(n + 2)/((n + 2)^2 - 1)], {n, 0, 50}] (* G. C. Greubel, Oct 10 2017 *)
  • PARI
    for(n=0,50, print1(floor((n+2)^(n+2)/((n+2)^2-1)), ", ")) \\ G. C. Greubel, Oct 10 2017
    

A104720 Expansion of 1/((1-x)(1-x^2)(1-10x)).

Original entry on oeis.org

1, 11, 112, 1122, 11223, 112233, 1122334, 11223344, 112233445, 1122334455, 11223344556, 112233445566, 1122334455667, 11223344556677, 112233445566778, 1122334455667788, 11223344556677889, 112233445566778899, 1122334455667789000, 11223344556677890010, 112233445566778900111, 1122334455667789001121
Offset: 0

Views

Author

Paul Barry, Mar 20 2005

Keywords

Comments

Partial sums of A056830(n+1).

Examples

			From _Seiichi Manyama_, Sep 29 2018: (Start)
   1                  * 8 + 0  = 8;
   11                 * 8 + 1  = 89;
   112                * 8 + 1  = 897;
   1122               * 8 + 2  = 8978;
   11223              * 8 + 2  = 89786;
   112233             * 8 + 3  = 897867;
   1122334            * 8 + 3  = 8978675;
   11223344           * 8 + 4  = 89786756;
   112233445          * 8 + 4  = 897867564;
   1122334455         * 8 + 5  = 8978675645;
   11223344556        * 8 + 5  = 89786756453;
   112233445566       * 8 + 6  = 897867564534;
   1122334455667      * 8 + 6  = 8978675645342;
   11223344556677     * 8 + 7  = 89786756453423;
   112233445566778    * 8 + 7  = 897767564534231;
   1122334455667788   * 8 + 8  = 8978675645342312;
   11223344556677889  * 8 + 8  = 89786756453423120;
   112233445566778899 * 8 + 9  = 897867564534231201.
   1                  * 9 + 1  = 10;
   11                 * 9 + 2  = 101;
   112                * 9 + 2  = 1010;
   1122               * 9 + 3  = 10101;
   11223              * 9 + 3  = 101010;
   112233             * 9 + 4  = 1010101;
   1122334            * 9 + 4  = 10101010;
   11223344           * 9 + 5  = 101010101;
   112233445          * 9 + 5  = 1010101010;
   1122334455         * 9 + 6  = 10101010101;
   11223344556        * 9 + 6  = 101010101010;
   112233445566       * 9 + 7  = 1010101010101;
   1122334455667      * 9 + 7  = 10101010101010;
   11223344556677     * 9 + 8  = 101010101010101;
   112233445566778    * 9 + 8  = 1010101010101010;
   1122334455667788   * 9 + 9  = 10101010101010101;
   11223344556677889  * 9 + 9  = 101010101010101010;
   112233445566778899 * 9 + 10 = 1010101010101010101. (End)
		

Crossrefs

Programs

  • GAP
    List([0..25],n->1000*10^n/891+(-1)^n/44-(18*n+47)/324); # Muniru A Asiru, Sep 29 2018
  • Maple
    seq(coeff(series(((1-x)*(1-x^2)*(1-10*x))^(-1),x,n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Sep 29 2018
  • Mathematica
    a[n_]:=1000*10^n/891 + (-1)^n/44 - (18*n + 47)/324 ; Array[a,50,0] (* or *)
    a[n_]:=Floor[(2*10^(n + 3) - 99*n)/1782]; Array[a,50,0] (* Stefano Spezia, Sep 01 2018 *)
    LinearRecurrence[{11,-9,-11,10},{1,11,112,1122},30] (* Harvey P. Dale, Jun 20 2021 *)

Formula

a(n) = 1000*10^n/891 + (-1)^n/44 - (18n+47)/324.
a(n) = floor((2*10^(n+3) - 99n)/1782). - Hieronymus Fischer, Dec 05 2006
a(n) = 10*a(n-1) + (2*n + 3 + (-1)^n)/4, a(0)=1, a(1)=11. - Vincenzo Librandi, Mar 22 2011

A377919 a(0) = 0; thereafter a(n) is the lexicographically earliest missing nonnegative integer such that the digits in the sequence (ignoring the commas) alternate in parity.

Original entry on oeis.org

0, 1, 2, 10, 101, 21, 210, 1010, 10101, 2101, 21010, 101010, 1010101, 210101, 2101010, 10101010, 101010101, 21010101, 210101010, 1010101010, 10101010101, 2101010101, 21010101010, 101010101010, 1010101010101, 210101010101, 2101010101010, 10101010101010, 101010101010101, 21010101010101, 210101010101010, 1010101010101010, 10101010101010101, 2101010101010101, 21010101010101010, 101010101010101010
Offset: 0

Views

Author

N. J. A. Sloane, Dec 08 2024

Keywords

Comments

A "lexicographically earliest" variant of A098951.

Examples

			We begin by arranging the nonnegative integers whose digits alternate in parity in lexicographic order. First, 0; then the numbers with first digit 1: 1, 10, 101, 1010, 10101, 101010, ...; then the numbers with first digit 2: 2, 20, 201, 2010, 20101, 201010, ...; then the numbers with first digit 3, and so on.
The sequence begins with 0 and from then on we choose the first unused number from the above list which preserves alternating parity of the digits in the sequence.
(The above list does not have an OEIS entry, since there are uncountably many terms before the number 2 appears. In fact there are uncountably many terms before 12 appears. The beginning of the list coincides with A056830.)
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, -1, 1, 100, -100, 100, -100}, {0, 1, 2, 10, 101, 21, 210, 1010, 10101}, 50] (* Paolo Xausa, Dec 09 2024 *)

Formula

a(0) - a(6) are 0, 1, 2, 10, 101, 21, 210. Thereafter, for k >= 2,
a(4*k-1) = a(4*k-5) || 10,
a(4*k) = a(4*k-4) || 01,
a(4*k+1) = a(4*k-3) || 01,
a(4*k+2) = a(4*k-2) || 10,
where || denotes concatenation.

A089816 a(n) = floor((n+3)^(n+2)/((n+3)^2-1)).

Original entry on oeis.org

1, 4, 26, 222, 2451, 33288, 538084, 10101010, 216145205, 5195862732, 138679078110, 4070332170534, 130325562613351, 4521260802379792, 168962471790509960, 6767528048726614650, 289242639716420115369
Offset: 0

Views

Author

Paul Barry, Nov 12 2003

Keywords

Crossrefs

Programs

  • Magma
    [Floor((n+3)^(n+2)/((n+3)^2-1)): n in [0..25]]; // G. C. Greubel, Oct 11 2017
  • Mathematica
    Table[Floor[(n + 3)^(n + 2)/((n + 3)^2 - 1)], {n, 0, 50}] (* G. C. Greubel, Oct 11 2017 *)
  • PARI
    for(n=0, 25, print1(floor((n+3)^(n+2)/((n+3)^2-1)), ", ")) \\ G. C. Greubel, Oct 11 2017
    

A141116 Smallest n-digit prime with no identical adjacent digits (or 0 if no such prime exists).

Original entry on oeis.org

2, 13, 101, 1013, 10103, 101021, 1010129, 10101023, 101010157, 1010101039, 10101010163, 101010101063, 1010101010131, 10101010101019, 101010101010131, 1010101010101037, 10101010101010141, 101010101010101083
Offset: 1

Views

Author

Rick L. Shepherd, Jun 05 2008

Keywords

Comments

For n >= 1, a(n) >= A056830(n), the least n-digit positive integer with no identical adjacent digits (also the least positive integer whose digits occur in n runs). Conjecture: For all n, a(n) <> 0.
If the conjecture is true, then this sequence and the following two sequences are equivalent: i) Smallest prime with exactly n runs of digits and ii) Smallest prime with at least n runs of digits. For each n <= 625, a(n) is an n-digit prime (provided that each probable prime shown in the link is indeed a prime -- or at least one of very many (slightly) larger probable prime candidates is prime).
As each a(n) shown is very near A056830(n), I believe it is extremely unlikely that a randomly-given n would yield a 0 term (but I don't have a proof for arbitrary n).

Examples

			a(4) = 1013 because 1013 is the smallest 4-digit prime having no identical adjacent digits; the only smaller 4-digit prime, 1009, is disqualified by the "00", identical adjacent digits (of run length 2). Also each digit, 1, 0, 1, 3, occurs in a run of identical digits of length 1 for a total of 4 runs with 1013 being the smallest prime of any length with 4 runs of digits.
		

Crossrefs

A144863 Start with 1, then at each step prepend 10 and append 01.

Original entry on oeis.org

1, 10101, 101010101, 1010101010101, 10101010101010101, 101010101010101010101, 1010101010101010101010101, 10101010101010101010101010101, 101010101010101010101010101010101
Offset: 1

Views

Author

Artur Jasinski, Sep 23 2008, Sep 25 2008

Keywords

Comments

Bisection of A094028. - Omar E. Pol, Nov 12 2008
a(n) is also A144864(n) written in base 2. - Omar E. Pol, Nov 13 2008
Quadrisection of A147759. - Omar E. Pol, Nov 16 2008

Crossrefs

Programs

  • Mathematica
    a = {}; k = {1}; Do[x = FromDigits[k, 2]; AppendTo[a, FromDigits[RealDigits[x, 2]]]; AppendTo[k, 0]; AppendTo[k, 1]; PrependTo[k, 0]; PrependTo[k, 1], {n, 1, 100}];
    Table[FromDigits[RealDigits[1/12 (-4 + 16^n), 2]], {n, 1, 10}]
    a = {}; k = 1; Do[AppendTo[a, k]; k = 10000 k + 101, {n, 1, 10}]; a
    Table[1/99 (-1 + 100^(-1 + 2 n)), {n, 1, 20}]
    LinearRecurrence[{10001,-10000},{1,10101},20] (* Harvey P. Dale, Aug 22 2014 *)

Formula

a(n) = (-1+100^(-1+2*n))/99.
If a(n) is interpreted as binary number, (-4+16^n)/12 gives the decimal representation of a(n).
a(n) = 10000*a(n-1)+101, n>1.
G.f.: x*(1+100*x) / ( (10000*x-1)*(x-1) ).
Previous Showing 11-18 of 18 results.