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.

A083044 Square table read by antidiagonals forms a permutation of the natural numbers: T(n,0) = floor(n*x/(x-1))+1, T(n,k+1) = ceiling(x*T(n,k)), where x=3/2, n >= 0, k >= 0.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 5, 9, 11, 10, 8, 14, 17, 15, 13, 12, 21, 26, 23, 20, 16, 18, 32, 39, 35, 30, 24, 19, 27, 48, 59, 53, 45, 36, 29, 22, 41, 72, 89, 80, 68, 54, 44, 33, 25, 62, 108, 134, 120, 102, 81, 66, 50, 38, 28, 93, 162, 201, 180, 153, 122, 99, 75, 57, 42, 31, 140, 243
Offset: 0

Views

Author

Paul D. Hanna, Apr 18 2003

Keywords

Comments

First row is A061419, first column is T(n,0) = A016777(n) = 3n+1 (namely the numbers not of the form ceiling(3*k/2) for any natural number k, in increasing order), main diagonal is A083045, antidiagonal sums give A083046. [further detail on first column added by Glen Whitney, Aug 03 2018]
A083044 is the dispersion of the sequence A007494 of positive integers congruent to (0 or 2) mod 3; see A191655. - Clark Kimberling, Jun 10 2011
If T(n+1,k) - T(n,k) = 2m, then T(n+1,k+1) - T(n,k+1) = ceiling(3T(n+1,k)/2) - ceiling(3T(n,k)/2) = ceiling(3T(n,k)/2 + 3m) - ceiling(3T(n,k)/2) = 3m. Similarly, if T(n+1,k) - T(n,k) = 2m+1, then T(n+1,k+1) - T(n,k+1) = ceiling(3T(n,k)/2 + 3m + 3/2) - ceiling(3T(n,k)/2) = {3m+1 or 3m+2, according to whether T(n,k) is even or odd}. The first differences of the first column T(n,0) are periodic: (3)*. The parities of the first column T(n,0) are periodic: (odd,even)*. Hence by induction using the prior two observations, the first differences and parities of every column will be periodic; e.g., for the second column T(n,2): the first differences are (4,5)* and the parities are (even,even,odd,odd)*; for the third column T(n,3): (6,8,6,7)* and (odd,odd,odd,odd,even,even,even,even)*; for the fourth column T(n,4): (9,12,9,10,9,12,9,11)* and (o,e,e,o,o,e,e,o,e,o,o,e,e,o,o,e)*. Is the period length of the first differences of column k always 2^{k-1}? And is the period length of parities always 2^k? Does every integer > 2 occur as T(n+1,k) - T(n,k) for some n and k? Is the smallest first difference in column k always A061418(k+1)? And is the largest first difference in column k always A061419(k+2)? - Glen Whitney, Aug 03 2018
Consider the following two-player game: Start with two nonempty piles of counters. Players alternate taking turns consisting of first discarding one of the piles and then dividing the remaining pile into two nonempty piles. The smaller pile may always be discarded; the larger pile may only be discarded if the smaller pile is at least half as large. (Either pile may be discarded if they are equal.) The player who cannot move (because the configuration has reached two piles of one counter each) loses. Then the numbers c for which two piles of size c is a losing configuration (for the player whose turn it is) are exactly T(4,k) for k > 1, together with 1,3,5, and 9. - Glen Whitney, Aug 03 2018

Examples

			Table begins:
   1  2  3   5   8  12  18  27  41   62   93  140 ...
   4  6  9  14  21  32  48  72 108  162  243  365 ...
   7 11 17  26  39  59  89 134 201  302  453  680 ...
  10 15 23  35  53  80 120 180 270  405  608  912 ...
  13 20 30  45  68 102 153 230 345  518  777 1166 ...
  16 24 36  54  81 122 183 275 413  620  930 1395 ...
  19 29 44  66  99 149 224 336 504  756 1134 1701 ...
  22 33 50  75 113 170 255 383 575  863 1295 1943 ...
  25 38 57  86 129 194 291 437 656  984 1476 2214 ...
  28 42 63  95 143 215 323 485 728 1092 1638 2457 ...
  31 47 71 107 161 242 363 545 818 1227 1841 2762 ...
		

Crossrefs

Row in which a number occurs: A163491.
Column in which a number occurs: A087088.

Formula

T(A163491(n)-1, A087088(n)-1) = n. - Peter Munn, Jul 16 2020 [corrected Peter Munn, Aug 02 2020]

A087088 Positive ruler-type fractal sequence with 1's in every third position.

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 1, 5, 3, 1, 2, 6, 1, 4, 2, 1, 3, 7, 1, 2, 5, 1, 3, 2, 1, 4, 8, 1, 2, 3, 1, 6, 2, 1, 4, 3, 1, 2, 5, 1, 9, 2, 1, 3, 4, 1, 2, 7, 1, 3, 2, 1, 5, 4, 1, 2, 3, 1, 6, 2, 1, 10, 3, 1, 2, 4, 1, 5, 2, 1, 3, 8, 1, 2, 4, 1, 3, 2, 1, 6, 5, 1, 2, 3, 1, 4, 2, 1, 7, 3, 1, 2, 11, 1, 4, 2, 1, 3, 5, 1, 2, 6, 1, 3, 2
Offset: 1

Views

Author

Enrico T. Federighi (rico125162(AT)aol.com), Aug 08 2003

Keywords

Comments

If all the terms in the sequence are reduced by one and then all zeros are removed, the result is the same as the original sequence.
From Benoit Cloitre, Mar 07 2009: (Start)
To construct the sequence:
Step 1: start from a sequence of 1's and leave two undefined places between every pair of 1's giving: 1,(),(),1,(),(),1,(),(),1,(),(),1,(),(),1,...
Step 2: replace the first undefined place with a 2 and henceforth leave two undefined places between two 2's giving: 1,2,(),1,(),2,1,(),(),1,2,(),1,(),2,1,...
Step 3: replace the first undefined place with a 3 and henceforth leave two undefined places between two 3's giving: 1,2,3,1,(),2,1,(),3,1,2,(),1,(),2,1,...
Step 4: replace the first undefined place with a 4 and leave 2 undefined places between two 4's giving: 1,2,3,1,4,2,1,(),3,1,2,(),1,4,2,1,... Iterating the process indefinitely yields the sequence: 1,2,3,1,4,2,1,5,3,1,2,6,1,4,2,1,... (End)
From Peter Munn, Jul 10 2020: (Start)
For k >= 1, the number k occurs in a pattern with fundamental period 3^k, and with points of mirror symmetry at intervals of (3^k)/2. Those points have an extrapolated common origin (for k >= 1) at an offset 1.5 to the left of the sequence's initial "1". The snake format illustration in the example section may be useful for visualizing this.
(End)
For k >= 1, k first occurs at position A061419(k) and its k-th occurrence is at position A083045(k-1). - Peter Munn, Aug 23 2020
(a(n)) is the unique fixed point of the two-block substitution a,b -> 1,a+1,b+1, where a,b are natural numbers. - Michel Dekking, Sep 26 2022

Examples

			From _Peter Munn_, Jul 03 2020: (Start)
Listing the terms in a snake format (with period 27) illustrates periodic and mirror symmetries. Horizontal lines mark points of mirror symmetry for 3's. Vertical lines mark further points of mirror symmetry for 2's. 79 terms are shown. (Referred to the extrapolated common origin of periodic mirror symmetry, the initial term is at offset 1.5 and the last shown is at offset 79.5 = 3^4 - 1.5.) Observe also mirror symmetry of 4's (seen vertically).
    1  2  3  1  4  2  1  5   3  1  2  6
             |             |            1 --
    1  2  3  1  5  2  1  7   3  1  2  4
_ 4
  8
    1  2  3  1  6  2  1  4   3  1  2  5
             |             |            1 --
    1  2  3  1  7  2  1  4   3  1  2  9
_ 5
  4
    1  2  3  1  6  2  1 10   3  1  2  4
             |             |            1 --
    1  2  3  1  4  2  1  8   3  1  2  5
(End)
From _Peter Munn_, Aug 22 2020: (Start)
The start of the sequence is shown below in conjunction with related sequences, aligning their points of mirror symmetry. The longer, and shorter, vertical lines indicate points of mirror symmetry for terms valued less than 4, and less than 3, respectively. Note each term of A051064 is the minimum of two terms displayed nearest below it, and each term of A254046 is the minimum of the two terms displayed diagonally above it.
        |                          |                          |
A051064:| 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2
        |        |        |        |        |        |        |
[a(n)]: |  1 2 3 1 4 2 1 5 3 1 2 6 1 4 2 1 3 7 1 2 5 1 3 2 1 4 8 1 2 3
        |        |        |        |        |        |        |
A254046:|1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1
        |                          |                          |
(End)
		

Crossrefs

Sequences with equivalent symmetries: A051064, A254046.
Records are given by A061419: a(A061419(n))=n.
Essentially the odd bisection of A335933.
Sequence with similar definition: A087165.
Ordinal transform of A163491, with which this sequence has a joint relationship to A083044, A083045.
See also the comment in A024629.

Programs

Formula

a(n) = 1 when n == 1 (mod 3), otherwise a(n) = a(n-ceiling(n/3)) + 1.
a(n) = 3 + A244040(3*(n-1)) - A244040(3*n). - Tom Edgar and James Van Alstine, Aug 04 2014
From Peter Munn, Aug 22 2020: (Start)
For m >= 0, a(3*m+1) = 1; a(3*m+2) = a(2*m+1) + 1; a(3*m+3) = a(2*m+2) + 1.
For n >= 1, the following identities hold.
a(n) = A335933(2*n+1).
A083044(A163491(n) - 1, a(n) - 1) = n.
A051064(n+1) = min(a(n), a(n+1)).
A254046(n+2) = min(a(n), a(n+2)). (End)

Extensions

More terms from Paul D. Hanna, Aug 21 2003
Offset changed by M. F. Hasler (following remarks by Peter Munn), Jul 13 2020
Thanks to Allan C. Wechsler for suggesting the new name. - N. J. A. Sloane, Jul 14 2020

A263390 a(3n) = n, otherwise a(n) = a(floor(2n/3)).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 0, 1, 3, 2, 0, 4, 1, 3, 5, 2, 0, 6, 4, 1, 7, 3, 5, 8, 2, 0, 9, 6, 4, 10, 1, 7, 11, 3, 5, 12, 8, 2, 13, 0, 9, 14, 6, 4, 15, 10, 1, 16, 7, 11, 17, 3, 5, 18, 12, 8, 19, 2, 13, 20, 0, 9, 21, 14, 6, 22, 4, 15, 23, 10, 1, 24, 16, 7, 25
Offset: 0

Views

Author

Lee A. Newberg, Apr 27 2016

Keywords

Comments

This sequence is the unique fixed point of the function (a(0), a(1), a(2), ...) |--> (0, a(0), a(1), 1, a(2), a(3), 2, a(4), a(5), ...) which interleaves the nonnegative integers with pairs of elements of a sequence.
Compare with A025480, the unique fixed point of the function (a(0), a(1), a(2), ...) |--> (0, a(0), 1, a(1), 2, a(2), ...) which interleaves the nonnegative integers between the elements of a sequence.
These are the nim-values for heaps of n beans in the game where you're allowed to take up to one-third of the beans in a heap.

Crossrefs

Comparable sequences: A025480, A163491.
Ordinal transform: A087088.

Programs

  • Mathematica
    Nest[Append[#1, If[Mod[#2, 3] == 0, #2/3, #1[[Floor[2 #2/3] + 1]]]] & @@ {#, Length[#]} &, {0}, 75] (* Michael De Vlieger, Jul 09 2021 *)
  • PARI
    a(n)=if(n%3,a(2*n\3),n/3) \\ Charles R Greathouse IV, Apr 30 2016

Formula

a(n) = A163491(n+1) - 1. - Peter Munn, Nov 22 2020

A340716 Lexicographically earliest sequence of positive integers with as many distinct values as possible such that for any n > 0, a(n + pi(n)) = a(n) (where pi(n) = A000720(n) corresponds to the number of prime numbers <= n).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 2, 3, 5, 4, 2, 3, 5, 6, 4, 2, 7, 3, 5, 6, 4, 8, 2, 7, 9, 3, 5, 6, 4, 10, 8, 2, 7, 9, 3, 5, 11, 6, 4, 12, 10, 8, 2, 7, 9, 3, 13, 5, 11, 6, 4, 14, 12, 10, 15, 8, 2, 7, 9, 16, 3, 13, 5, 11, 6, 4, 17, 14, 12, 10, 15, 8, 2, 18, 7, 9, 19, 16, 3
Offset: 1

Views

Author

Rémy Sigrist, Jan 17 2021

Keywords

Comments

The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> x + pi(x) do not merge, then a(m) <> a(n).
This sequence has similarities with A003602 (A003602(2*n) = A003602(n)) and with A163491 (A163491(n+ceiling(n/2)) = A163491(n)).

Examples

			The first terms, alongside n + pi(n), are:
  n   a(n)  n + pi(n)
  --  ----  ---------
   1     1          1
   2     2          3
   3     2          5
   4     3          6
   5     2          8
   6     3          9
   7     4         11
   8     2         12
   9     3         13
  10     5         14
  11     4         16
  12     2         17
		

Crossrefs

See A003602, A163491 and A340717 for similar sequences.

Programs

  • PARI
    u=0; for (n=1, #a=vector(80), if (a[n]==0, a[n]=u++); print1 (a[n]", "); m=n+primepi(n); if (m<=#a, a[m]=a[n]))

Formula

a(n) = 2 iff n belongs to A061535.
a(A095116(n)) = n + 1.
Showing 1-4 of 4 results.