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-10 of 17 results. Next

A096111 If n = 2^k - 1, then a(n) = k+1, otherwise a(n) = (A000523(n)+1)*a(A053645(n)).

Original entry on oeis.org

1, 2, 2, 3, 3, 6, 6, 4, 4, 8, 8, 12, 12, 24, 24, 5, 5, 10, 10, 15, 15, 30, 30, 20, 20, 40, 40, 60, 60, 120, 120, 6, 6, 12, 12, 18, 18, 36, 36, 24, 24, 48, 48, 72, 72, 144, 144, 30, 30, 60, 60, 90, 90, 180, 180, 120, 120, 240, 240, 360, 360, 720, 720, 7, 7, 14, 14, 21, 21
Offset: 0

Views

Author

Amarnath Murthy, Jun 29 2004

Keywords

Comments

Each n > 1 occurs 2*A045778(n) times in the sequence.
f(n+2^k) = (k+1)*f(n) if 2^k > n+1. - Robert Israel, Apr 25 2016
If the binary indices of n (row n of A048793) are the positions 1's in its reversed binary expansion, then a(n) is the product of all binary indices of n + 1. The number of binary indices of n is A000120(n), their sum is A029931(n), and their average is A326699(n)/A326700(n). - Gus Wiseman, Jul 27 2019

Crossrefs

Permutation of A096115, i.e. a(n) = A096115(A122198(n+1)) [Note the different starting offsets]. Bisection: A121663. Cf. A096113, A052330.
Cf. A029931.

Programs

  • Maple
    f:= proc(n) local L;
        L:= convert(2*n+2,base,2);
        convert(subs(0=NULL,zip(`*`,L, [$0..nops(L)-1])),`*`);
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 25 2016
  • Mathematica
    CoefficientList[(Product[1 + k x^(2^(k - 1)), {k, 7}] - 1)/x, x] (* Michael De Vlieger, Apr 08 2016 *)
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];Table[Times@@bpe[n+1],{n,0,100}] (* Gus Wiseman, Jul 26 2019 *)
  • PARI
    N=166; q='q+O('q^N);
    gf= (prod(n=1,1+ceil(log(N)/log(2)), 1+n*q^(2^(n-1)) ) - 1) / q;
    Vec(gf)
    /* Joerg Arndt, Oct 06 2012 */
  • Scheme
    (define (A096111 n) (cond ((pow2? (+ n 1)) (+ 2 (A000523 n))) (else (* (+ 1 (A000523 n)) (A096111 (A053645 n))))))
    (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
    

Formula

G.f.: ( prod(k>=1, 1+k*x^(2^(k-1)) )- 1 ) / x. - Vladeta Jovovic, Nov 08 2005
a(n) is the product of the exponents in the binary expansion of 2*n + 2. - Peter Kagey, Apr 24 2016

Extensions

Edited, extended and Scheme code added by Antti Karttunen, Aug 25 2006

A102370 "Sloping binary numbers": write numbers in binary under each other (right-justified), read diagonals in upward direction, convert to decimal.

Original entry on oeis.org

0, 3, 6, 5, 4, 15, 10, 9, 8, 11, 14, 13, 28, 23, 18, 17, 16, 19, 22, 21, 20, 31, 26, 25, 24, 27, 30, 61, 44, 39, 34, 33, 32, 35, 38, 37, 36, 47, 42, 41, 40, 43, 46, 45, 60, 55, 50, 49, 48, 51, 54, 53, 52, 63, 58, 57, 56, 59, 126, 93, 76, 71, 66, 65, 64, 67, 70, 69
Offset: 0

Views

Author

Philippe Deléham, Feb 13 2005

Keywords

Comments

All terms are distinct, but certain terms (see A102371) are missing. But see A103122.
Trajectory of 1 is 1, 3, 5, 15, 17, 19, 21, 31, 33, ..., see A103192.

Examples

			........0
........1
.......10
.......11
......100
......101
......110
......111
.....1000
.........
The upward-sloping diagonals are:
0
11
110
101
100
1111
1010
.......
giving 0, 3, 6, 5, 4, 15, 10, ...
The sequence has a natural decomposition into blocks (see the paper): 0; 3; 6, 5, 4; 15, 10, 9, 8, 11, 14, 13; 28, 23, 18, 17, 16, 19, 22, 21, 20, 31, 26, 25, 24, 27, 30; 61, ...
Reading the array of binary numbers along diagonals with slope 1 gives this sequence, slope 2 gives A105085, slope 0 gives A001477 and slope -1 gives A105033.
		

Crossrefs

Related sequences (1): A103542 (binary version), A102371 (complement), A103185, A103528, A103529, A103530, A103318, A034797, A103543, A103581, A103582, A103583.
Related sequences (2): A103584, A103585, A103586, A103587, A103127, A103192 (trajectory of 1), A103122, A103588, A103589, A103202 (sorted), A103205 (base 10 version).
Related sequences (3): A103747 (trajectory of 2), A103621, A103745, A103615, A103842, A103863, A104234, A104235, A103813, A105023, A105024, A105025, A105026, A105027, A105028.
Related sequences (4): A105029, A105030, A105031, A105032, A105033, A105034, A105035, A105108.

Programs

  • Haskell
    a102370 n = a102370_list !! n
    a102370_list = 0 : map (a105027 . toInteger) a062289_list
    -- Reinhard Zumkeller, Jul 21 2012
    
  • Maple
    A102370:=proc(n) local t1,l; t1:=n; for l from 1 to n do if n+l mod 2^l = 0 then t1:=t1+2^l; fi; od: t1; end;
  • Mathematica
    f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; Table[ f[n] + n, {n, 0, 71}] (* Robert G. Wilson v, Mar 21 2005 *)
  • PARI
    A102370(n)=n-1+sum(k=0,ceil(log(n+1)/log(2)),if((n+k)%2^k,0,2^k)) \\ Benoit Cloitre, Mar 20 2005
    
  • PARI
    {a(n) = if( n<1, 0, sum( k=0, length( binary( n)), bitand( n + k, 2^k)))} /* Michael Somos, Mar 26 2012 */
    
  • Python
    def a(n): return 0 if n<1 else sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)]) # Indranil Ghosh, May 03 2017

Formula

a(n) = n + Sum_{ k >= 1 such that n + k == 0 mod 2^k } 2^k. (Cf. A103185.) In particular, a(n) >= n. - N. J. A. Sloane, Mar 18 2005
a(n) = A105027(A062289(n)) for n > 0. - Reinhard Zumkeller, Jul 21 2012

Extensions

More terms from Benoit Cloitre, Mar 20 2005

A072639 a(0) = 0, a(n) = Sum_{i=0..n-1} 2^((2^i)-1).

Original entry on oeis.org

0, 1, 3, 11, 139, 32907, 2147516555, 9223372039002292363, 170141183460469231740910675754886398091, 57896044618658097711785492504343953926805133516280751251469702679711451218059
Offset: 0

Views

Author

Antti Karttunen, Jun 02 2002

Keywords

Comments

Maximum position in A072644 where the value n occurs.
Also partial sums of A058891, i.e. the first differences are there. - R. J. Mathar, May 15 2007
A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every finite set of finite nonempty sets has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18. Then a(n) is the minimum BII-number of a set-system with n distinct vertices. - Gus Wiseman, Jul 24 2019

Crossrefs

Binary width of each term: A000079. Cf. A072638, A072640, A072654.
Cf. A058891.

Programs

  • Maple
    A072639 := proc(n) local i; add(2^((2^i)-1),i=0..(n-1)); end;
  • Mathematica
    a[n_] := Sum[2^(2^i - 1), {i, 0, n - 1}]; Table[a[n], {n, 0, 9}] (* Jean-François Alcover, Mar 06 2016 *)
  • PARI
    a(n) = if (n, sum(i=0, n-1, 2^((2^i)-1)), 0); \\ Michel Marcus, Mar 06 2016

A126011 A106486-encodings for the minimal representatives of each equivalence class of the finite combinatorial games.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 9, 12, 18, 32, 33, 36, 48, 66, 67, 96, 97, 129, 131, 132, 134, 195, 256, 258, 264, 288, 384, 386, 516, 768, 4098, 4099, 4102, 4128, 4129, 4132, 4227, 4230, 8196, 8198, 8204, 8448, 8450, 8456, 12294, 262146, 262152, 262176, 262272
Offset: 0

Views

Author

Antti Karttunen, Dec 18 2006

Keywords

Comments

The initial terms correspond with the following games: code 0 = {|} = the zero game, code 1 = {0|} = game 1, code 2 = {|0} = game -1, code 3 = {0|0} = game *, code 4 = {1|} = game 2, code 6 = {1|0}, code 9 = {0|1} = game 1/2, code 12 = {1|1} = game 1*, code 18 = {-1|0} = game -1/2, code 32 = {|-1} = game -2, code 33 = {0|-1}, code 36 = {1|-1} = game +-1, code 48 = {-1|-1} = game -1*, code 66 = {*|0} = game down, code 67 = {0,*|0} = game up*, code 96 = {*|-1}, code 97 = {0,*|-1}, code 129 = {0|*} = game up, code 131 = {0|0,*} = game down*, code 132 = {1|*}, code 134 = {1|0,*}, code 195 = {0,*|0,*} = game *2, code 256 = {2|} = game 3. Encoding is explained in A106486.

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Second Edition, Vol. 1, A K Peters, 2001.
  • John H. Conway, On Numbers and Games, Second Edition, A K Peters, 2001.

Crossrefs

Records in A126012. Column 1 of A126000. Inverse: A126013. See also A126009 & A126010. A125990 gives the number of terms in range [0, 2^n[.
Sequences A034797, A034798, A079599 utilize a similar encoding system for impartial games.

Extensions

Table of terms added Jan 01 2007.

A103192 Trajectory of 1 under repeated application of the function n -> A102370(n).

Original entry on oeis.org

1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, 63, 65, 67, 69, 79, 81, 83, 85, 95, 97, 99, 101, 111, 113, 115, 117, 127, 129, 131, 133, 143, 145, 147, 149, 159, 161, 163, 165, 175, 177, 179, 181, 191, 193, 195, 197, 207, 209, 211, 213, 223, 225, 227, 229, 239, 241
Offset: 1

Views

Author

Keywords

Comments

Agrees with A103127 for the first 511 terms, but then diverges. If a(n) is the present sequence and b(n) is A103127 we have:
.n...a(n)..b(n)..difference
.....................
509, 2033, 2033, 0
510, 2035, 2035, 0
511, 2037, 2037, 0
512, 4095, 2047, 2048
513, 4097, 2049, 2048
514, 4099, 2051, 2048
515, 4101, 2053, 2048
516, 4111, 2063, 2048
.....................
The sequence may be computed as follows (from Philippe Deléham, May 08 2005).
Start with -1, 1. Then add powers of 2 whose exponent n is not in A034797: 1, 3, 11, 2059, 2^2059 + 2059, ... This gives
Step 0: -1, 1
Step 1: add 2^2 = 4, getting 3, 5 and thus -1, 1, 3, 5.
Step 2: add 2^4 = 16, getting 15, 17, 19, 21 and thus -1, 1, 3, 5, 15, 17, 19, 21
Step 3: add 2^5 = 32, getting 31, 33, 35, 37, 47, 49, 51, 53 and thus -1, 1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, etc.
The jump 2037 --> 4095 for n = 510 -> 511 is explained by the fact that we pass directly from 2^10 to 2^12 since 11 belongs to A034797.
The trajectories of 2 (A103747) and 7 (A103621) may surely be obtained in a similar way.

Programs

  • Haskell
    a103192 n = a103192_list !! (n-1)
    a103192_list = iterate (fromInteger . a102370) 1
    -- Reinhard Zumkeller, Jul 21 2012

A079599 Numbers n for which the n-th impartial game is a second player win.

Original entry on oeis.org

0, 2, 8, 10, 16, 18, 24, 26, 32, 34, 40, 42, 48, 50, 56, 58, 64, 66, 72, 74, 80, 82, 88, 90, 96, 98, 104, 106, 112, 114, 120, 122, 128, 130, 136, 138, 144, 146, 152, 154, 160, 162, 168, 170, 176, 178, 184, 186, 192, 194, 200, 202, 208, 210, 216, 218, 224, 226, 232, 234, 240, 242, 248, 250, 512, 514
Offset: 0

Views

Author

Rob Arthan, Jan 28 2003

Keywords

Comments

These are the indices n for which A034798(n) = 0.
From Antti Karttunen, Jan 30 2014: (Start)
A236678(a(n)) = n+1 for all n.
Differs from A047467 for the first time at a(64).
Differs from A126002(n+1) for the first time not later than at n=281474976710656 (= 2^48), as:
a((2^48)-1) = a(281474976710655) = 18085043209519168250 < 18446744073709551616 (= 2^64), while
a(2^48) = a(281474976710656) = 36893488147419103232 > 2^64.
(End)

Examples

			a(1) = 2 (rather than 1) because 1 = 2^0 = 2^a(0); a(64) = 512 (rather than 256) because 256 = 2^8 = 2^a(2).
		

References

  • J. H. Conway, On numbers and games.

Crossrefs

Characteristic function: A236677, its partial sums: A236678.

Programs

  • Scheme
    (define (A079599 n) (let loop ((n n) (i 0) (j 0) (s 0)) (cond ((zero? n) s) ((odd? n) (loop (/ (- n 1) 2) (+ i 1) (+ j 1 (A236677 j)) (+ s (expt 2 (+ j (A236677 j)))))) (else (loop (/ n 2) (+ i 1) (+ j 1 (A236677 j)) s)))))

Formula

a(0) = 0; a(n+1) = least x > a(n) such that the coefficient of 2^a(j) is zero in the binary expansion of x for all j < n+1
Alternatively: rewrite the binary representation of n in such a way that the forbidden bit-positions given by this sequence (with bit-position 0 standing for the least significant bit) are vacated, by shifting the rest of bits one bit left. E.g., bit-positions 0, 2, 8, 10, ... are forbidden, thus we rewrite 1 to 1x = 10 = 2, 2 (in binary 10) to 1x0x = 1000 = 8, 3 (in binary 11) to 1x1x = 1010 = 10, 4 (in binary 100) to 10x0x = 1000 = 16, 64 (in binary 1000000) to 1x00000x0x = 1000000000 = 512, etc. - Antti Karttunen, Jan 30 2014

Extensions

More terms from Antti Karttunen, Jan 29 2014

A089398 a(n) = n-th column sum of binary digits of k*2^(k-1), where summation is over k>=1, without carrying between columns.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Oct 30 2003

Keywords

Comments

sum(k=1,n, a(k)*2^(k-1)) = 2^A089399(n)+1 for n>2, with a(1)=a(2)=1.
Row sums of triangular arrays in A103588 and in A103589. - Philippe Deléham, Apr 04 2005
a(k) = 0 for k = 2, 10, 2058, 2058 + 2^2059, ..., that is, for k = A034797(n) - 1, n>=2. - Philippe Deléham, Nov 16 2007

Examples

			Binary expansions of k*2^(k-1), with bits in ascending order by powers of 2, are:
1
001
0011
000001
0000101
00000011
000000111
00000000001
000000001001
0000000000101
00000000001101
000000000000011
0000000000001011
.................
Giving column sums:
10211132203222433...
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{lg = Floor[Log[2, n]] + 1}, Sum[ Join[ Reverse[ IntegerDigits[n - i + 1, 2]], {0}][[i]], {i, lg}]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Mar 26 2005 *)

Formula

a(2^n)=n-1 (for n>0), a(2^n-1)=n (for n>0), a(2^n+1)=n-1 (for n>1), a(2^n-k)=n-A089400(k) (for n>k>0), a(2^n+k)=n-A089401(k) (for n>k>0), where sequences have limits: A089400={0, 2, 2, 2, 1, 4, 2, 2, 1, 3, 3, ...} and A089401={1, 1, 3, 2, 4, 5, 6, 5, 7, 8, 11, 9, ...},

A097911 Minimal order of a graph containing as induced subgraphs isomorphic copies of all graphs on n unlabeled nodes.

Original entry on oeis.org

1, 3, 5, 8, 10, 14
Offset: 1

Views

Author

Dan Schwarz (dan_schwarz(AT)hotmail.com), Sep 04 2004

Keywords

Comments

A graph that contains as induced subgraphs isomorphic copies of all graphs in a family F is called induced universal for F. - James Trimble, Nov 09 2021
16 <= a(7) <= 18 (Trimble, 2021). - James Trimble, Nov 09 2021

Examples

			a(3) = 5 as (P1 + K1)*K1 + K1 has 5 vertices and is easily seen minimal for 3. Here P1 is the path with one edge and K1 is an isolated vertex.
		

Crossrefs

Extensions

a(5)-a(6) added by James Trimble, Nov 09 2021

A103318 Number of solutions i in range [0,n-1] to i == 0 mod 2^(n-i).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2, 3, 3, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3
Offset: 1

Views

Author

N. J. A. Sloane, Mar 21 2005

Keywords

Comments

i=0 is always a solution.
a(n) is the number of 1's in (A103745(n) written in base 2). - Philippe Deléham, Apr 02 2005

Examples

			For n = 11 solutions are i = 0, 8 and 10. Four solutions occur for the first time at n = 2059: they are i = 0, 2048, 2056, 2058. Five solutions occur for the first time at n = 2^2059 + 2059 (see A034797).
		

Crossrefs

For records see A034797. Cf. A103745.

Programs

  • Maple
    f:= proc (n) local t1, l; t1 := 0; for l to n do if `mod`(n-l,2^l) = 0 then t1 := t1+1 end if end do; t1 end proc;
  • Mathematica
    f[n_] := Block[{c = 1, k = Max[1, n - Floor[ Log[2, n] + 2]]}, While[k < n, If[ Mod[k, 2^(n - k)] == 0, c++ ]; k++ ]; c]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Mar 21 2005 *)

Formula

a(n) = A104234(2^n - n). - Philippe Deléham, Apr 21 2005

A034798 Value of n considered as a game.

Original entry on oeis.org

0, 1, 0, 2, 1, 1, 2, 2, 0, 1, 0, 3, 1, 1, 3, 3, 0, 2, 0, 2, 2, 2, 2, 2, 0, 3, 0, 3, 3, 3, 3, 3, 0, 2, 0, 2, 2, 2, 2, 2, 0, 3, 0, 3, 3, 3, 3, 3, 0, 2, 0, 2, 2, 2, 2, 2, 0, 3, 0, 3, 3, 3, 3, 3, 0, 1, 0, 3, 1, 1, 3, 3, 0, 1, 0, 3, 1, 1, 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3
Offset: 0

Views

Author

Joseph Shipman (shipman(AT)savera.com)

Keywords

Crossrefs

See A034797 for more information.

Formula

a(n) = smallest number not equal to a(i) for some i representing a 1-bit in the binary expansion of n (least significant bit is 0th bit)

Extensions

More terms from David Wasserman, Jan 24 2002
Showing 1-10 of 17 results. Next