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

A063511 a(n) = a(floor(sqrt(n))) * 2.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 30 2001

Keywords

Comments

From Kevin Ryde, May 11 2020: (Start)
The sqrt steps in the definition are equivalent to A211667 but here factors of 2 instead of counting, so a(n) = 2^A211667(n). A211667 is a double logarithm and the effect of power 2^ is to turn the second into a rounding. So a(n) is the bit length of n (see A070939) increased to the next power of 2 if not already a power of 2. Each n = 2^(2^k) is a new high a(n) = 2^(k+1), since such an n is bit length 2^k+1.
In a microcomputer, it's common for machine words to be power-of-2 sizes such as 16, 32, 64, 128 bits. a(n) can be thought of as the word size needed to contain integer n. Some algorithms by their nature expect power-of-2 sizes, for example Schönhage and Strassen's big integer multiplication.
This sequence differs from A334789 (2^log*(n)) for n>=256. For example a(256)=16 whereas A334789(256)=8. The respective exponent sequences are A211667 (for here) and A001069 (for A334789) which likewise differ for n>=256.
(End)

Crossrefs

Cf. A001146 (indices of new highs), A334789.

Programs

  • PARI
    a(n) = if(n==1,1, 2<Kevin Ryde, May 11 2020

Formula

a(n) = 2^A211667(n) = 2^ceiling(log_2(log_2(n+1))). - Kevin Ryde, May 11 2020
log_2(n+1) <= a(n) < 2*log_2(n+1). - Charles R Greathouse IV, Nov 30 2024

Extensions

Formula and code by Charles R Greathouse IV moved to A334789 where they apply. - Kevin Ryde, May 11 2020

A334789 a(n) = 2^log_2*(n) where log_2*(n) = A001069(n) is the number of log_2(log_2(...log_2(n))) iterations needed to reach < 2.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Kevin Ryde, May 10 2020

Keywords

Comments

Differs from A063511 for n>=256. For example a(256)=8 whereas A063511(256)=16. The respective exponent sequences are A001069 (for here) and A211667 (for A063511) which likewise differ for n>=256.
2^log*(n) arises in computational complexity measures for Fürer's multiplication algorithm.

Crossrefs

Cf. A001069, A014221 (indices of new highs), A063511, A211667.

Programs

  • PARI
    a(n)=my(t);while(n>1,n=log(n+.5)\log(2);t++);2^t \\ Charles R Greathouse IV, Apr 09 2012
    
  • PARI
    a(n) = my(c=0); while(n>1, n=logint(n,2);c++); 1<Kevin Ryde, May 18 2020

Formula

a(n) = 2^A001069(n).
a(n) = 2^lg*(n), where lg*(x) = 0 if x <= 1 and 1 + lg*(log_2(x)) otherwise. - Charles R Greathouse IV, Apr 09 2012
Showing 1-2 of 2 results.