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

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

A034797 a(0) = 0; a(n+1) = a(n) + 2^a(n).

Original entry on oeis.org

0, 1, 3, 11, 2059
Offset: 0

Views

Author

Joseph Shipman (shipman(AT)savera.com)

Keywords

Comments

First impartial game with value n, using natural enumeration of impartial games.
The natural 1-1 correspondence between nonnegative numbers and hereditarily finite sets is given by f(A)=sum over members m of A of 2^f(m). A set can be considered an impartial game where the legal moves are the members. The value of an impartial game is always an ordinal (for finite games, an integer).
The next term, a(5) = 2^2059 + 2059, has 620 decimal digits and is too large to include. - Olivier Gérard, Jun 26 2001
Positions of records in A103318. - N. J. A. Sloane and David Applegate, Mar 21 2005
The first n terms in this sequence form the lexicographically earliest n-vertex clique in the Ackermann-Rado encoding of the Rado graph (an infinite graph in which vertex i is adjacent to vertex j, with iDavid Eppstein, Aug 22 2014
This sequence was used by Spiro to bound the density of refactorable numbers (A033950). - David Eppstein, Aug 22 2014
For any positive integer m, a(1), a(2), ..., a(3^m) modulo 3^m form a complete residue set. - Yifan Xie, Aug 19 2025

References

  • J. H. Conway, On Numbers and Games, Academic Press.

Crossrefs

Programs

A103319 Primes of the form p! + 1 where p is prime.

Original entry on oeis.org

3, 7, 39916801, 13763753091226345046315979581580902400000001, 33452526613163807108170062053440751665152000000001, 4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000001
Offset: 1

Views

Author

Jonathan Sondow, Jan 31 2005

Keywords

Comments

The values of p are 2, 3, 11, 37, 41, 73 which is A093804 (with a different definition). Subsequence of A088332 (primes of the form n! + 1).

Examples

			2 and 2! + 1 = 3 are prime, so 3 is a member.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A2.

Crossrefs

Programs

  • Mathematica
    Select[Table[p!+1,{p,Prime[Range[30]]}],PrimeQ] (* Harvey P. Dale, Nov 28 2019 *)

A105032 Binary equivalents of A103745.

Original entry on oeis.org

1, 10, 101, 1000, 10001, 100010, 1000001, 10000000, 100000001, 1000000010, 10000000101, 100000000000, 1000000000001, 10000000000010, 100000000000001, 1000000000000000, 10000000000000001, 100000000000000010, 1000000000000000101, 10000000000000001000, 100000000000000000001, 1000000000000000000010, 10000000000000000000001
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

a(n) = A007088(A103745(n)). - R. J. Mathar, May 02 2007

Extensions

More terms from R. J. Mathar, May 02 2007

A105553 a(n) is the number of 1's in A103528(n) written in base 2.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, May 03 2005

Keywords

Crossrefs

For records see A034797. Cf. A103318, A103528.

Formula

a(n) = A103318(n) - 1.
Showing 1-5 of 5 results.