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.

User: Paul Tek

Paul Tek's wiki page.

Paul Tek has authored 101 sequences. Here are the ten most recent ones:

A263564 Putative inverse of A263563.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 18, 22, 26, 30, 34, 38, 42, 17, 46, 50, 55, 60, 65, 70, 75, 80, 85, 21, 90, 95, 101, 107, 113, 119, 125, 131, 137, 25, 143, 149, 156, 163, 170, 177, 184, 191, 198, 29, 205, 212, 220, 228, 236, 244, 252, 260, 268, 33, 276
Offset: 1

Author

Paul Tek, Oct 21 2015

Keywords

Crossrefs

Cf. A263563.

A263563 A self-describing sequence: when the sequence is read as a string of decimal digits, a(n) can be read from position n (ignoring leading zeros). This sequence is the lexicographically earliest sequence of distinct terms with this property.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 110, 100, 12, 120, 1200, 20, 13, 130, 1300, 30, 14, 140, 1400, 40, 15, 150, 1500, 50, 16, 160, 1600, 60, 17, 170, 1700, 70, 18, 180, 1800, 80, 19, 190, 1900, 90, 21, 210, 2100, 1000, 22, 220, 2200, 22000, 200, 23, 230, 2300
Offset: 1

Author

Paul Tek, Oct 21 2015

Keywords

Comments

Leading zeros that may appear while reading a(n) arise from non-leading zeros in some previous term, and are ignored.
The table in the Example section makes the definition clearer.
This sequence is conjectured to be a permutation of natural numbers, with putative inverse A263564.

Examples

			The following table depicts the first few terms:
+----+--------+-----------------------------------+
| n  | a(n)   | a(n) in situation with leading 0s |
+----+--------+-----------------------------------+
|  1 |      1 | 1                                 |
|  2 |      2 |  2                                |
|  3 |      3 |   3                               |
|  4 |      4 |    4                              |
|  5 |      5 |     5                             |
|  6 |      6 |      6                            |
|  7 |      7 |       7                           |
|  8 |      8 |        8                          |
|  9 |      9 |         9                         |
| 10 |     10 |          10                       |
| 11 |     11 |           011                     |
| 12 |    110 |            110                    |
| 13 |    100 |             100                   |
| 14 |     12 |              0012                 |
| 15 |    120 |               0120                |
| 16 |   1200 |                1200               |
| 17 |     20 |                 200               |
| 18 |     13 |                  0013             |
| 19 |    130 |                   0130            |
| 20 |   1300 |                    1300           |
| 21 |     30 |                     300           |
| 22 |     14 |                      0014         |
| 23 |    140 |                       0140        |
| 24 |   1400 |                        1400       |
| 25 |     40 |                         400       |
| 26 |     15 |                          0015     |
| 27 |    150 |                           0150    |
| 28 |   1500 |                            1500   |
| 29 |     50 |                             500   |
| 30 |     16 |                              0016 |
+----+--------+-----------------------------------+
Comments from _N. J. A. Sloane_, Jan 18 2016 (Start): After a(9)=9, the smallest possible choice for a(10) is the first number that has not yet appeared, which is 10. There is no contradiction, so we take a(10)=10.
Now the smallest number that has not yet appeared is 11, and we can achieve a(11)=11 by making the string of digits starting at the 11th place read 011.
Now the string of digits starting at the 12th pace is 11..., and the smallest candidate of that form is 110, which gives a(12)=110.
And so on. (End)
		

Crossrefs

Programs

  • Perl
    See Links section.

A263443 A self-describing sequence: when the sequence is read as a string of decimal digits, a(n) gives the starting position of an occurrence of n. This sequence is the lexicographically earliest one with this property.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 1, 17, 130, 21, 50, 15, 28, 180, 33, 20, 37, 2, 200, 42, 52, 47, 270, 162, 60, 57, 310, 300, 3, 66, 350, 35, 73, 380, 78, 400, 41, 84, 302, 4, 91, 460, 96, 480, 22, 104, 510, 110, 530, 115, 5, 55, 122, 580, 53, 132, 146, 136
Offset: 1

Author

Paul Tek, Oct 18 2015

Keywords

Comments

The sequence does not necessarily give the earliest position of a number.
For example, 1234 first appears at position 1, but a(1234) = 28011.

Examples

			The following table lists few first terms, with the corresponding digits induced in the overall sequence:
+----+------+------------------------------------------------------------+
| n  | a(n) | New known digits                                           |
+----+------+------------------------------------------------------------+
|  1 |    1 | 1                                                          |
|  2 |    2 |  2                                                         |
|  3 |    3 |   3                                                        |
|  4 |    4 |    4                                                       |
|  5 |    5 |     5                                                      |
|  6 |    6 |      6                                                     |
|  7 |    7 |       7                                                    |
|  8 |    8 |        8                                                   |
|  9 |    9 |         9                                                  |
| 10 |   10 |          10                                                |
| 11 |   14 |            1411                                            |
| 12 |    1 |                                                            |
| 13 |   17 |                713                                         |
| 14 |  130 |                   0                                 ... 14 |
| 15 |   21 |                    215                                     |
| 16 |   50 |                       0                          16        |
| 17 |   15 |                        15                                  |
| 18 |   28 |                          2818                              |
+----+------+------------------------------------------------------------+
		

Crossrefs

Programs

  • Perl
    See Links section.

A263402 Define Z(1) = {1}, and Z(n+1) = Z(n) (+) { x+y, with x and y in Z(n) } for any n>0 (where (+) stands for the symmetric difference of two sets). Then a(n) gives the number of elements in Z(n).

Original entry on oeis.org

1, 2, 3, 7, 10, 22, 42, 87, 170, 342, 686, 1365, 2727, 5468, 10919, 21857, 43680, 87389, 174756, 349539, 699039, 1398115, 2796191, 5592422, 11184795, 22369639, 44739229, 89478503, 178956950, 357913967, 715827858, 1431655793, 2863311503, 5726623097, 11453246088
Offset: 1

Author

Paul Tek, Oct 17 2015

Keywords

Comments

a(n) can also be interpreted as the number of ON cells at the n-th stage of the following automaton:
- At first stage, we have only one ON cell at position 1,
- An ON cell appears at position x+y if the cells at positions x and y are ON,
- An ON cell dies at position x+y if the cells at positions x and y are ON.
a(n) <= 2^(n-1) for any n>0.

Examples

			Z(1) = {1};
Z(2) = {1} (+) {2} = {1,2};
Z(3) = {1,2} (+) {2,3,4} = {1,3,4};
Z(4) = {1,3,4} (+) {2,4,5,6,7,8} = {1,2,3,5,6,7,8};
Hence: a(1) = 1, a(2) = 2, a(3) = 3 and a(4) = 7.
		

Crossrefs

Cf. A067398.

Programs

  • PARI
    lista(nn) = {zprec = Set([1]); print1(#zprec, ", "); for (n=2, nn, zs = setbinop((x,y)->x+y, zprec); zn = setminus(setunion(zprec, zs), setintersect(zprec, zs)); print1(#zn, ", "); zprec = zn;);} \\ Michel Marcus, Oct 20 2015
  • Perl
    See Links section.
    

Formula

a(n) = A000120(z(n)) for any n>0
where z(n) is a binary encoding of Z(n), defined as follows:
- z(1) = 2^1,
- z(n+1) = z(n) XOR A067398(z(n)) for any n>0 (where XOR stands for the binary XOR operator).

A263130 Least number such that the product of its digits in factorial base is n.

Original entry on oeis.org

1, 5, 21, 17, 633, 23, 36153, 65, 93, 635, 443122713, 71, 81474226713, 36155, 645, 113, 6069010670156313, 95, 2318037293294156313, 641, 36165, 443122715, 595774037991797891660313, 119, 4233, 81474226715, 453, 36161, 256727294482662730300616548940313, 647
Offset: 1

Author

Paul Tek, Oct 10 2015

Keywords

Comments

The product of digits in factorial base is given by A208575.
All terms are odd.
Each prime number sets a new record.
a(p) = p*(p!) + Sum_{k=1..p-1} k! for any prime p.
a(n!) = A033312(n+1) for any n>0.
A208576(a(n)) = A208576(n)+1 for any n>1.

Examples

			The first terms of the sequence are:
+----+-------------+----------------------------+
| n  | a(n)        | a(n) in factorial base     |
+----+-------------+----------------------------+
|  1 |           1 |                          1 |
|  2 |           5 |                        2_1 |
|  3 |          21 |                      3_1_1 |
|  4 |          17 |                      2_2_1 |
|  5 |         633 |                  5_1_1_1_1 |
|  6 |          23 |                      3_2_1 |
|  7 |       36153 |              7_1_1_1_1_1_1 |
|  8 |          65 |                    2_2_2_1 |
|  9 |          93 |                    3_3_1_1 |
| 10 |         635 |                  5_1_1_2_1 |
| 11 |   443122713 |     11_1_1_1_1_1_1_1_1_1_1 |
| 12 |          71 |                    2_3_2_1 |
| 13 | 81474226713 | 13_1_1_1_1_1_1_1_1_1_1_1_1 |
| 14 |       36155 |              7_1_1_1_1_2_1 |
| 15 |         645 |                  5_1_3_1_1 |
| 16 |         113 |                    4_2_2_1 |
+----+-------------+----------------------------+
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors@ n, g, k, m = {1}}, g[x_] := Flatten[Table[#1, {#2}] & @@@ FactorInteger@ x]; Do[k = Max@ Select[d, # <= i &]; If[! IntegerQ@ k, AppendTo[m, 1], d = Divisors[Last[d]/k]; AppendTo[m, k]]; If[d == {1}, Break[]], {i, 2, n}]; Reverse@ m]; Table[FromDigits[#, MixedRadix[Reverse@ Range[2, Length@ #]]] &@ f@ n, {n, 30}] (* Michael De Vlieger, Oct 12 2015, Version 10.2 *)

A263019 If n is the i-th positive integer with digital sum j, then a(n) is the j-th positive integer with digital sum i.

Original entry on oeis.org

1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 2, 11, 20, 101, 110, 200, 1001, 1010, 1100, 1000000000, 12, 21, 30, 102, 111, 120, 201, 210, 2000, 10000000000, 22, 31, 40, 103, 112, 121, 130, 300, 10001, 100000000000, 32, 41, 50, 104, 113, 122
Offset: 1

Author

Paul Tek, Oct 07 2015

Keywords

Comments

Digital sum is given by A007953.
This is a self-inverse permutation of the natural numbers, with fixed points A081927.
A007953(n) = A081927(a(n)) for any n>0.
A081927(n) = A007953(a(n)) for any n>0.
a(A051885(n)) = 10^(n-1) for any n>0.
a(10^(n-1)) = A051885(n) for any n>0.

Crossrefs

Programs

  • PARI
    a(n) = {j = sumdigits(n); v = vector(n, k, sumdigits(k)); i = #select(x->x==j, v); nb = 0; k = 0; while(nb != j, k++; if (sumdigits(k) == i, nb++)); k;} \\ Michel Marcus, Oct 16 2015

A263018 If n is the i-th positive integer with binary weight j, then a(n) is the j-th positive integer with binary weight i.

Original entry on oeis.org

1, 3, 2, 7, 5, 11, 4, 15, 23, 47, 6, 95, 13, 27, 8, 31, 191, 383, 55, 767, 111, 223, 9, 1535, 447, 895, 14, 1791, 29, 59, 16, 63, 3071, 6143, 3583, 12287, 7167, 14335, 119, 24575, 28671, 57343, 239, 114687, 479, 959, 10, 49151, 229375, 458751, 1919, 917503
Offset: 1

Author

Paul Tek, Oct 07 2015

Keywords

Comments

Binary weight is given by A000120.
This is a self-inverse permutation of the natural numbers.
The positive terms in the sequence A036563 give the fixed points.
A000120(n) = A263017(a(n)) for any n>0.
A263017(n) = A000120(a(n)) for any n>0.
a(2^(n+1)-1) = 2^n for any n>0.
a(2^n) = 2^(n+1)-1 for any n>0.

Crossrefs

Programs

  • PARI
    a(n) = {j = hammingweight(n); v = vector(n, k, hammingweight(k)); i = #select(x->x==j, v); nb = 0; k = 0; while(nb != j, k++; if (hammingweight(k) == i, nb++)); k;} \\ Michel Marcus, Oct 16 2015

A263175 Number of ON cells in the one-dimensional automaton described in Comments, after n generations.

Original entry on oeis.org

1, 3, 5, 3, 7, 5, 9, 7, 9, 11, 15, 9, 15, 13, 13, 11, 11, 17, 25, 15, 25, 19, 19, 13, 21, 23, 31, 25, 19, 17, 25, 23, 13, 23, 35, 21, 39, 29, 37, 27, 35, 33, 49, 39, 29, 23, 31, 25, 27, 41, 53, 35, 49, 43, 51, 45, 25, 35, 43, 29, 39, 37, 45, 43, 15, 29, 45, 27
Offset: 0

Author

Paul Tek, Oct 11 2015

Keywords

Comments

We consider a one-dimensional automaton governed by the following rules:
- At stage 0, we have only one ON cell, at position z=0,
- An ON cell appears if it has exactly one ON neighbor:
+-------------+ +-----------+
| ...0(0)0... | |\ | ...(0)... |
| ...0(0)1... | --+ \ | ...(1)... |
| ...1(0)0... | --+ / | ...(1)... |
| ...1(0)1... | |/ | ...(0)... |
+-------------+ +-----------+
- An ON cell dies if its position and the number of its ON neighbors have a different parity:
+-----------+-----------+
| Even pos. | Odd pos. |
+-------------+ +-----------+-----------+
| ...0(1)0... | |\ | ...(1)... | ...(0)... |
| ...0(1)1... | --+ \ | ...(0)... | ...(1)... |
| ...1(1)0... | --+ / | ...(0)... | ...(1)... |
| ...1(1)1... | |/ | ...(1)... | ...(0)... |
+-------------+ +-----------+-----------+
Despite these simple rules, the evolution of the number of ON cells looks quite hectic.
The automaton depicted here is not a cellular automaton, as the evolution of a particular cell involves its position. However, by considering pairs of adjacent cells (say at position 2*z and 2*z+1), it is possible to represent this automaton by a 4-state cellular automaton.
Apparently, we obtain the Gould's sequence (A001316) by adding the following rule:
- An ON cell dies if it has no ON neighbor.

Examples

			After 0 generation:
- We have a unique ON cell at position z=0,
- Hence, a(0) = 1.
After 1 generation:
- ON cells appear at positions z=-1 and z=+1,
- No ON cell dies,
- Hence a(1) = a(0)+2-0 = 3.
After 2 generations:
- ON cells appears at positions z=-2 and z=+2,
- No ON cell dies,
- Hence a(2) = a(1)+2-0 = 5.
After 3 generations:
- ON cells appears at positions z=-3 and z=+3,
- ON cells at positions z=-1 and z=+1 die (as they have 2 ON neighbors),
- ON cells at positions z=-2 and z=+2 die (as they have 1 ON neighbor),
- Hence a(3) = a(2)+2-4 = 3.
Schematically:
+-----+-----------+------+
| n   | ON cells  | a(n) |
+-----+-----------+------+
|  0  |     #     |    1 |
|  1  |    ###    |    3 |
|  2  |   #####   |    5 |
|  3  |  #  #  #  |    3 |
+=====+-----------+------+
| z%2 |  1010101  |
+-----+-----------+
		

Crossrefs

Cf. A001316.

A263025 n is the a(n)-th positive integer having its sum of divisors.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 2, 1, 4, 2, 1, 2, 3, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 2, 5, 1, 1, 1, 2, 1, 4, 2, 2, 1, 1, 2, 3, 1, 1, 1, 3
Offset: 1

Author

Paul Tek, Oct 09 2015

Keywords

Comments

Sum of divisors is given by A000203.
This can also be described as the ordinal transform of A000203. - Franklin T. Adams-Watters, Oct 09 2015
a(n) > 1 iff n is in A069822.

Examples

			The numbers with sum of divisors 72 are: 30, 46, 51, 55, 71.
Hence: a(30)=1, a(46)=2, a(51)=3, a(55)=4, a(71)=5.
More generally: the terms of each row of A085790 (say of length i) map to 1, 2, ..., i.
Also: for any n>0, the n terms of the n-th row of A201915 map to 1, 2, ..., n.
		

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    Sigmas:= [seq(numtheory:-sigma(i),i=1..N)]:
    seq(numboccur(Sigmas[n], Sigmas[1..n]),n=1..N); # Robert Israel, Oct 09 2015
  • Mathematica
    t = DivisorSigma[1, #] & /@ Range@ 10000; s = Position[t, #] & /@ Range@ Max@ t; Flatten[Position[s, #, {3}]][[2]] & /@ Range@ 87 (* Michael De Vlieger, Oct 09 2015 *)
  • PARI
    cnt = vector(224); for (n=1, 87, s=sigma(n); cnt[s] = cnt[s]+1; print1(cnt[s] ", "))

Formula

a(A034885(k))=1 for k>0.

A262702 Lexicographically earliest sequence of distinct prime numbers such that the decimal representations of two consecutive terms overlap.

Original entry on oeis.org

2, 23, 3, 13, 11, 17, 7, 37, 43, 31, 19, 41, 101, 61, 103, 71, 47, 73, 67, 79, 97, 29, 229, 293, 307, 53, 5, 59, 359, 83, 283, 311, 107, 131, 109, 151, 113, 137, 181, 127, 191, 139, 211, 149, 241, 157, 251, 163, 271, 167, 281, 173, 313, 193, 317, 179, 331, 197
Offset: 1

Author

Paul Tek, Sep 27 2015

Keywords

Comments

Two terms are said to overlap:
- if the decimal representation of one term is contained in the decimal representation of the other term (for example, 23 and 3 overlap),
- or if, for some k>0, the first k decimal digits (without leading zero) of one term correspond to the k last decimal digits of the other term (for example, 317 and 179 overlap).
This is a variation of A262323 around the prime numbers.
Is this a permutation of the prime numbers?

Examples

			The first terms of the sequence are:
+----+--------+
| n  | a(n)   |
+----+--------+
|  1 |  2     |
|  2 |  23    |
|  3 |   3    |
|  4 |  13    |
|  5 | 11     |
|  6 |  17    |
|  7 |   7    |
|  8 |  37    |
|  9 | 43     |
| 10 |  31    |
| 11 |   19   |
| 12 |  41    |
| 13 |   101  |
| 14 |  61    |
| 15 |   103  |
| 16 |  71    |
| 17 | 47     |
| 18 |  73    |
| 19 | 67     |
| 20 |  79    |
| 21 |   97   |
| 22 |  29    |
| 23 | 229    |
| 24 |  293   |
| 25 |    307 |
+----+--------+
		

Crossrefs

Programs

  • Perl
    See Links section.