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.

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)).

A255559 One-based column index of n in array A255555.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 14 2015

Keywords

Comments

Equally: One-based row index of n in array A255557.

Crossrefs

Cf. also A255560 (corresponding row index).

Formula

a(1) = 1; for n > 1, if A213714(n) = 0 [i.e., if n is one of the terms of A055938], then a(n) = 1, otherwise 1 + a(A213714(n)-1).
In other words, a(1) = 1, and for n > 1, if n = A005187(k) for some k, then a(n) = 1 + a(k-1), otherwise it must be that n is in A055938, in which case a(n) = 1.
Other identities and observations. For all n >= 1:
a(n) <= A256478(n) <= A070939(n).
a(n) <= A256993(n) + 1.

A256993 a(1) = 0; for n > 1, a(n) = 1 + a(A256992(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Comments

Number of iterations of A256992 needed to reach one when starting from n.

Crossrefs

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A256992(n)).
Other observations. For all n >= 1 it holds that:
a(n) >= A254110(n).
a(n) >= A256989(n).
a(n) >= A255559(n)-1.
Also it seems that a(n) - A070939(n) = -1, 0 or +1 for all n >= 1. [Compare A256991 and A256992 to see the connection.]
It is also very likely that a(n) <= A071542(n) for all n.
From Antti Karttunen, Dec 10 2016: (Start)
For all n >= 2, a(n) = A070939(A279341(n)) = A070939(A279343(n)).
For all n >= 2, a(n) = A279345(n) + A279346(n) - 1.
(End)

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

Original entry on oeis.org

2, 3, 5, 4, 8, 6, 7, 15, 10, 9, 11, 26, 18, 16, 12, 19, 49, 34, 31, 22, 13, 35, 95, 66, 57, 41, 23, 14, 67, 184, 130, 110, 79, 42, 25, 17, 131, 364, 258, 215, 153, 81, 47, 32, 20, 259, 723, 514, 424, 302, 159, 89, 63, 38, 21, 515, 1440, 1026, 844, 599, 312, 174, 120, 73, 39, 24, 1027, 2876, 2050, 1683, 1192, 620, 343, 236, 143, 74, 46, 27
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 A256997.
If we assume that a(1) = 1 (but which is not explicitly included here because outside of the array proper), then A256996 gives the inverse permutation.

Examples

			The top left corner of the array:
   2,  3,  4,   7,  11,  19,   35,   67,  131,  259,   515,  1027
   5,  8, 15,  26,  49,  95,  184,  364,  723, 1440,  2876,  5745
   6, 10, 18,  34,  66, 130,  258,  514, 1026, 2050,  4098,  8194
   9, 16, 31,  57, 110, 215,  424,  844, 1683, 3360,  6716, 13425
  12, 22, 41,  79, 153, 302,  599, 1192, 2380, 4755,  9504, 19004
  13, 23, 42,  81, 159, 312,  620, 1235, 2464, 4924,  9841, 19675
  14, 25, 47,  89, 174, 343,  680, 1356, 2707, 5408, 10812, 21617
  17, 32, 63, 120, 236, 467,  928, 1852, 3697, 7387, 14765, 29521
  20, 38, 73, 143, 281, 558, 1111, 2216, 4428, 8851, 17696, 35388
  21, 39, 74, 145, 287, 568, 1132, 2259, 4512, 9020, 18033, 36059
  ...
		

Crossrefs

Inverse permutation: A256996.
Transpose: A256997.
Cf. A005187, A055938 (column 1), A256994 (row 1), A256989 (column index), A256990 (row index).
Cf. also A254105, A255555 (variants), A114537, A246279 (other thematically similar constructions).

Programs

Formula

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

A256990 One-based row index of n in array A256995.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 14 2015

Keywords

Comments

Also one-based column index for array A256997.
a(1) = 0 by convention, as 1 is outside of the actual arrays A256995 & A256997.

Crossrefs

Cf. A256989 (corresponding column index), A255560.

Formula

a(1) = 0; for n > 1, if A213714(n) = 0 [i.e., if n is one of the terms of A055938], then a(n) = A234017(n), otherwise a(n) = a(A213714(n)).
In other words, a(1) = 0, and for n > 1, if n = A055938(k) for some k, then a(n) = k, otherwise it must be that n = A005187(h) for some h, in which case a(n) = a(h).

A256998 Inverse to A256997 considered as a permutation of natural numbers, with the assumed fixed term a(1) = 1.

Original entry on oeis.org

1, 2, 4, 7, 3, 5, 11, 6, 8, 9, 16, 12, 17, 23, 10, 13, 30, 14, 22, 38, 47, 18, 24, 57, 31, 15, 68, 80, 93, 107, 19, 39, 122, 20, 29, 138, 155, 48, 58, 173, 25, 32, 192, 212, 233, 69, 40, 255, 21, 81, 278, 302, 94, 108, 327, 123, 26, 353, 380, 408, 437, 467, 49, 139, 498, 27, 37, 530, 563, 156, 174, 597, 59, 70, 632, 668, 705, 193, 33, 743, 41
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2015

Keywords

Crossrefs

Inverse: A256997.
Cf. also A256996, A255558.

Programs

  • Scheme
    (define (A256998 n) (if (= 1 n) n (let ((row (A256989 n)) (col (A256990 n))) (+ 1 (* (/ 1 2) (- (expt (+ row col) 2) row col col col -2))))))

Formula

a(1) = 1, and for n > 1: a(n) = (1/2) * ((c+r)^2 - r - 3*c + 4), where r = A256989(n), and c = A256990(n).

A256996 Inverse to A256995 considered as a permutation of natural numbers, with assumed fixed initial term a(1) = 1.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 8, 6, 11, 10, 12, 16, 22, 29, 9, 15, 37, 14, 17, 46, 56, 21, 28, 67, 36, 13, 79, 92, 106, 121, 20, 45, 137, 19, 23, 154, 172, 55, 66, 191, 27, 35, 211, 232, 254, 78, 44, 277, 18, 91, 301, 326, 105, 120, 352, 136, 26, 379, 407, 436, 466, 497, 54, 153, 529, 25, 30, 562, 596, 171, 190, 631, 65, 77, 667, 704, 742, 210, 34, 781, 43
Offset: 1

Views

Author

Antti Karttunen, Apr 14 2015

Keywords

Crossrefs

Inverse: A256995.
Cf. also A256998, A255556.

Programs

  • Scheme
    (define (A256996 n) (if (= 1 n) n (let ((col (A256989 n)) (row (A256990 n))) (+ 1 (* (/ 1 2) (- (expt (+ row col) 2) row col col col -2))))))

Formula

a(1) = 1, and for n > 1: a(n) = (1/2) * ((c+r)^2 - r - 3*c + 4), where c = A256989(n), and r = A256990(n).
Showing 1-8 of 8 results.