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

A254108 Inverse permutation to A254107.

Original entry on oeis.org

1, 3, 2, 4, 6, 5, 7, 11, 8, 16, 22, 10, 9, 12, 29, 37, 17, 46, 56, 13, 23, 67, 79, 30, 92, 106, 15, 14, 18, 38, 121, 137, 47, 154, 172, 24, 57, 191, 211, 68, 232, 254, 19, 31, 80, 277, 301, 93, 326, 352, 39, 107, 379, 407, 122, 436, 466, 21, 20, 25, 48, 138, 497, 529, 155, 562, 596, 58, 173, 631, 667, 192, 704, 742, 32, 69, 212
Offset: 1

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Crossrefs

Inverse: A254107.

Programs

  • Scheme
    (define (A254108 n) (let ((col (A254111 n)) (row (A254112 n))) (* (/ 1 2) (- (expt (+ col row) 2) col row row row -2))))

A055938 Integers not generated by b(n) = b(floor(n/2)) + n (complement of A005187).

Original entry on oeis.org

2, 5, 6, 9, 12, 13, 14, 17, 20, 21, 24, 27, 28, 29, 30, 33, 36, 37, 40, 43, 44, 45, 48, 51, 52, 55, 58, 59, 60, 61, 62, 65, 68, 69, 72, 75, 76, 77, 80, 83, 84, 87, 90, 91, 92, 93, 96, 99, 100, 103, 106, 107, 108, 111, 114, 115, 118, 121, 122, 123, 124, 125, 126, 129
Offset: 1

Views

Author

Alford Arnold, Jul 21 2000

Keywords

Comments

Note that the lengths of the consecutive runs in a(n) form sequence A001511.
Integers that are not a sum of distinct integers of the form 2^k-1. - Vladeta Jovovic, Jan 24 2003
Also n! never ends in this many 0's in base 2 - Carl R. White, Jan 21 2008
A079559(a(n)) = 0. - Reinhard Zumkeller, Mar 18 2009
These numbers are dead-end points when trying to apply the iterated process depicted in A071542 in reverse, i.e. these are positive integers i such that there does not exist k with A000120(i+k)=k. See also comments at A179016. - Antti Karttunen, Oct 26 2012
Conjecture: a(n)=b(n) defined as b(1)=2, for n>1, b(n+1)=b(n)+1 if n is already in the sequence, b(n+1)=b(n)+3 otherwise. If so, then see Cloitre comment in A080578. - Ralf Stephan, Dec 27 2013
Numbers n for which A257265(m) = 0. - Reinhard Zumkeller, May 06 2015. Typo corrected by Antti Karttunen, Aug 08 2015
Numbers which have a 2 in their skew-binary representation (cf. A169683). - Allan C. Wechsler, Feb 28 2025

Examples

			Since A005187 begins 0 1 3 4 7 8 10 11 15 16 18 19 22 23 25 26 31... this sequence begins 2 5 6 9 12 13 14 17 20 21
		

Crossrefs

Complement of A005187. Setwise difference of A213713 and A213717.
Row 1 of arrays A257264, A256997 and also of A255557 (when prepended with 1). Equally: column 1 of A256995 and A255555.
Cf. also arrays A254105, A254107 and permutations A233276, A233278.
Left inverses: A234017, A256992.
Gives positions of zeros in A213714, A213723, A213724, A213731, A257265, positions of ones in A213725-A213727 and A256989, positions of nonzeros in A254110.
Cf. also A010061 (integers that are not a sum of distinct integers of the form 2^k+1).
Analogous sequence for factorial base number system: A219658, for Fibonacci number system: A219638, for base-3: A096346. Cf. also A136767-A136774.

Programs

  • Haskell
    a055938 n = a055938_list !! (n-1)
    a055938_list = concat $
       zipWith (\u v -> [u+1..v-1]) a005187_list $ tail a005187_list
    -- Reinhard Zumkeller, Nov 07 2011
    
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_Integer] := a[Floor[n/2]] + n; b = {}; Do[ b = Append[b, a[n]], {n, 0, 105}]; c =Table[n, {n, 0, 200}]; Complement[c, b]
    (* Second program: *)
    t = Table[IntegerExponent[(2n)!, 2], {n, 0, 100}]; Complement[Range[t // Last], t] (* Jean-François Alcover, Nov 15 2016 *)
  • PARI
    L=listcreate();for(n=1,1000,for(k=2*n-hammingweight(n)+1,2*n+1-hammingweight(n+1),listput(L,k)));Vec(L) \\ Ralf Stephan, Dec 27 2013
    
  • Python
    def a053644(n): return 0 if n==0 else 2**(len(bin(n)[2:]) - 1)
    def a043545(n):
        x=bin(n)[2:]
        return int(max(x)) - int(min(x))
    def a079559(n): return 1 if n==0 else a043545(n + 1)*a079559(n + 1 - a053644(n + 1))
    print([n for n in range(1, 201) if a079559(n)==0]) # Indranil Ghosh, Jun 11 2017, after the comment by Reinhard Zumkeller
  • Scheme
    ;; utilizing COMPLEMENT-macro from Antti Karttunen's IntSeq-library)
    (define A055938 (COMPLEMENT 1 A005187))
    ;; Antti Karttunen, Aug 08 2015
    

Formula

a(n) = A080578(n+1) - 2 = A080468(n+1) + 2*n (conjectured). - Ralf Stephan, Dec 27 2013
From Antti Karttunen, Aug 08 2015: (Start)
Other identities. For all n >= 1:
A234017(a(n)) = n.
A256992(a(n)) = n.
A257126(n) = a(n) - A005187(n).
(End)

Extensions

More terms from Robert G. Wilson v, Jul 24 2000

A256997 Square array A(row,col) read by antidiagonals: A(1,col) = A055938(col), and for row > 1, A(row,col) = A005187(A(row-1,col)).

Original entry on oeis.org

2, 5, 3, 6, 8, 4, 9, 10, 15, 7, 12, 16, 18, 26, 11, 13, 22, 31, 34, 49, 19, 14, 23, 41, 57, 66, 95, 35, 17, 25, 42, 79, 110, 130, 184, 67, 20, 32, 47, 81, 153, 215, 258, 364, 131, 21, 38, 63, 89, 159, 302, 424, 514, 723, 259, 24, 39, 73, 120, 174, 312, 599, 844, 1026, 1440, 515, 27, 46, 74, 143, 236, 343, 620, 1192, 1683, 2050, 2876, 1027
Offset: 2

Views

Author

Antti Karttunen, Apr 14 2015

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
This is transpose of array A256995.
If we assume that a(1) = 1 (but which is not explicitly included here because outside of the array proper), then A256998 gives the inverse permutation.

Examples

			The top left corner of the array:
    2,    5,    6,    9,   12,   13,   14,   17,   20,   21,    24,    27
    3,    8,   10,   16,   22,   23,   25,   32,   38,   39,    46,    50
    4,   15,   18,   31,   41,   42,   47,   63,   73,   74,    88,    97
    7,   26,   34,   57,   79,   81,   89,  120,  143,  145,   173,   191
   11,   49,   66,  110,  153,  159,  174,  236,  281,  287,   341,   375
   19,   95,  130,  215,  302,  312,  343,  467,  558,  568,   677,   743
   35,  184,  258,  424,  599,  620,  680,  928, 1111, 1132,  1349,  1479
   67,  364,  514,  844, 1192, 1235, 1356, 1852, 2216, 2259,  2693,  2951
  131,  723, 1026, 1683, 2380, 2464, 2707, 3697, 4428, 4512,  5381,  5895
  259, 1440, 2050, 3360, 4755, 4924, 5408, 7387, 8851, 9020, 10757, 11783
  ...
		

Crossrefs

Cf. A005187, A055938 (row 1), A256994 (column 1), A256989 (row index), A256990 (column index).
Inverse: A256998.
Transpose: A256995.
Cf. also A254107, A255557 (variants), A246278 (another thematically similar construction).

Programs

Formula

A(1,col) = A055938(col), and for row > 1, A(row,col) = A005187(A(row-1,col)).

A254105 Dispersion of A055938; starting from its complementary sequence A005187 as the first column of square array A(row,col), read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 12, 13, 9, 7, 27, 28, 20, 14, 8, 58, 59, 43, 29, 17, 10, 121, 122, 90, 60, 36, 21, 11, 248, 249, 185, 123, 75, 44, 24, 15, 503, 504, 376, 250, 154, 91, 51, 30, 16, 1014, 1015, 759, 505, 313, 186, 106, 61, 33, 18, 2037, 2038, 1526, 1016, 632, 377, 217, 124, 68, 37, 19, 4084, 4085, 3061, 2039, 1271, 760, 440, 251, 139, 76, 40, 22
Offset: 1

Views

Author

Antti Karttunen, Jan 26 2015

Keywords

Comments

This sequence is one instance of Clark Kimberling's generic dispersion arrays. Paraphrasing his explanation in A191450, mutatis mutandis, we have the following definition:
Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n) = {index of the row of D that contains n} is a fractal sequence. In this case s(n) = A055938(n), t(n) = A005187(n) [from term A005187(1) onward] and u(n) = A254112(n).
For other examples of such sequences, see the Crossrefs section. For a general introduction, please follow the Kimberling references.
The main diagonal: 1, 6, 20, 60, 154, 377, 887, 2040, 4598, 10229, 22515, 49139, ...

Examples

			The top left corner of the array:
   1,  2,  5,  12,  27,  58,  121,  248,  503,  1014,  2037,  4084
   3,  6, 13,  28,  59, 122,  249,  504, 1015,  2038,  4085,  8180
   4,  9, 20,  43,  90, 185,  376,  759, 1526,  3061,  6132, 12275
   7, 14, 29,  60, 123, 250,  505, 1016, 2039,  4086,  8181, 16372
   8, 17, 36,  75, 154, 313,  632, 1271, 2550,  5109, 10228, 20467
  10, 21, 44,  91, 186, 377,  760, 1527, 3062,  6133, 12276, 24563
  11, 24, 51, 106, 217, 440,  887, 1782, 3573,  7156, 14323, 28658
  15, 30, 61, 124, 251, 506, 1017, 2040, 4087,  8182, 16373, 32756
  16, 33, 68, 139, 282, 569, 1144, 2295, 4598,  9205, 18420, 36851
  18, 37, 76, 155, 314, 633, 1272, 2551, 5110, 10229, 20468, 40947
etc.
		

Crossrefs

Inverse: A254106.
Transpose: A254107.
Column 1: A005187.
Cf. also A000325, A095768, A123720 (Seem to be rows 1 - 3, the last one from its second term onward.)
Columnd index of n: A254111, Row index: A254112.
Examples of other arrays of dispersions: A114537, A035513, A035506, A191449, A191450, A191426-A191455.

Programs

Formula

If col = 1, then A(row,col) = A005187(row), otherwise A(row,col) = A055938(A(row,col-1)).

A255557 Square array A(row,col): A(1,1) = 1, A(1,col) = A055938(col-1), and for row > 1: A(row,col) = A005187(1+A(row-1,col)).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 10, 8, 15, 9, 11, 19, 16, 31, 12, 18, 22, 38, 32, 63, 13, 23, 35, 42, 74, 64, 127, 14, 25, 46, 70, 82, 146, 128, 255, 17, 26, 49, 89, 138, 162, 290, 256, 511, 20, 34, 50, 97, 176, 274, 322, 578, 512, 1023, 21, 39, 67, 98, 193, 350, 546, 642, 1154, 1024, 2047, 24, 41, 78, 134, 194, 385, 695, 1090, 1282, 2306, 2048, 4095
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2015

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
This is transpose of array A255555, see comments and links given there.

Examples

			The top left corner of the array:
     1,    2,    5,    6,    9,   12,   13,   14,   17,   20,    21,    24
     3,    4,   10,   11,   18,   23,   25,   26,   34,   39,    41,    47
     7,    8,   19,   22,   35,   46,   49,   50,   67,   78,    81,    94
    15,   16,   38,   42,   70,   89,   97,   98,  134,  153,   161,   184
    31,   32,   74,   82,  138,  176,  193,  194,  266,  304,   321,   365
    63,   64,  146,  162,  274,  350,  385,  386,  530,  606,   641,   726
   127,  128,  290,  322,  546,  695,  769,  770, 1058, 1207,  1281,  1447
   255,  256,  578,  642, 1090, 1387, 1537, 1538, 2114, 2411,  2561,  2891
   511,  512, 1154, 1282, 2178, 2770, 3073, 3074, 4226, 4818,  5121,  5778
  1023, 1024, 2306, 2562, 4354, 5535, 6145, 6146, 8450, 9631, 10241, 11551
  ...
		

Crossrefs

Inverse permutation: A255558.
Transpose: A255555.
Column 1: A000225.
Cf. A255559 (row index), A255560 (column index).
Cf. also A254107, A256997 (variants).

Programs

Formula

A(row,col): A(1,1) = 1, and for the rest of topmost row: A(1,col) = A055938(col-1), and for any row > 1: A(row,col) = A005187(1+A(row-1,col)).

A254111 One-based column index of n in A254105: If A234017(n) = 0, then a(n) = 1, otherwise a(n) = 1 + a(A234017(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Crossrefs

One more than A254110.
Column index of n in A254105, Row index for A254107.

Formula

If A234017(n) = 0, then a(n) = 1, otherwise a(n) = 1 + a(A234017(n)).

A254112 Row index of n in A254105: If A234017(n) = 0, then a(n) = A213714(n), otherwise a(n) = a(A234017(n)).

Original entry on oeis.org

1, 1, 2, 3, 1, 2, 4, 5, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 11, 3, 6, 12, 13, 7, 14, 15, 1, 2, 4, 8, 16, 17, 9, 18, 19, 5, 10, 20, 21, 11, 22, 23, 3, 6, 12, 24, 25, 13, 26, 27, 7, 14, 28, 29, 15, 30, 31, 1, 2, 4, 8, 16, 32, 33, 17, 34, 35, 9, 18, 36, 37, 19, 38, 39, 5, 10, 20, 40, 41, 21, 42, 43, 11, 22, 44, 45, 23, 46, 47, 3, 6, 12, 24, 48, 49, 25, 50
Offset: 1

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Crossrefs

Row index of n in A254105. Column index for A254107.
Cf. A254111 (corresponding column index).

Formula

If A234017(n) = 0, then a(n) = A213714(n), otherwise a(n) = a(A234017(n)).

A254110 Zero-based column index of n in A254105: if A234017(n) = 0, then a(n) = 0, otherwise a(n) = 1 + a(A234017(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Crossrefs

One less than A254111.

Formula

If A234017(n) = 0, then a(n) = 0, otherwise a(n) = 1 + a(A234017(n)).
Showing 1-8 of 8 results.