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.

A302845 Permutation of nonnegative integers: a(n) = A163355(A064707(n)).

Original entry on oeis.org

0, 1, 3, 2, 15, 14, 12, 13, 5, 6, 4, 7, 10, 9, 11, 8, 21, 20, 22, 23, 16, 19, 17, 18, 26, 27, 25, 24, 31, 28, 30, 29, 63, 62, 60, 61, 48, 49, 51, 50, 58, 57, 59, 56, 53, 54, 52, 55, 42, 43, 41, 40, 47, 44, 46, 45, 37, 36, 38, 39, 32, 35, 33, 34, 255, 254, 252, 253, 240, 241, 243, 242, 250, 249, 251, 248, 245, 246, 244
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A163355(A064707(n)).
a(n) = A302843(A006068(n)).

A064706 Square of permutation defined by A003188.

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 7, 6, 10, 11, 8, 9, 15, 14, 13, 12, 20, 21, 22, 23, 17, 16, 19, 18, 30, 31, 28, 29, 27, 26, 25, 24, 40, 41, 42, 43, 45, 44, 47, 46, 34, 35, 32, 33, 39, 38, 37, 36, 60, 61, 62, 63, 57, 56, 59, 58, 54, 55, 52, 53, 51, 50, 49, 48, 80, 81, 82, 83, 85, 84, 87, 86
Offset: 0

Views

Author

N. J. A. Sloane, Oct 13 2001

Keywords

Comments

Inverse of sequence A064707 considered as a permutation of the nonnegative integers.
Not the same as A100282: a(n) = A100282(n) = A100280(A100280(n)) only for n < 64. - Reinhard Zumkeller, Nov 11 2004

Crossrefs

Cf. A064707 (inverse), A165211 (mod 2).
Cf. also A054238, A163233, A302846.

Programs

  • MATLAB
    A = 1; for i = 1:7 B = A(end:-1:1); A = [A (B + length(A))]; end A(A) - 1
    
  • Mathematica
    Array[BitXor[#, Floor[#/4]] &, 72, 0] (* Michael De Vlieger, Apr 14 2018 *)
  • PARI
    a(n)=bitxor(n,n\4)
    
  • PARI
    { for (n=0, 1000, write("b064706.txt", n, " ", bitxor(n, n\4)) ) } \\ Harry J. Smith, Sep 22 2009
    
  • Python
    def A064706(n): return n^ n>>2 # Chai Wah Wu, Jun 29 2022
  • R
    maxn <- 63 # by choice
    b <- c(1,0,0)
    for(n in 4:maxn) b[n] <- b[n-1] - b[n-2] + b[n-3]
    # c(1,b) is A133872
    a <- 1
    for(n in 1:maxn) {
    a[2*n  ] <- 2*a[n] + 1 - b[n]
    a[2*n+1] <- 2*a[n] +     b[n]
    }
    (a <- c(0,a))
    # Yosu Yurramendi, Oct 25 2020
    

Formula

a(n) = A003188(A003188(n)).
a(n) = n XOR floor(n/4), where XOR is binary exclusive OR. - Paul D. Hanna, Oct 25 2004
a(n) = A233280(A180201(n)), n > 0. - Yosu Yurramendi, Apr 05 2017
a(n) = A000695(A003188(A059905(n))) + 2*A000695(A003188(A059906(n))). - Antti Karttunen, Apr 14 2018

Extensions

More terms from David Wasserman, Aug 02 2002

A302783 A divisor-or-multiple permutation of natural numbers: a(n) = A052330(A006068(n)).

Original entry on oeis.org

1, 2, 6, 3, 24, 12, 4, 8, 120, 60, 20, 40, 5, 10, 30, 15, 840, 420, 140, 280, 35, 70, 210, 105, 7, 14, 42, 21, 168, 84, 28, 56, 7560, 3780, 1260, 2520, 315, 630, 1890, 945, 63, 126, 378, 189, 1512, 756, 252, 504, 9, 18, 54, 27, 216, 108, 36, 72, 1080, 540, 180, 360, 45, 90, 270, 135, 83160, 41580, 13860, 27720, 3465, 6930, 20790, 10395, 693
Offset: 0

Views

Author

Antti Karttunen, Apr 16 2018

Keywords

Comments

Shares with A064736, A207901, A302781, A302350, etc. a property that a(n) is always either a divisor or a multiple of a(n+1). However, because multiple bits may change simultaneously when moving from A006068(n) to A006068(n+1) [with the restriction that the changing bits are all either toggled on or all toggled off], it means that also here the terms might be divided or multiplied by more than just a single Fermi-Dirac prime (A050376). E.g. a(3) = 3, while a(4) = A050376(1) * A050376(3) * 3 = 2*4*3 = 24. See also comments in A284003.

Crossrefs

Cf. A302784 (inverse).
Cf. also A207901 and A284003 (a squarefree analog).

Programs

  • PARI
    up_to_e = 13;
    v050376 = vector(up_to_e);
    A050376(n) = v050376[n];
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    i = 0; for(n=1,oo,if(A302777(n), i++; v050376[i] = n); if(i == up_to_e,break));
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ From A006068
    A302783(n) = A052330(A006068(n));

Formula

a(n) = A052330(A006068(n)).
a(n) = A207901(A064707(n)).

A284003 a(n) = A007913(A283477(n)) = A019565(A006068(n)).

Original entry on oeis.org

1, 2, 6, 3, 30, 15, 5, 10, 210, 105, 35, 70, 7, 14, 42, 21, 2310, 1155, 385, 770, 77, 154, 462, 231, 11, 22, 66, 33, 330, 165, 55, 110, 30030, 15015, 5005, 10010, 1001, 2002, 6006, 3003, 143, 286, 858, 429, 4290, 2145, 715, 1430, 13, 26, 78, 39, 390, 195, 65, 130, 2730, 1365, 455, 910, 91, 182, 546, 273, 510510, 255255, 85085, 170170, 17017
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Comments

A squarefree analog of A302783. Each term is either a divisor or a multiple of the next one. In contrast to A302033 at each step the previous term can be multiplied (or divided), not just by a single prime, but possibly by a product of several distinct ones, A019565(A000975(k)). E.g., a(3) = 3, a(4) = 2*5*a(3) = 30. - Antti Karttunen, Apr 17 2018

Crossrefs

Programs

Formula

a(n) = A007913(A283477(n)).
Other identities. For all n >= 0:
A048675(a(n)) = A006068(n).
A046523(a(n)) = A284004(n).
It seems that A001222(a(n)) = A209281(n).
a(n) = A019565(A006068(n)) = A302033(A064707(n)). - Antti Karttunen, Apr 16 2018

Extensions

Name amended with a second formula by Antti Karttunen, Apr 16 2018

A100281 a(n) = A099896(A099896(n)).

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 7, 6, 10, 11, 8, 9, 15, 14, 13, 12, 21, 20, 23, 22, 16, 17, 18, 19, 31, 30, 29, 28, 26, 27, 24, 25, 42, 43, 40, 41, 47, 46, 45, 44, 32, 33, 34, 35, 37, 36, 39, 38, 63, 62, 61, 60, 58, 59, 56, 57, 53, 52, 55, 54, 48, 49, 50, 51, 84, 85, 86, 87, 81, 80, 83, 82, 94
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 11 2004

Keywords

Comments

Permutation of the natural numbers with inverse A100282;
A064707(n) = a(n) for n<64.

Crossrefs

Programs

Formula

a(n) = n XOR floor(n/4) XOR floor(n/16). - Ivan Neretin, Sep 06 2017
Showing 1-5 of 5 results.