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 31-40 of 49 results. Next

A260590 The modified Syracuse algorithm, msa, applied to 2n+1.

Original entry on oeis.org

4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 59, 2, 56, 2, 4, 2, 8, 2, 5, 2, 54, 2, 4, 2, 5, 2, 7, 2, 54, 2, 4, 2, 51, 2, 5, 2, 8, 2, 4, 2, 5, 2, 45, 2, 8, 2, 4, 2, 42, 2, 5, 2, 31, 2, 4, 2, 5, 2, 8, 2, 15, 2, 4, 2, 7, 2, 5, 2, 7, 2, 4, 2, 5, 2, 40, 2, 21, 2, 4, 2, 29, 2, 5, 2, 8, 2, 4, 2, 5, 2, 7, 2, 13
Offset: 1

Views

Author

Joseph K. Horn and Robert G. Wilson v, Jul 29 2015

Keywords

Comments

Normally the '3x+1 problem' or 'Collatz problem' asks for the number of steps to go from n to 1 (A006577). Here we ask for the number of iterations of the mapping, msa, to go from n to less than n; the mapping of x is either -> (3x+1)/2 if x is odd or -> x/2 if x is even.
Since the number of iterations of msa for an even number is always 1, we will only investigate the odd numbers greater than one.
a(n) = 1 for no values of n;
a(n) = 2 for n = 2 + 2k (k=0,1,2,3,...);
a(n) = 3 for no values of n;
a(n) = 4 for n = 1 + 8k (k=0,1,2,3,...);
a(n) = 5 for n = 5 + 16k and 11 + 16k (k=0,1,2,3,...);
a(n) = 6 for no values of n;
a(n) = 7 for n = 3 + 64k, 7 + 64k, 29 + 64k, etc. (k=0,1,2,3,...).
Possible values for a(n) are: 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, ... (A260593, sorted). Density is ~ 5/8.
Record values: 4, 7, 59, 81, 105, 135, 164, 165, 173, 176, 183, 224, 246, 287, 292, 298, 308, 376, 395, 398, 433, 447, 547, ....
And the records occur for n: 1, 3, 13, 351, 5043, 17827, 135135, 181171, 190863, 313165, 513715, 563007, 4044031, 6710835, 10319167, 13358335, 28462477, 31864063, 108870007, 600495895, 913698783, 1394004493, ....
Remember these n-values are the indices of odd numbers (A005408).

Examples

			a(1) is 4 because 2n+1 is 3 and 3 -> 5 -> 8 -> 4 -> 2. The number of iterations of the msa is 4;
a(2) is 2 because 2n+1 is 5 and 5 -> 8 -> 4. The number of iterations of the msa is 2;
a(3) is 7 because 2n+2 is 7 and 7 -> 11 -> 17 -> 26 -> 13 -> 20 -> 10 -> 5. The number of iterations of the msa is 7; etc.
Also see The Modified Syracuse Algorithm link.
		

Crossrefs

Programs

  • Mathematica
    msa[n_] := If[ OddQ@ n, (3n + 1)/2, n/2]; f[n_] := Block[{k = 2n + 1}, Length@ NestWhileList[ msa@# &, k, # >= k &] - 1]; Array[f, 95]

Formula

a(n) = the number of iterations for the msa; i.e., the number of mappings of x -> (3x+1)/2 if x is odd or -> x/2 if x is even to arrive at a number less than n.
a(n) = the binary length of A260592(n).

A028507 Continued fraction expansion for log_2(3).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 1, 5, 2, 23, 2, 2, 1, 1, 55, 1, 4, 3, 1, 1, 15, 1, 9, 2, 5, 7, 1, 1, 4, 8, 1, 11, 1, 20, 2, 1, 10, 1, 4, 1, 1, 1, 1, 1, 37, 4, 55, 1, 1, 49, 1, 1, 1, 4, 1, 3, 2, 3, 3, 1, 5, 16, 2, 3, 1, 1, 1, 1, 1, 5, 2, 1, 2, 8, 7, 1, 1, 2, 1, 1, 3, 3, 1, 1, 1, 1, 5, 4, 2, 2, 2, 16, 8, 10, 1, 25, 2, 1
Offset: 0

Views

Author

Tony Smith (tsmith(AT)innerx.net)

Keywords

Examples

			log_2(3) = 1.5849625007211561814537389439...
		

Crossrefs

Cf. A005663, A005664, A020857 (decimal expansion).

Programs

  • Maple
    Digits := 200: convert(evalf( log(3)/log(2) ),confrac);
  • Mathematica
    ContinuedFraction[Log[2,3],120] (* Harvey P. Dale, Oct 24 2011 *)

Extensions

More terms from James Sellers, Sep 16 2000
Offset changed by Andrew Howroyd, Aug 07 2024

A077464 Stolarsky-Harborth constant; lim inf_{n->oo} F(n)/n^theta, where F(n) is the number of odd binomial coefficients in the first n rows and theta=log(3)/log(2).

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Nov 06 2002

Keywords

Comments

The limit supremum of F(n)/n^theta is 1. - Charles R Greathouse IV, Oct 30 2016
Named by Finch (2003) after Kenneth B. Stolarsky and Heiko Harborth. Stolarsky (1977) evaluated that its value is in the interval [0.72, 0.815], and Harborth (1977) calculated the value 0.812556. - Amiram Eldar, Dec 03 2020

Examples

			0.812556559016006387694882...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, pp. 145-151.

Crossrefs

Formula

Equals lim inf_{n->oo} A006046(n)/n^A020857. - Amiram Eldar, Dec 03 2020

A229177 Decimal expansion of 3 + log_2(3) + log_2(3 + log_2(3)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 28 2013

Keywords

Comments

This is the fourth term in the sequence of real numbers discussed in A229168-A229170.

Examples

			6.7818724351423888886457636367782053029041818834546993272707...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[3 + Log2[3] + Log2[3 + Log2[3]], 10, 120][[1]] (* Amiram Eldar, Jun 06 2023 *)

A352957 Triangle read by rows: Row n is the lexicographically earliest strictly monotonic completely additive sequence of length n.

Original entry on oeis.org

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

Views

Author

Peter Munn, Apr 11 2022

Keywords

Comments

Each sequence consists of nonnegative integers indexed from 1.
Note in particular in the formula section, the lower bound, floor(n/k), for first differences between terms in a row. This follows (using the additive property) from the strict monotonicity of floor(n/k)+1 consecutive terms near the end of the row.
For any k, with increasing length n >= k, the first k terms of the sequences approach similarity with a real-valued logarithmic function defined on the integers. For example, the asymptote of T(n,3)/T(n,2) is log(3)/log(2), A020857.

Examples

			(For row 4.) A completely additive sequence requires T(4,1) = 0. Strict monotonicity requires T(4,4) > T(4,3) > T(4,2). So T(4,4) >= T(4,2) + 2. Using the additivity this becomes T(4,2) + T(4,2) >= T(4,2) + T(4,1) + 2. Subtracting T(4,2) and substituting 0 for T(4,1) we get T(4,2) >= 2. So from T(4,4) > T(4,3) > T(4,2), we see T(4,3) >= 3, T(4,4) >= 4. So row 4 = (0, 2, 3, 4) as it is strictly monotonic and completely additive and from the preceding arguments is seen to be the lexicographically earliest such.
Triangle starts:
0;
0, 1;
0, 1,  2;
0, 2,  3,  4;
0, 2,  3,  4,  5;
0, 3,  5,  6,  7,  8;
0, 3,  5,  6,  7,  8,  9;
0, 4,  6,  8,  9, 10, 11, 12;
0, 5,  8, 10, 11, 13, 14, 15, 16;
0, 5,  8, 10, 12, 13, 14, 15, 16, 17;
0, 5,  8, 10, 12, 13, 14, 15, 16, 17, 18;
0, 7, 11, 14, 16, 18, 19, 21, 22, 23, 24, 25;
0, 7, 11, 14, 16, 18, 19, 21, 22, 23, 24, 25, 26;
0, 7, 11, 14, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27;
0, 8, 13, 16, 19, 21, 23, 24, 26, 27, 28, 29, 30, 31, 32;
0, 9, 14, 18, 21, 23, 25, 27, 28, 30, 31, 32, 33, 34, 35, 36;
		

Crossrefs

Cf. A020857.
Completely additive sequences, s, with primes p mapped to a function of s(p-1) and maybe s(p+1): A064097, A344443, A344444; and for functions of earlier terms, see A334200.
For completely additive sequences with primes p mapped to a function of p, see A001414.
For completely additive sequences with prime(k) mapped to a function of k, see A104244.
For completely additive sequences where some primes are mapped to 1, the rest to 0 (notably, some ruler functions) see the cross-references in A249344.

Formula

The definition specifies: T(n,j*k) = T(n,j) + T(n,k); for k > 1, T(n,k) > T(n,k-1).
T(n,1) = 0, otherwise T(n,k) >= T(n,k-1) + floor(n/k).
For prime p, T(p,p) = T(p-1,p-1) + 1, otherwise T(p,k) = T(p-1,k).
T(n,2) >= 2*floor(n/4) + floor(n/9).
T(n,3) >= ceiling( (3*T(n,2) + floor(n/9)) / 2).
T(11,k) = A344443(k).
For k <> 13, T(23,k) = A344444(k).

A127965 Number of bits in A127962(n).

Original entry on oeis.org

2, 4, 6, 10, 12, 16, 18, 22, 30, 42, 60, 78, 100, 126, 166, 190, 198, 312, 346, 700, 1708, 2616, 3538, 5806, 10500, 10690, 11278, 12390, 14478, 42736, 83338, 95368, 117238, 127030, 138936, 141078, 267016, 269986, 374320, 986190, 4031398
Offset: 1

Views

Author

Artur Jasinski, Feb 09 2007

Keywords

Crossrefs

Programs

  • Mathematica
    b = {}; Do[c = 1 + Sum[2^(2n - 1), {n, 1, x}]; If[PrimeQ[c], AppendTo[b, c]], {x, 0, 1000}]; a = {}; Do[AppendTo[a, FromDigits[IntegerDigits[b[[x]], 2]]], {x, 1, Length[b]}]; d = {}; Do[AppendTo[d, DigitCount[a[[x]], 10, 0]+DigitCount[a[[x]], 10, 1]], {x, 1, Length[a]}]; d

Formula

a(n) = A127964(n) + A127963(n).
a(n) = 1 + floor(log_2(A000979(n))) = 1 + floor(log_2(2^A000978(n)+1) - A020857) = A000978(n) - 1. - R. J. Mathar, Feb 01 2008

Extensions

a(22)-a(29) from Vincenzo Librandi, Mar 30 2012
a(30)-a(41) from Amiram Eldar, Oct 19 2024

A216582 Decimal expansion of the logarithm of Pi to base 2.

Original entry on oeis.org

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

Views

Author

Alonso del Arte, Sep 09 2012

Keywords

Examples

			1.651496129472318798...
		

References

  • Jörg Arndt and Christoph Haenel, Pi Unleashed, New York: Springer (2001), p. 239.

Crossrefs

Programs

  • Magma
    SetDefaultRealField(RealField(100)); R:= RealField(); Log(Pi(R))/Log(2); // G. C. Greubel, Apr 08 2019
  • Maple
    evalf(log[2](Pi)) ; # R. J. Mathar, Sep 11 2012
  • Mathematica
    RealDigits[Log[2, Pi], 10, 105][[1]]
  • PARI
    log(Pi)/log(2) \\ Michel Marcus, Mar 05 2019
    
  • Sage
    log(pi,2).n(digits=100) # Jani Melik, Oct 05 2012
    

Formula

Log_2(Pi) = log(Pi) / log(2) = A053510 / A002162.
Equals (A061444 / A002162) - 1 = (A094642 / A002162) + 1. - John W. Nicholson, Mar 12 2019

A254351 Numerators of increasingly better rational approximations to log(3)/log(2) with increasing denominators.

Original entry on oeis.org

2, 3, 5, 8, 11, 19, 46, 65, 84, 317, 401, 485, 569, 1054, 13133, 14187, 15241, 16295, 17349, 18403, 19457, 20511, 21565, 22619, 23673, 24727, 50508, 125743, 176251, 301994, 8632083, 8934077, 9236071, 9538065, 9840059, 10142053, 10444047, 10746041, 11048035
Offset: 1

Views

Author

K. G. Stier, Jan 29 2015

Keywords

Comments

log(3)/log(2) = 1.5849625... (see A020857) is an irrational number. The fractions (2/1, 3/2, 5/3, 8/5, 11/7, 19/12, 46/29, 65/41, 84/53, 317/200, 401/253, 485/306, 569/359, 1054/665, ...) are a sequence of approximations to log(3)/log(2), where each is an improvement on its predecessors.
Numerators are shown here, the respective denominators are A060528 (and can also be found among the terms of A206788), both of which refer to equal divisions of the octave and good approximations to musical harmonics.

Crossrefs

Cf. A060528 (denominators), A020857, A206788.

Programs

  • Maxima
    x:bfloat(log(3)/log(2)),fpprec:100, errold:2,for denominator:1 thru 10000 do (numerator:round(x*denominator), errnew:abs(x-numerator/denominator), if errnew < errold then (errold:errnew, print(numerator)));

A344443 Completely additive with a(2)=5; for odd prime p, a(p) = ceiling((a(p-1) + a(p+1))/2).

Original entry on oeis.org

0, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 29, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31
Offset: 1

Views

Author

Peter Munn, May 19 2021

Keywords

Comments

Monotonic until a(55) = 30 > 29 = a(56).
The length of a monotonic completely additive sequence using positive integers is limited by the size of the initial terms, and this constraint is related to the conflicts inherent in specifying musical scales. In either case, the route to a good compromise solution that avoids complexity can be seen as a search for rational approximations to ratios between logarithms of the first few prime numbers.
Here a(i)/a(j) is the intended approximation to log(i)/log(j), so by starting with a(2) = 5 we open the door to using 8/5 as an approximation to log(3)/log(2) = 1.58496... . This approximation underlies simple musical scales that divide an octave into 5, where a note of twice the frequency is 5 tones higher and a note of about 3 times the frequency is 8 tones higher. The most commonly used more complex musical scales divide an octave into 12, equivalent to starting a sequence like this with a(2) = 12 (see A344444).

Examples

			a(4) = a(2*2) = a(2) + a(2) from the definition of completely additive. So a(4) = 5 + 5 = 10.
3 is an odd prime number, so a(3) = ceiling((a(3-1) + a(3+1))/2). Using the values a(2) = 5 and a(4) = 10 that we already know, we get a(3) = ceiling((5 + 10)/2) = ceiling(7.5) = 8.
The sequence is defined as completely additive, so a(1) = 0, the identity element for addition. (To see this, note that "completely additive" implies a(2) = a(2*1) = a(2)+a(1), and solve the equation for a(1).)
		

Crossrefs

Equivalent sequence with a(2)=12, a(3)=19: A344444.
The first 11 terms match row 11 of A352957.
For other completely additive sequences see the references in A104244.

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Plus @@ ((Last[#] * If[First[#] == 2, 5, Ceiling[(a[First[#] - 1] + a[First[#] + 1])/2]]) & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jun 27 2021 *)
  • PARI
    A344443(n) = if(1==n,0, my(f=factor(n)); sum(k=1,#f~,f[k,2]*if(2==f[k,1],5,ceil((1/2)*(A344443(f[k,1]-1)+A344443(f[k,1]+1)))))); \\ Antti Karttunen, May 19 2021

Formula

a(n*k) = a(n) + a(k).

A344444 Completely additive with a(2) = 12, a(3) = 19; for prime p > 3, a(p) = ceiling((a(p-1) + a(p+1))/2).

Original entry on oeis.org

0, 12, 19, 24, 28, 31, 34, 36, 38, 40, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 57, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74
Offset: 1

Views

Author

Peter Munn, May 20 2021

Keywords

Comments

Monotonic until a(143) = 87 > 86 = a(144).
The only infinite monotonic completely additive integer sequence is the all 0's sequence (cf. A000004). The challenge taken up here is to specify one that is monotonic for a modestly long number of terms, using a comparatively short prescriptive definition.
To start we specify values for a(2) and a(3) so that a(3)/a(2) approximates log(3)/log(2). 19/12 is a good approximation relative to the size of denominator. This reflects 2^19 = 524288 having a similar magnitude to 3^12 = 531441. Equivalently, we can say 3 is approximately the 19th power of the 12th root of 2. This approximation is used to construct musical scales. (See the Enevoldsen link, also A143800.) There is no better approximation with a denominator smaller than 29. [Revised by Peter Munn, Jun 14 2022]
To find a good specification to use for a(p) for larger primes, p, we are guided by knowing that if 2*a(n) < a(n-1) + a(n+1) then a completely additive sequence is not monotonic after a(n^2-1) because a(n^2) < a((n-1)*(n+1)) = a(n^2-1). Considering n = p, we see we want a(p) >= (a(p-1) + a(p+1))/2; but the same consideration for n = p-1 shows we don't want a(p) larger than necessary. These considerations lead towards the choice of "a(p) = ceiling((a(p-1) + a(p+1))/2)" for use in the definition.

Examples

			a(4) = a(2*2) = a(2) + a(2) from the definition of completely additive. So a(4) = 12 + 12 = 24. Similarly, a(6) = a(2*3) = a(2) + a(3) = 12 + 19 = 31.
5 is a prime number greater than 3, so a(5) = ceiling((a(5-1) + a(5+1))/2). Using the values a(4) = 24 and a(6) = 31 that we calculated earlier, we get a(5) = ceiling((24 + 31)/2) = ceiling(27.5) = 28.
The sequence is defined as completely additive, so a(1) = 0, the identity element for addition. (To see this, note that "completely additive" implies a(2) = a(2*1) = a(2)+a(1), and solve the equation for a(1).)
		

Crossrefs

Equivalent sequence with a(2)=5, a(3)=8: A344443.
First 10 terms match A143800.
Cf. row 23 of A352957.
For other completely additive sequences see the references in A104244.

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Plus @@ ((Last[#] * Which[First[#] == 2, 12, First[#] == 3, 19, First[#] > 3, Ceiling[(a[First[#] - 1] + a[First[#] + 1])/2]]) & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jun 27 2021 *)

Formula

a(n*k) = a(n) + a(k).
Previous Showing 31-40 of 49 results. Next