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-3 of 3 results.

A101121 Bitwise XOR of adjacent terms of A101120; also the nonzero terms of A101122.

Original entry on oeis.org

7, 17, 34, 68, 159, 257, 514, 1028, 2063, 4097, 8194, 16388, 32831, 65537, 131074, 262148, 524303, 1048577, 2097154, 4194308, 8388639, 16777217, 33554434, 67108868, 134217743, 268435457, 536870914, 1073741828, 2147483775
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Comments

A101120 gives the records in A101119, which equals the nonzero differences of A006519 and A003484. A101122 is the XOR BINOMIAL transform of A101119 and has zeros everywhere except at positions equal to powers of 2.

Examples

			a(5) = 159 since A101120(4)=112, A101120(5)=239 and 159 = 112 XOR 239.
		

Crossrefs

Programs

  • PARI
    {a(n)=bitxor(2^(n+2)-2^((n-2)%4)-8*((n+2)\4),2^(n+3)-2^((n-1)%4)-8*((n+3)\4))}
    
  • Python
    def A101121(n): return ((1<<(n+2))-(1<<((n-2)&3))-(((n+2)&-4)<<1))^((1<<(n+3))-(1<<((n-1)&3))-(((n+3)&-4)<<1)) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A101120(n-1) XOR A101120(n) for n>1, with a(1) = A101120(1), where A101120(n) = 2^(n+3) - 2^((n-1)(Mod 4)) - 8*floor((n+3)/4).

A101119 Nonzero differences of A006519 (highest power of 2 dividing n) and A003484 (Radon function).

Original entry on oeis.org

7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 494, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 1004, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Comments

A006519 and A003484 differ only at every 16th term; this sequence forms the nonzero differences. Records form A101120. Equals the XOR BINOMIAL transform of A101122.

Crossrefs

Programs

  • Magma
    [2^Valuation(16*n,2) - 8*Floor(Valuation(16*n,2)/4) - 2^(Valuation(16*n,2) mod 4): n in [1..50]]; // G. C. Greubel, Nov 01 2018
    
  • Mathematica
    Table[2^(IntegerExponent[16*n, 2]) - 8*Floor[IntegerExponent[16*n, 2]/4] - 2^(Mod[IntegerExponent[16*n, 2], 4]), {n, 1, 50}] (* G. C. Greubel, Nov 01 2018 *)
  • PARI
    {a(n)=2^valuation(16*n,2)-(8*(valuation(16*n,2)\4)+2^(valuation(16*n,2)%4))}
    
  • Python
    def A101119(n): return (1<<(m:=(~n&n-1).bit_length()+4))-((m&-4)<<1)-(1<<(m&3)) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A006519(16*n) - A003484(16*n) for n>=1. a(2*n-1) = 7 for n>=1.

A101120 Records in A101119, which forms the nonzero differences of A006519 and A003484.

Original entry on oeis.org

7, 22, 52, 112, 239, 494, 1004, 2024, 4071, 8166, 16356, 32736, 65503, 131038, 262108, 524248, 1048535, 2097110, 4194260, 8388560, 16777167, 33554382, 67108812, 134217672, 268435399, 536870854, 1073741764, 2147483584, 4294967231, 8589934526, 17179869116, 34359738296
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-2,0,1,-3,2},{7,22,52,112,239,494},30] (* Harvey P. Dale, Jan 23 2023 *)
  • PARI
    a(n)=2^(n+3)-2^((n-1)%4)-8*((n+3)\4)
    
  • Python
    def A101120(n): return (1<<(n+3))-(1<<((n-1)&3))-(((n+3)&-4)<<1) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A101119(2^(n-1)) for n>=1.
a(n) = 2^(n+3) - 2^((n-1)(mod 4)) - 8*floor((n+3)/4).
a(n) = 2^(n+3) - A003485(n+3). - Johannes W. Meijer, Oct 31 2012
From Chai Wah Wu, Apr 15 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-4) - 3*a(n-5) + 2*a(n-6) for n > 6.
G.f.: x*(-x - 7)/((x - 1)^2*(x + 1)*(2*x - 1)*(x^2 + 1)). (End)
E.g.f.: (exp(x)*(32*exp(x) - 8*x - 27) - 4*cos(x) - cosh(x) - 2*sin(x) + sinh(x))/4. - Stefano Spezia, Jun 06 2023
Showing 1-3 of 3 results.