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 11-20 of 303 results. Next

A098390 Prime(n)+Log2(prime(n)), where Log2=A000523.

Original entry on oeis.org

3, 4, 7, 9, 14, 16, 21, 23, 27, 33, 35, 42, 46, 48, 52, 58, 64, 66, 73, 77, 79, 85, 89, 95, 103, 107, 109, 113, 115, 119, 133, 138, 144, 146, 156, 158, 164, 170, 174, 180, 186, 188, 198, 200, 204, 206, 218, 230, 234, 236, 240, 246, 248, 258, 265, 271, 277, 279
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Comments

a(n) = A000040(n) + A098388(n).

Examples

			a(10) = A000040(10) + A098388(10) = 29 + 4 = 33.
		

Crossrefs

Programs

  • Mathematica
    #+Floor[Log[2,#]]&/@Prime[Range[60]] (* Harvey P. Dale, Dec 30 2011 *)

A080316 a(n) = A080315(n) - 2^A000523(A080315(n)), i.e., the terms of A080315 without their most significant bit.

Original entry on oeis.org

0, 12, 204, 240, 3276, 3312, 4032, 3852, 3888, 52428, 52464, 53184, 53004, 53040, 64524, 64560, 64704, 61644, 61680, 65280, 62400, 62220, 62256, 838860, 838896, 839616, 839436, 839472, 850956, 850992, 851136, 848076, 848112, 851712, 848832
Offset: 0

Views

Author

Antti Karttunen, Mar 02 2003

Keywords

Crossrefs

Same sequence in binary: A080317.

A096116 a(1)=1, if n=(2^k)+1, a(n) = k+2, otherwise a(n) = 2+A000523(n-1)+a(2+A035327(n-1)).

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 7, 6, 5, 11, 12, 14, 9, 10, 8, 7, 6, 13, 14, 16, 15, 20, 18, 17, 11, 12, 13, 15, 10, 11, 9, 8, 7, 15, 16, 18, 17, 22, 20, 19, 18, 24, 25, 27, 22, 23, 21, 20, 13, 14, 15, 17, 16, 21, 19, 18, 12, 13, 14, 16, 11, 12, 10, 9, 8, 17, 18, 20, 19, 24, 22, 21, 20, 26
Offset: 1

Views

Author

Amarnath Murthy, Jun 30 2004

Keywords

Comments

Each n > 1 occurs A025147(n) times in the sequence.

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, If[BitAnd[n - 1, n - 2] == 0, Log2[n - 1] + 2, 2 + Floor[Log2[n - 1]] + a[[2 + BitXor[n - 1, 2^Ceiling[Log2[n]] - 1]]]]], {n, 2, 74}]; a (* Ivan Neretin, Jun 24 2016 *)
  • Scheme
    (define (A096116 n) (cond ((= 1 n) 1) ((pow2? (- n 1)) (+ 2 (A000523 (- n 1)))) (else (+ 2 (A000523 (- n 1)) (A096116 (+ 2 (A035327 (- n 1))))))))
    (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
    ;; Antti Karttunen, Aug 25 2006

Extensions

Edited and extended by Antti Karttunen, Aug 25 2006

A098386 a(n) = prime(n)-Log2(n), where Log2 = A000523.

Original entry on oeis.org

2, 2, 4, 5, 9, 11, 15, 16, 20, 26, 28, 34, 38, 40, 44, 49, 55, 57, 63, 67, 69, 75, 79, 85, 93, 97, 99, 103, 105, 109, 123, 126, 132, 134, 144, 146, 152, 158, 162, 168, 174, 176, 186, 188, 192, 194, 206, 218, 222, 224, 228, 234, 236, 246, 252, 258, 264, 266, 272, 276
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Examples

			a(10) = A000040(10) - A000523(10) = 29 - 3 = 26.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[n]-Floor[Log2[n]],{n,60}] (* Harvey P. Dale, Nov 20 2021 *)

A098387 Prime(n)+Log2(n), where Log2=A000523.

Original entry on oeis.org

2, 4, 6, 9, 13, 15, 19, 22, 26, 32, 34, 40, 44, 46, 50, 57, 63, 65, 71, 75, 77, 83, 87, 93, 101, 105, 107, 111, 113, 117, 131, 136, 142, 144, 154, 156, 162, 168, 172, 178, 184, 186, 196, 198, 202, 204, 216, 228, 232, 234, 238, 244, 246, 256, 262, 268, 274, 276
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Examples

			a(10) = A000040(10) + A000523(10) = 29 + 3 = 32.
		

Crossrefs

A268726 Index of the toggled bit between n and A268717(n+1): a(n) = A000523(A003987(n, A268717(1+n))).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Comments

A fractal sequence, because a permutation of A007814. Removing zeros yields A268727(n) = a(n)+1.

Crossrefs

One less than A268727.
Cf. also array A268833.

Programs

Formula

a(n) = A007814(1 + A006068(n)).
a(n) = A000523(A003987(n, A268717(1+n))).
a(n) = floor(log_2(n XOR A003188(1 + A006068(n)))).
Other identities:
For all n >= 1, a(A003188(n-1)) = A007814(n).

A286574 Sum of the binary weights of the lengths of 1-runs in base-2 representation of n: a(n) = A000523(A286575(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 28 2017

Keywords

Comments

a(0) = 0 (an empty sum).

Examples

			For n = 27, "11011" in binary, there are two 1-runs, both of length 2, thus a(27) = A000120(2) + A000120(2) = 1 + 1 = 2.
For n = 29, "11101" in binary, there are two 1-runs, of lengths 1 and 3, thus a(29) = A000120(1) + A000120(3) = 1 + 2 = 3.
For n = 61, "111101" in binary, there are two 1-runs, of lengths 1 and 4, thus a(61) = A000120(1) + A000120(4) = 1 + 1 = 2.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, prime, log
    import math
    def wt(n): return bin(n).count("1")
    def a037445(n):
        f=factorint(n)
        return 2**sum([wt(f[i]) for i in f])
    def A(n): return n - 2**int(math.floor(log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a286575(n): return a037445(b(n))
    def a(n): return int(math.floor(log(a286575(n), 2))) # Indranil Ghosh, May 30 2017
    
  • Python
    # uses RLT function from A278159
    def A286574(n): return len(bin(RLT(n,lambda m: 2**(bin(m).count('1')))))-3 # Chai Wah Wu, Feb 04 2022
  • Scheme
    (define (A286574 n) (A000523 (A286575 n)))
    

Formula

a(n) = A000523(A286575(n)). [Log_2 of run-length transform of A001316.]
a(n) = A064547(A005940(1+n)).

A317359 a(0) = 0, a(1) = 1; for n >= 2, a(n) = freq(a(n-g(n)),n) where g = A000523 and freq(i, j) is the number of times i appears in the terms a(0) .. a(j-1).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Jul 26 2018

Keywords

Crossrefs

Programs

  • Maple
    b:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= `if`(n<2, n, b(a(n-ilog2(n))));
          b(t):= b(t)+1; t
        end:
    seq(a(n), n=0..200);  # Alois P. Heinz, Jul 26 2018
  • Mathematica
    c = <||>; f[n_] := If[KeyExistsQ[c, n], c[n], 0]; a[n_] := a[n] = Block[{v}, v = If[n < 2, n, f[a[n - Floor@ Log2@ n]]]; If[f[v] > 0, c[v] = c[v] + 1, c[v] = 1]; v]; Array[a, 96, 0] (* Giovanni Resta, Jul 26 2018 *)

A324728 Binary length of A324712: a(n) = 0 if A324712(n) = 0, otherwise a(n) = 1+A000523(A324712(n)).

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 4, 6, 5, 5, 5, 7, 3, 8, 5, 6, 6, 9, 5, 5, 7, 5, 6, 10, 6, 11, 6, 6, 8, 6, 6, 12, 9, 8, 6, 13, 5, 14, 7, 6, 10, 15, 6, 6, 4, 8, 8, 16, 3, 7, 7, 10, 11, 17, 5, 18, 12, 5, 7, 7, 7, 19, 9, 10, 5, 20, 7, 21, 13, 6, 10, 7, 7, 22, 7, 7, 14, 23, 7, 9, 15, 12, 8, 24, 7, 8, 11, 12, 16, 10, 7, 25, 5, 8, 7, 26, 9, 27, 9, 7
Offset: 1

Views

Author

Antti Karttunen, Mar 17 2019

Keywords

Crossrefs

Programs

Formula

If A324712(n) = 0, then a(n) = 0, otherwise a(n) = 1+A000523(A324712(n)).
a(A000040(n)) = n.

A324733 a(n) = 0 if A324712(n) = 0, otherwise a(n) = 1 + A000523(A324712(n)) - A007814(A324712(n)).

Original entry on oeis.org

0, 1, 2, 3, 3, 1, 4, 2, 4, 4, 5, 4, 6, 3, 4, 1, 7, 3, 8, 3, 6, 5, 9, 2, 5, 6, 3, 6, 10, 4, 11, 3, 5, 7, 5, 4, 12, 7, 6, 1, 13, 2, 14, 7, 6, 9, 15, 3, 6, 4, 1, 8, 16, 1, 7, 5, 8, 8, 17, 4, 18, 11, 3, 4, 6, 7, 19, 9, 9, 4, 20, 5, 21, 12, 6, 10, 6, 7, 22, 4, 3, 13, 23, 7, 6, 14, 10, 5, 24, 7, 8, 11, 11, 15, 8, 3, 25, 2, 8, 6, 26, 9, 27, 2, 5
Offset: 1

Views

Author

Antti Karttunen, Mar 17 2019

Keywords

Crossrefs

Programs

Formula

If A324712(n) = 0, then a(n) = 0, otherwise a(n) = 1 + A324728(n) - A324724(n).
Previous Showing 11-20 of 303 results. Next