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.

A093052 Exponent of 2 in 6^n - 2^n.

Original entry on oeis.org

0, 2, 5, 4, 8, 6, 9, 8, 13, 10, 13, 12, 16, 14, 17, 16, 22, 18, 21, 20, 24, 22, 25, 24, 29, 26, 29, 28, 32, 30, 33, 32, 39, 34, 37, 36, 40, 38, 41, 40, 45, 42, 45, 44, 48, 46, 49, 48, 54, 50, 53, 52, 56, 54, 57, 56, 61, 58, 61, 60, 64, 62, 65, 64, 72, 66, 69, 68, 72
Offset: 0

Views

Author

Ralf Stephan, Mar 16 2004

Keywords

Crossrefs

a(n-1) is the exponent of 2 in A009168(n), A012394(n), A088991(n), A009083(n), A012036(n), A012092(n), A012395(n), A012460(n), A012465(n), A012466(n), A012467(n), (A049294(n)-1)/3.

Programs

  • Mathematica
    Join[{0},Table[IntegerExponent[6^n-2^n,2],{n,70}]] (* Harvey P. Dale, Mar 08 2012 *)
  • PARI
    a(n)=if(n<1,0,if(n%2==0,a(n/2)+2*floor((n+2)/4)+1,n+1))
    
  • Python
    def A093052(n): return n+(~(m:=3**n-1)& m-1).bit_length() if n else 0 # Chai Wah Wu, Jul 07 2022

Formula

Recurrence: a(2n) = a(n) + [(n+1)/2] + 1, a(2n+1) = 2n+2.
a(n) = n + A007814(A024023(n)) = n + A090740(n). - Reinhard Zumkeller, Mar 27 2004