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 21-30 of 240 results. Next

A279339 a(1) = 1; for n > 1, if n is even, a(n) = A055938(a(n/2)), otherwise a(n) = A005187(a(A064989(n))).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 7, 12, 8, 9, 11, 13, 19, 14, 10, 27, 35, 17, 67, 20, 16, 24, 131, 28, 15, 40, 22, 29, 259, 21, 515, 58, 25, 72, 18, 36, 1027, 136, 46, 43, 2051, 33, 4099, 51, 23, 264, 8195, 59, 26, 30, 78, 83, 16387, 45, 31, 60, 142, 520, 32771, 44, 65539, 1032, 38, 121, 47, 52, 131075, 147, 270, 37, 262147, 75, 524291, 2056, 32, 275, 34, 93
Offset: 1

Views

Author

Antti Karttunen, Dec 10 2016

Keywords

Comments

A more recursed variant of A279337.

Crossrefs

Inverse: A279338.
Related or similar permutations: A156552, A243071, A279337, A279342, A279344.

Programs

Formula

a(1) = 1; for n > 1, if n is even, a(n) = A055938(a(n/2)), otherwise a(n) = A005187(a(A064989(n))).
As a composition of other permutations:
a(n) = A279342(A243071(n)).
a(n) = A279344(A156552(n)).

A300244 Difference between A005187 and its Möbius transform (A297111).

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 4, 10, 1, 14, 1, 13, 11, 15, 1, 22, 1, 22, 14, 21, 1, 30, 8, 25, 16, 29, 1, 40, 1, 31, 22, 34, 18, 46, 1, 37, 26, 46, 1, 57, 1, 45, 38, 44, 1, 62, 11, 57, 35, 53, 1, 68, 26, 61, 38, 56, 1, 84, 1, 59, 51, 63, 30, 90, 1, 70, 45, 89, 1, 94, 1, 73, 65, 77, 29, 104, 1, 94, 50, 81, 1, 117, 39, 84, 57, 93, 1, 128, 33, 92, 60, 91, 42
Offset: 1

Views

Author

Antti Karttunen, Mar 10 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[(2 n)!, 2] - DivisorSum[n, IntegerExponent[(2 #)!, 2] MoebiusMu[n/#] &], {n, 95}] (* or *)
    Fold[Function[{a, n}, Append[a, {Abs@ Total@ Map[MoebiusMu[n/#] a[[#, -1]] &, Most@ Divisors@ n], IntegerExponent[(2 n)!, 2]}]], {{0, 1}}, Range[2, 95]][[All, 1]] (* Michael De Vlieger, Mar 10 2018 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A300244(n) = -sumdiv(n,d,(dA005187(d));

Formula

a(n) = A005187(n) - A297111(n).
a(n) = -Sum_{d|n, dA008683(n/d)*A005187(d).

A279342 a(0) = 1, a(1) = 2, a(2n) = A055938(a(n)), a(2n+1) = A005187(a(n)).

Original entry on oeis.org

1, 2, 5, 3, 12, 8, 6, 4, 27, 22, 17, 15, 13, 10, 9, 7, 58, 50, 45, 41, 36, 32, 30, 26, 28, 23, 21, 18, 20, 16, 14, 11, 121, 112, 103, 97, 92, 86, 84, 79, 75, 70, 65, 63, 61, 56, 55, 49, 59, 53, 48, 42, 44, 39, 37, 34, 43, 38, 33, 31, 29, 25, 24, 19, 248, 237, 227, 221, 210, 201, 196, 191, 187, 180, 175, 168, 171, 165, 160, 153, 154, 146, 141
Offset: 0

Views

Author

Antti Karttunen, Dec 10 2016

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
This sequence can be represented as a binary tree. Each left hand child is produced as A055938(n), and each right hand child as A005187(n), when the parent node contains n:
1
|
...................2...................
5 3
12......../ \........8 6......../ \........4
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
27 22 17 15 13 10 9 7
58 50 45 41 36 32 30 26 28 23 21 18 20 16 14 11
etc.

Crossrefs

Inverse: A279341.
Right edge: A256994.
Related or similar permutations: A054429, A163511, A233278, A256997, A279339, A279344, A279347.

Programs

Formula

a(0) = 1, a(1) = 2, and then after, a(2n) = A055938(a(n)), a(2n+1) = A005187(a(n)).
As a composition of other permutations:
a(n) = A279344(A054429(n)).
a(n) = A279347(A279344(n)).
a(n) = A279339(A163511(n)).

A279344 a(0) = 1, a(2n) = A005187(a(n)), a(2n+1) = A055938(a(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 10 2016

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
This sequence can be represented as a binary tree. Each left hand child is produced as A005187(n), and each right hand child as A055938(n), when the parent node contains n:
1
|
...................2...................
3 5
4......../ \........6 8......../ \........12
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 9 10 13 15 17 22 27
11 14 16 20 18 21 23 28 26 30 32 36 41 45 50 58
etc.

Crossrefs

Inverse: A279343.
Left edge: A256994.
Related or similar permutations: A005940, A054429, A233276, A256997, A279339, A279342, A279347.

Programs

Formula

a(0) = 1, after which, a(2n) = A005187(a(n)), a(2n+1) = A055938(a(n)).
As a composition of other permutations:
a(n) = A279342(A054429(n)).
a(n) = A279347(A279342(n)).
a(n) = A279339(A005940(1+n)).

A279347 Self-inverse permutation of natural numbers: a(1) = 1, a(2) = 2, a(A055938(n)) = A005187(a(n)), a(A005187(n)) = A055938(a(n)).

Original entry on oeis.org

1, 2, 5, 12, 3, 8, 27, 6, 22, 17, 58, 4, 15, 50, 13, 45, 10, 36, 121, 41, 32, 9, 30, 112, 103, 28, 7, 26, 97, 23, 92, 21, 86, 75, 248, 18, 70, 84, 65, 237, 20, 61, 79, 63, 16, 227, 210, 56, 59, 14, 221, 201, 55, 196, 53, 48, 187, 11, 49, 191, 42, 180, 44, 175, 39, 154, 503, 168, 146, 37, 141, 491, 171, 132, 34, 137, 165, 478, 43, 128
Offset: 1

Views

Author

Antti Karttunen, Dec 10 2016

Keywords

Examples

			a(1) = 1 and a(2) = 2 by definition.
Because A005187(2) = 3, a(3) = A055938(a(2)) = 5, and vice versa, as A055938(2) = 5, a(5) = A005187(a(2)) = 3.
Because A005187(3) = 4, a(4) = A055938(a(3)) = A055938(5) = 12.
Because A055938(3) = 6, a(6) = A005187(a(3)) = A005187(5) = 8.
		

Crossrefs

Related or similar permutations: A279341, A279342, A279343, A279344.

Programs

Formula

a(1) = 1, a(2) = 2, for n > 2, A079559(n) = 0 [when n is a term of A055938], a(n) = A005187(a(A256992(n))), otherwise a(n) = A055938(a(A256992(n))).
As a composition of other permutations:
a(n) = A279342(A279343(n)).
a(n) = A279344(A279341(n)).

A323247 a(n) = A005187(A156552(n)).

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 15, 11, 10, 16, 31, 19, 63, 32, 18, 26, 127, 23, 255, 35, 34, 64, 511, 42, 22, 128, 25, 67, 1023, 39, 2047, 57, 66, 256, 38, 50, 4095, 512, 130, 74, 8191, 71, 16383, 131, 41, 1024, 32767, 89, 46, 47, 258, 259, 65535, 54, 70, 138, 514, 2048, 131071, 82, 262143, 4096, 73, 120, 134, 135, 524287, 515
Offset: 1

Views

Author

Antti Karttunen, Jan 10 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A005187(A156552(n)).
a(n) = A323243(n) + A323248(n).
For n >= 2, a(A253560(n)) = a(n*A006530(n)) = a(n) + A000225(A001222(n)).
For n >= 1 and k >= 1, a(n*A000040(k+A000720(A006530(n)))) = a(n) + A000225(k+A001222(n)).

A324287 a(n) = A002487(A005187(n)).

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 3, 5, 4, 1, 4, 7, 5, 7, 7, 5, 5, 1, 5, 9, 7, 10, 11, 8, 7, 9, 9, 7, 13, 8, 3, 10, 6, 1, 6, 11, 9, 13, 15, 11, 10, 13, 14, 11, 21, 13, 5, 17, 9, 11, 11, 9, 19, 12, 5, 18, 19, 11, 3, 13, 7, 18, 15, 4, 7, 1, 7, 13, 11, 16, 19, 14, 13, 17, 19, 15, 29, 18, 7, 24, 13, 16, 17, 14, 30, 19, 8, 29, 31, 18, 5, 22, 12, 31, 26, 7
Offset: 0

Views

Author

Antti Karttunen, Feb 20 2019

Keywords

Comments

The motivation for this kind of sequence was a question: what kind of simply defined non-injective functions f exist such that this sequence can be defined as their function, e.g., as a(n) = g(f(n)), where g is a nontrivial integer-valued function? The same question can also be asked about A324288, A324337 and A324338. Note that A005187, A283477 and A006068 used in their definitions are all injections. Of course, A324377(n) = A000265(A005187(n)) fills the bill as A002487(n) = A002487(A000265(n)), but are there any less obvious solutions? - Antti Karttunen, Feb 28 2019

Crossrefs

Programs

  • PARI
    A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); }; \\ Modified from the one given in A002487, sign not actually needed here.
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A324287(n) = A002487(A005187(n));
    
  • Python
    from functools import reduce
    def A324287(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin((n<<1)-n.bit_count())[-1:2:-1],(1,0))) if n else 0 # Chai Wah Wu, May 05 2023

Formula

a(n) = A002487(A005187(n)).
a(n) = A324286(A283477(n)).
a(n) = A002487(A324377(n)).

A324288 a(n) = A002487(1+A005187(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 20 2019

Keywords

Crossrefs

Programs

  • PARI
    A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); }; \\ Modified from the one given in A002487, sign not actually needed here.
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A324288(n) = A002487(1+A005187(n));
    
  • Python
    from functools import reduce
    def A324288(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(1+(n<<1)-n.bit_count())[-1:2:-1],(1,0))) if n else 1 # Chai Wah Wu, May 05 2023

Formula

a(n) = A002487(1+A005187(n)).

A280700 Binary weight of terms of A005187: a(n) = A000120(A005187(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[2 n - DigitCount[2 n, 2, 1], 2, 1], {n, 0, 120}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    b(n) = if(n<1, 0, b(n\2) + n%2);
    for(n=0, 150, print1(b(2*n - b(2*n)), ", ")) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    def A(n): return bin(2*n - bin(2*n)[2:].count("1"))[2:].count("1")
    print([A(n) for n in range(151)]) # Indranil Ghosh, Mar 21 2017
  • Scheme
    (define (A280700 n) (A000120 (A005187 n)))
    

Formula

a(n) = A000120(A005187(n)).
a(n) = A001221(A283475(n)) = A001222(A283475(n)) = A001222(A280705(n)).

A289617 a(n) = A005187(A001222(n)).

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 4, 3, 3, 1, 4, 1, 3, 3, 7, 1, 4, 1, 4, 3, 3, 1, 7, 3, 3, 4, 4, 1, 4, 1, 8, 3, 3, 3, 7, 1, 3, 3, 7, 1, 4, 1, 4, 4, 3, 1, 8, 3, 4, 3, 4, 1, 7, 3, 7, 3, 3, 1, 7, 1, 3, 4, 10, 3, 4, 1, 4, 3, 4, 1, 8, 1, 3, 4, 4, 3, 4, 1, 8, 7, 3, 1, 7, 3, 3, 3, 7, 1, 7, 3, 4, 3, 3, 3, 10, 1, 4, 4, 7, 1, 4, 1, 7, 4, 3, 1, 8, 1, 4, 3, 8, 1, 4, 3, 4, 4, 3, 3, 8
Offset: 1

Views

Author

Antti Karttunen, Jul 08 2017

Keywords

Crossrefs

Cf. A268375 (positions where coincides with A046645).

Programs

Formula

a(n) = A005187(A001222(n)).
Previous Showing 21-30 of 240 results. Next