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.

A265903 Square array read by descending antidiagonals: A(1,k) = A188163(k), and for n > 1, A(n,k) = A087686(1+A(n-1,k)).

Original entry on oeis.org

1, 3, 2, 5, 7, 4, 6, 12, 15, 8, 9, 14, 27, 31, 16, 10, 21, 30, 58, 63, 32, 11, 24, 48, 62, 121, 127, 64, 13, 26, 54, 106, 126, 248, 255, 128, 17, 29, 57, 116, 227, 254, 503, 511, 256, 18, 38, 61, 120, 242, 475, 510, 1014, 1023, 512, 19, 42, 86, 125, 247, 496, 978, 1022, 2037, 2047, 1024, 20, 45, 96, 192, 253, 502, 1006, 1992, 2046, 4084, 4095, 2048
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2015

Keywords

Comments

Square array A(n,k) [where n is row and k is column] is read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
For n >= 3, each row n lists the numbers that appear n times in A004001. See also A051135.

Examples

			The top left corner of the array:
     1,    3,    5,    6,     9,    10,    11,    13,    17,    18,    19
     2,    7,   12,   14,    21,    24,    26,    29,    38,    42,    45
     4,   15,   27,   30,    48,    54,    57,    61,    86,    96,   102
     8,   31,   58,   62,   106,   116,   120,   125,   192,   212,   222
    16,   63,  121,  126,   227,   242,   247,   253,   419,   454,   469
    32,  127,  248,  254,   475,   496,   502,   509,   894,   950,   971
    64,  255,  503,  510,   978,  1006,  1013,  1021,  1872,  1956,  1984
   128,  511, 1014, 1022,  1992,  2028,  2036,  2045,  3864,  3984,  4020
   256, 1023, 2037, 2046,  4029,  4074,  4083,  4093,  7893,  8058,  8103
   512, 2047, 4084, 4094,  8113,  8168,  8178,  8189, 16006, 16226, 16281
  1024, 4095, 8179, 8190, 16292, 16358, 16369, 16381, 32298, 32584, 32650
  ...
		

Crossrefs

Inverse permutation: A267104.
Transpose: A265901.
Row 1: A188163.
Row 2: A266109.
Row 3: A267103.
For the known and suspected columns, see the rows listed for transposed array A265901.
Cf. A265900 (main diagonal), A265909 (submain diagonal).
Cf. A162598 (column index of n in array), A265332 (row index of n in array).
Cf. also permutations A267111, A267112.

Programs

Formula

For the first row n=1, A(1,k) = A188163(k), for rows n > 1, A(n,k) = A087686(1+A(n-1,k)).

A051135 a(n) = number of times n appears in the Hofstadter-Conway $10000 sequence A004001.

Original entry on oeis.org

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

Views

Author

Robert Lozyniak (11(AT)onna.com)

Keywords

Comments

If the initial 2 is changed to a 1, the resulting sequence (A265332) has the property that if all 1's are deleted, the remaining terms are the sequence incremented. - Franklin T. Adams-Watters, Oct 05 2006
a(A088359(n)) = 1 and a(A087686(n)) > 1; first differences of A188163. - Reinhard Zumkeller, Jun 03 2011
From Robert G. Wilson v, Jun 07 2011: (Start)
a(k)=1 for k = 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 20, 22, 23, 25, 28, ..., ; (A088359)
a(k)=2 for k = 1, 2, 7, 12, 14, 21, 24, 26, 29, 38, 42, 45, 47, 51, 53, ..., ; (1 followed by A266109)
a(k)=3 for k = 4, 15, 27, 30, 48, 54, 57, 61, 86, 96, 102, 105, 112, ..., ; (A267103)
a(k)=4 for k = 8, 31, 58, 62, 106, 116, 120, 125, 192, 212, 222, 226, ..., ;
a(k)=5 for k = 16, 63, 121, 126, 227, 242, 247, 253, 419, 454, 469, ..., ;
a(k)=6 for k = 32, 127, 248, 254, 475, 496, 502, 509, 894, 950, 971, ..., ;
a(k)=7 for k = 64, 255, 503, 510, 978, 1006, 1013, 1021, 1872, 1956, ..., ;
a(k)=8 for k = 128, 511, 1014, 1022, 1992, 2028, 2036, 2045, 3864, ..., ;
a(k)=9 for k = 256, 1023, 2037, 2046, 4029, 4074, 4083, 4093, 7893, ..., ;
a(k)=10 for k = 512, 2047, 4084, 4094, 8113, 8168, 8178, 8189, ..., . (End)
Compare above to array A265903. - Antti Karttunen, Jan 18 2016

Crossrefs

Cf. A088359 (positions of ones).
Cf. A265332 (essentially the same sequence, but with a(1) = 1 instead of 2).

Programs

  • Haskell
    import Data.List (group)
    a051135 n = a051135_list !! (n-1)
    a051135_list = map length $ group a004001_list
    -- Reinhard Zumkeller, Jun 03 2011
    
  • Magma
    nmax:=200;
    h:=[n le 2 select 1 else Self(Self(n-1)) + Self(n - Self(n-1)): n in [1..5*nmax]]; // h = A004001
    A188163:= function(n)
       for j in [1..3*nmax+1] do
           if h[j] eq n then return j; end if;
       end for;
    end function;
    A051135:= func< n | A188163(n+1) - A188163(n) >;
    [A051135(n): n in [1..nmax]]; // G. C. Greubel, May 20 2024
    
  • Maple
    a[1]:=1: a[2]:=1: for n from 3 to 300 do a[n]:=a[a[n-1]]+a[n-a[n-1]] od: A:=[seq(a[n],n=1..300)]:for j from 1 to A[nops(A)-1] do c[j]:=0: for n from 1 to 300 do if A[n]=j then c[j]:=c[j]+1 else fi od: od: seq(c[j],j=1..A[nops(A)-1]); # Emeric Deutsch, Jun 06 2006
  • Mathematica
    a[1] = 1; a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; t = Array[a, 250]; Take[ Transpose[ Tally[t]][[2]], 105] (* Robert G. Wilson v, Jun 07 2011 *)
  • SageMath
    @CachedFunction
    def h(n): return 1 if (n<3) else h(h(n-1)) + h(n - h(n-1)) # h=A004001
    def A188163(n):
        for j in range(1,2*n+1):
            if h(j)==n: return j
    def A051135(n): return A188163(n+1) - A188163(n)
    [A051135(n) for n in range(1,201)] # G. C. Greubel, May 20 2024
  • Scheme
    (define (A051135 n) (- (A188163 (+ 1 n)) (A188163 n))) ;; Antti Karttunen, Jan 18 2016
    

Formula

From Antti Karttunen, Jan 18 2016: (Start)
a(n) = A188163(n+1) - A188163(n). [after Reinhard Zumkeller's Jun 03 2011 comment above]
Other identities:
a(n) = 1 if and only if A093879(n-1) = 1. [See A188163 for a reason.]
(End)

Extensions

More terms from Jud McCranie
Added links (in parentheses) to recently submitted related sequences - Antti Karttunen, Jan 18 2016

A265901 Square array read by descending antidiagonals: A(n,1) = A188163(n), and for k > 1, A(n,k) = A087686(1+A(n,k-1)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 8, 15, 12, 6, 16, 31, 27, 14, 9, 32, 63, 58, 30, 21, 10, 64, 127, 121, 62, 48, 24, 11, 128, 255, 248, 126, 106, 54, 26, 13, 256, 511, 503, 254, 227, 116, 57, 29, 17, 512, 1023, 1014, 510, 475, 242, 120, 61, 38, 18, 1024, 2047, 2037, 1022, 978, 496, 247, 125, 86, 42, 19, 2048, 4095, 4084, 2046, 1992, 1006, 502, 253, 192, 96, 45, 20
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2015

Keywords

Comments

Square array read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
The topmost row (row 1) of the array is A000079 (powers of 2), and in general each row 2^k contains the sequence (2^n - k), starting from the term (2^(k+1) - k). This follows from the properties (3) and (4) of A004001 given on page 227 of Kubo & Vakil paper (page 3 in PDF).
Moreover, each row 2^k - 1 (for k >= 2) contains the sequence 2^n - n - (k-2), starting from the term (2^(k+1) - (2k-1)). To see why this holds, consider the definitions of sequences A162598 and A265332, the latter which also illustrates how the frequency counts Q_n for A004001 are recursively constructed (in the Kubo & Vakil paper).

Examples

			The top left corner of the array:
   1,  2,   4,   8,  16,   32,   64,  128,  256,   512,  1024, ...
   3,  7,  15,  31,  63,  127,  255,  511, 1023,  2047,  4095, ...
   5, 12,  27,  58, 121,  248,  503, 1014, 2037,  4084,  8179, ...
   6, 14,  30,  62, 126,  254,  510, 1022, 2046,  4094,  8190, ...
   9, 21,  48, 106, 227,  475,  978, 1992, 4029,  8113, 16292, ...
  10, 24,  54, 116, 242,  496, 1006, 2028, 4074,  8168, 16358, ...
  11, 26,  57, 120, 247,  502, 1013, 2036, 4083,  8178, 16369, ...
  13, 29,  61, 125, 253,  509, 1021, 2045, 4093,  8189, 16381, ...
  17, 38,  86, 192, 419,  894, 1872, 3864, 7893, 16006, 32298, ...
  18, 42,  96, 212, 454,  950, 1956, 3984, 8058, 16226, 32584, ...
  19, 45, 102, 222, 469,  971, 1984, 4020, 8103, 16281, 32650, ...
  20, 47, 105, 226, 474,  977, 1991, 4028, 8112, 16291, 32661, ...
  22, 51, 112, 237, 490,  999, 2020, 4065, 8158, 16347, 32728, ...
  23, 53, 115, 241, 495, 1005, 2027, 4073, 8167, 16357, 32739, ...
  25, 56, 119, 246, 501, 1012, 2035, 4082, 8177, 16368, 32751, ...
  28, 60, 124, 252, 508, 1020, 2044, 4092, 8188, 16380, 32764, ...
  ...
		

Crossrefs

Inverse permutation: A267102.
Transpose: A265903.
Cf. A265900 (main diagonal).
Cf. A162598 (row index of n in array), A265332 (column index of n in array).
Column 1: A188163.
Column 2: A266109.
Row 1: A000079 (2^n).
Row 2: A000225 (2^n - 1, from 3 onward).
Row 3: A000325 (2^n - n, from 5 onward).
Row 4: A000918 (2^n - 2, from 6 onward).
Row 5: A084634 (?, from 9 onward).
Row 6: A132732 (2^n - 2n + 2, from 10 onward).
Row 7: A000295 (2^n - n - 1, from 11 onward).
Row 8: A036563 (2^n - 3).
Row 9: A084635 (?, from 17 onward).
Row 12: A048492 (?, from 20 onward).
Row 13: A249453 (?, from 22 onward).
Row 14: A183155 (2^n - 2n + 1, from 23 onward. Cf. also A244331).
Row 15: A000247 (2^n - n - 2, from 25 onward).
Row 16: A028399 (2^n - 4).
Cf. also permutations A267111, A267112.

Programs

Formula

For the first column k=1, A(n,1) = A188163(n), for columns k > 1, A(n,k) = A087686(1+A(n,k-1)).

A267103 Row 3 of A265903; numbers that occur exactly three times in A004001.

Original entry on oeis.org

4, 15, 27, 30, 48, 54, 57, 61, 86, 96, 102, 105, 112, 115, 119, 124, 157, 172, 182, 188, 191, 202, 208, 211, 218, 221, 225, 233, 236, 240, 245, 251, 293, 314, 329, 339, 345, 348, 364, 374, 380, 383, 394, 400, 403, 410, 413, 417, 429, 435, 438, 445, 448, 452, 460, 463, 467, 472, 481, 484, 488, 493, 499, 506, 558
Offset: 1

Views

Author

Antti Karttunen, Jan 18 2016

Keywords

Comments

Numbers n for which A051135(n) = 3.

Crossrefs

Column 3 of A265901, row 3 of A265903.

Formula

a(n) = A087686(1+A266109(n)) = A087686(1+A087686(1+A188163(n))).
Showing 1-4 of 4 results.