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.

Previous Showing 41-50 of 71 results. Next

A103205 Write numbers in decimal under each other, then read diagonals in upward direction.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 29, 20, 21, 22, 23, 24, 25, 26, 27, 28, 39, 30, 31, 32, 33, 34, 35, 36, 37, 38, 49, 40, 41, 42, 43, 44, 45, 46, 47, 48, 59, 50, 51, 52, 53, 54, 55, 56, 57, 58, 69, 60, 61, 62, 63, 64, 65, 66, 67, 68, 79, 70, 71, 72, 73, 74, 75, 76, 77, 78, 89, 80, 81, 82, 83, 84, 85, 86, 87, 88
Offset: 0

Views

Author

N. J. A. Sloane, Mar 27 2005

Keywords

Comments

Decimal analog of A102370.

Crossrefs

Cf. A102370 (base 2), A109681 (base 3), A325644 (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), this sequence (base 10).

A037093 "Sloping binary representation" of Fibonacci numbers, slope = +1.

Original entry on oeis.org

0, 1, 3, 14, 57, 229, 916, 7761, 29567, 117474, 469113, 3973641, 15138352, 60146777, 240187355, 2070207870, 7733090689, 30791909229, 260408711716, 991495872825, 3942106110215, 15739612088946, 133333733918417
Offset: 0

Views

Author

Antti Karttunen, Jan 28 1999

Keywords

Examples

			When Fibonacci numbers are written in binary (see A004685), under each other as:
0000000 (0)
0000001 (1)
0000001 (1)
0000010 (2)
0000011 (3)
0000101 (5)
0001000 (8)
0001101 (13)
0010101 (21)
0100010 (34)
0110111 (55)
1011001 (89)
and one starts collecting their bits from column-0 to SW-direction (from the least to the most significant end), one gets 000... (0), ...00001 (1), ...00011 (3), ...001110 (14), etc. (See A102370 for similar transformation done on nonnegative integers).
		

Crossrefs

Same sequence in octal: A037098. Cf. also: A102370, A000045, A037094-A037095, A036284.

Formula

a(n) := Sum(bit_n(A000045(n+i), i)*(2^i), i=0..inf) [ bit_n := (x, n) -> `mod`(floor(x/(2^n)), 2); ]
In practice, n can be used as an upper limit instead of infinity.

Extensions

Entry revised Dec 29 2007

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Examples

			    0
    1
    2
    3
   10
   11
   12
   13
   20
   21
   22
   23
   30
   31
   32
   33
  100
...
The upward-sloping diagonals are:
0
1
2
13
10
11
12
23
20
21
22
33
30
31
132
103
100
...
giving 0, 1, 2, "7", 4, 5, 6, "11", 8, 9, 10, "15", 12, 13, "30", "19", 16, ...
		

Crossrefs

Cf. A102370 (base 2), A109681 (base3), this sequence (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).

Programs

  • Ruby
    def A(m, n)
      ary = [0]
      n.times{|i|
        (m ** i - i..m ** (i + 1) - i - 2).each{|j|
          ary << (0..i).inject(0){|s, k| s + (j + k).to_s(m)[-1 - k].to_i * m ** k}
        }
      }
      ary
    end
    p A(4, 4)

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Crossrefs

Cf. A102370 (base 2), A109681 (base3), A325644 (base 4), this sequence (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).

Programs

  • Ruby
    def A(m, n)
      ary = [0]
      n.times{|i|
        (m ** i - i..m ** (i + 1) - i - 2).each{|j|
          ary << (0..i).inject(0){|s, k| s + (j + k).to_s(m)[-1 - k].to_i * m ** k}
        }
      }
      ary
    end
    p A(5, 3)

A325692 "Sloping senary numbers": write numbers in senary (that is, base 6) under each other (right-justified), read diagonals in upward direction, convert to decimal.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Crossrefs

Cf. A102370 (base 2), A109681 (base 3), A325644 (base 4), A325645 (base 5), this sequence (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Crossrefs

Cf. A102370 (base 2), A109681 (base 3), A325644 (base 4), A325645 (base 5), A325692 (base 6), this sequence (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Crossrefs

Cf. A102370 (base 2), A109681 (base 3), A325644 (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), this sequence (base 8), A325829 (base 9), A103205 (base 10).

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Crossrefs

Cf. A102370 (base 2), A109681 (base 3), A325644 (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), this sequence (base 9), A103205 (base 10).

A103586 a(0)=1, for n > 0: n-th run consists of 2^n-1 copies of n+1.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Mar 24 2005

Keywords

Comments

a(A214489(n)) = A070939(A214489(n)).

Crossrefs

Number of bits in binary representation of A102370(n).
Cf. A000225.

Programs

  • Haskell
    a103586 n = a070939 (n + a070939 n)
    a103586_list = 1 : concat
       (zipWith (replicate . fromInteger) (tail a000225_list) [2..])
    -- Reinhard Zumkeller, Jul 21 2012
    
  • Mathematica
    Join[{1},Flatten[Table[PadRight[{},2^n-1,n+1],{n,6}]]] (* Harvey P. Dale, Aug 22 2021 *)
  • Python
    def A103586(n): return (m:=n.bit_length())+(n>=(1<Chai Wah Wu, Jun 30 2024

Formula

a(n) = A070939(n + A070939(n)) for n > 0. - Reinhard Zumkeller, Jul 21 2012

Extensions

a(0) = 1 added, definition and offset adjusted by Reinhard Zumkeller, Jul 21 2012

A103185 a(n) = Sum_{ k >= 0 such that n + k == 0 mod 2^k } 2^(k-1).

Original entry on oeis.org

0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 34, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 1, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 17, 8, 5, 2, 1, 0, 1, 2, 1, 0, 5, 2, 1
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2005

Keywords

Crossrefs

Cf. A102370(n).

Programs

  • 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 - 1)]; k++ ]; s]; Table[ f[n], {n, 0, 103}] (* Robert G. Wilson v, Mar 18 2005 *)
  • PARI
    A103185(n)=(sum(k=0,ceil(log(n+1)/log(2)),if((n+k)%2^k,0,2^k))-1)/2 \\ Benoit Cloitre, Mar 20 2005
    
  • Python
    def a102370(n): return 0 if n<1 else sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)])
    def a(n): return (a102370(n) - n)/2 # Indranil Ghosh, May 03 2017

Formula

a(n) = (A102370(n) - n)/2.

Extensions

More terms from Robert G. Wilson v, Mar 18 2005
Previous Showing 41-50 of 71 results. Next