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.

A280705 a(n) = A002110(A280700(n)) = A046523(A283475(n)).

Original entry on oeis.org

1, 2, 6, 2, 30, 2, 6, 30, 210, 2, 6, 30, 30, 210, 30, 30, 2310, 2, 6, 30, 30, 210, 30, 30, 210, 2310, 30, 30, 210, 210, 30, 210, 30030, 2, 6, 30, 30, 210, 30, 30, 210, 2310, 30, 30, 210, 210, 30, 210, 2310, 30030, 30, 30, 210, 210, 30, 210, 2310, 2310, 30, 210, 210, 2310, 30030, 210, 510510, 2, 6, 30, 30, 210, 30, 30
Offset: 0

Views

Author

Antti Karttunen, Mar 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Prime@ Range@ DigitCount[2 n - DigitCount[2 n, 2, 1], 2, 1], {n, 0, 71}] (* or *)
    Map[Times @@ MapIndexed[Prime[First[#2]]^#1 &, Reverse@ Sort[FactorInteger[#][[All, -1]]]] - Boole[# == 1] &, Map[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[#, 2] &, Table[2 n - DigitCount[2 n, 2, 1], {n, 0, 71}]]] (* Michael De Vlieger, Mar 18 2017 *)
  • Scheme
    (define (A280705 n) (A002110 (A280700 n)))
    (define (A280705 n) (A046523 (A283475 n)))

Formula

a(n) = A002110(A280700(n)) = A046523(A283475(n)).

A283981 a(n) = A029931(n) - A280700(n).

Original entry on oeis.org

0, 0, 0, 2, 0, 3, 3, 3, 0, 4, 4, 4, 4, 4, 6, 7, 0, 5, 5, 5, 5, 5, 7, 8, 5, 5, 8, 9, 8, 9, 11, 11, 0, 6, 6, 6, 6, 6, 8, 9, 6, 6, 9, 10, 9, 10, 12, 12, 6, 6, 10, 11, 10, 11, 13, 13, 10, 11, 14, 14, 14, 14, 14, 17, 0, 7, 7, 7, 7, 7, 9, 10, 7, 7, 10, 11, 10, 11, 13, 13, 7, 7, 11, 12, 11, 12, 14, 14, 11, 12, 15, 15, 15, 15, 15, 18, 7, 7, 12, 13, 12, 13, 15, 15, 12
Offset: 0

Views

Author

Antti Karttunen, Mar 19 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[#.Reverse@ Range@ Length@ # &@ IntegerDigits[n, 2] - DigitCount[2 n - DigitCount[2 n, 2, 1], 2, 1], {n, 0, 120}] (* Michael De Vlieger, Mar 20 2017, after Jean-François Alcover at A029931 *)
  • PARI
    a(n) = if(n<1, 0, a(n - 2^logint(n,2)) + logint(n,2) + 1);
    b(n) = if(n<1, 0, b(n\2) + n%2);
    A(n) = b(2*n - b(2*n));
    for(n=0, 150, print1(a(n) - A(n),", ")) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    import math
    def L(n): return int(math.floor(math.log(n,2)))
    def a(n): return 0 if n<1 else a(n - 2**L(n)) + L(n) + 1
    def A(n): return bin(2*n - bin(2*n)[2:].count("1"))[2:].count("1")
    print([a(n) - A(n) for n in range(151)]) # Indranil Ghosh, Mar 21 2017
  • Scheme
    (define (A283981 n) (- (A029931 n) (A280700 n)))
    

Formula

a(n) = A029931(n) - A280700(n).
a(n) = A283982(n) + A124757(n).

A283982 a(0) = 0, and for n > 0, a(n) = A070939(n) - A280700(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 19 2017

Keywords

Crossrefs

Programs

Formula

a(0) = 0, for n > 0, a(n) = A070939(n) - A280700(n).
a(n) = A283981(n) - A124757(n).

A283475 a(n) = A019565(A005187(n)).

Original entry on oeis.org

1, 2, 6, 5, 30, 7, 21, 42, 210, 11, 33, 66, 165, 330, 154, 231, 2310, 13, 39, 78, 195, 390, 182, 273, 1365, 2730, 286, 429, 1430, 2145, 1001, 2002, 30030, 17, 51, 102, 255, 510, 238, 357, 1785, 3570, 374, 561, 1870, 2805, 1309, 2618, 19635, 39270, 442, 663, 2210, 3315, 1547, 3094, 15470, 23205, 2431, 4862, 12155
Offset: 0

Views

Author

Antti Karttunen, Mar 15 2017

Keywords

Crossrefs

Cf. A283476 (same sequence sorted into ascending order).

Programs

  • Mathematica
    Map[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[#, 2] &, Table[2 n - DigitCount[2 n, 2, 1], {n, 0, 60}]] (* Michael De Vlieger, Mar 16 2017 *)
  • Scheme
    (define (A283475 n) (A019565 (A005187 n)))

Formula

a(n) = A019565(A005187(n)).
Other identities:
If A004198(x,y) = 0, then a(x+y) = A097248(a(x)*a(y)).
For all n >= 1, a(A000051(n)) = A000040(n+2).
For all n >= 0, A001221(a(n)) = A001222(a(n)) = A280700(n).
For all n >= 0, A046523(a(n)) = A280705(n).

A352784 a(n) = w(n - w(n)), where w(n) is the binary weight of n, A000120(n).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Apr 02 2022

Keywords

Examples

			a(8) = A000120(8 - A000120(8)) = 3.
		

Crossrefs

Programs

  • Maple
    a:= n-> (w-> w(n-w(n)))(k-> add(i, i=Bits[Split](k))):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 24 2022
  • Mathematica
    w[n_] := DigitCount[n, 2, 1]; a[n_] := w[n - w[n]]; Array[a, 100, 0] (* Amiram Eldar, Apr 02 2022 *)
  • Python
    def w(n): return bin(n).count("1")
    def a(n): return w(n - w(n))
    print([a(n) for n in range(108)]) # Michael S. Branicky, Apr 02 2022

Formula

a(n) = A000120(n - A000120(n)); a(n) = A000120(A011371(n)).
a(n) = A280700(floor(n/2)). - Georg Fischer, Nov 29 2022
Showing 1-5 of 5 results.