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 41-48 of 48 results.

A369860 The orbit of n under iterations of x -> c(x)*10^L(x-c(x)) + x-c(x), where c(x) = floor(x^(1/3))^3, L(x) = floor(log_10(max(x,1))+1), enters a pseudo-loop x(k) = a^3 * 10^((k-k0)*L(b)) + b beyond some k0. This sequence lists the a-values.

Original entry on oeis.org

18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 883, 883, 883, 883, 883, 883, 883, 883, 883, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 8, 8, 8
Offset: 1

Views

Author

M. F. Hasler, Apr 05 2024

Keywords

Comments

The iterated function can also be defined as x -> concatenate(c(x), x-c(x)), where c = A048762 gives the largest perfect cube <= x and x - c(x) = A055400(x) is the "cube excess" of x. L = A055642 gives the number of decimal digits.
The corresponding b-values are listed in A369861.

Examples

			Starting with 1, we get 1 -> 10 -> 82 (since 8 is the largest cube <= 10, at distance 2) -> 6418 (since the cube 64 is at distance 18) -> 5832586 (since 5832 = 18^3 is at distance 586) -> 5832000586 (since 180^3 is again at distance 586) -> ...: Each time 3 '0's will be inserted in front of the remainder which remains always the same, as does the cube root a(1) = 18, up to factors of 10.
Starting with 2, we get 2 -> 11 (since the largest cube <= 2 is 1, at distance 1) -> 83 (since largest cube <= 11 is 8, at distance 2) -> 6419 (since the cube 64 is at distance 19) -> 5832587 (since 5832 = 18^3 is at distance 587). We see that in this sequence each term is just one more than that of the preceding sequence, so the cube root remains the same, a(2) = a(1) = 18.
For n = 18, we get 18 -> 810 (since the largest cube <= 18 is 8, at distance 10) -> 72981 (since the cube 729 is at distance 81) -> 689214060 (since 68921 = 41^3 is at distance 4060) -> 688465387748673 (since 688465387 = 883^3 is at distance 748673), from where on the cube root a(18) = 883 gets an additional factor 10 at each step, but the cube excess A055400 remains the same, A369861(18) = 748673.
See A369861 for more examples.
		

Crossrefs

Cf. A000578 (cubes), A048766 (cube root), A048762 (largest cube <= n), A055400 (cube excess), A055642 (length of n in base 10), A122840 (10-valuation of n).
Cf. A369861 (b-values).

Programs

  • PARI
    A369860(n)={until(, my(c=sqrtnint(n, 3), v=valuation(c, 10), L=logint(max(n-c^3, 1), 10)+1); L==v*3 && return(c/10^v); n += c^3*(10^L-1))}
    
  • Python
    import sympy # for integer_nthroot (A048766), multiplicity (A122840)
    def A369860(n: int):
        while True:
            C = sympy.integer_nthroot(n, 3)[0]; L = A055642(n-C**3)
            if sympy.multiplicity(10, C)*3 == L: return C//10**(L//3)
            n += C**3 * (10**L - 1)

A369861 The orbit of n under iterations of x -> concatenate(A048762(x), A055400(x)) enters a pseudo-loop x(k) = a^3 * 10^((k-k0)*A055642(b)) + b for k > k0. This sequence lists the b-value.

Original entry on oeis.org

586, 587, 588, 589, 590, 591, 592, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 748673, 748674, 748675, 748676, 748677, 748678, 748679, 748680, 748681, 709030, 709031, 709032, 709033, 709034, 709035, 709036, 709037, 709038, 709039, 513, 514, 515, 516, 517, 518, 519, 520
Offset: 1

Views

Author

M. F. Hasler, Apr 03 2024

Keywords

Comments

The iterated function can also be defined as x -> c(x)*(10^L(x-c(x))-1) + x, where c(x) = A048762(x) = floor(x^(1/3))^3 is the largest perfect cube <= x; A055400(x) = x-c(x) is the "cube excess" of x, and L(x) = A055642(x) = floor(log_10(max(x,1))+1) is the number of decimal digits of x.
Often a(n+1) = a(n) + 1, especially when c(n+1) = c(n), in which case it is probable that all elements of the orbit of n+1 are just one larger than the elements of the orbit of n.

Examples

			Starting with 1, we get 1 -> 10 -> 82 (since 8 is the largest cube <= 10, at distance 2) -> 6418 (since the cube 64 is at distance 18) -> 5832586 (since 5832 = 18^3 is at distance 586) -> 5832000586 (since 180^3 is again at distance 586) -> ...: Each time 3 '0's will be inserted in front of the remainder which remains always the same, a(1) = 586, as does the cube root up to an additional factor of 10.
Starting with 2, we get 2 -> 11 (since the largest cube <= 2 is 1, at distance 1) -> 83 (since largest cube <= 11 is 8, at distance 2) -> 6419(since the cube 64 is at distance 19) -> 5832587 (since 5832 = 18^3 is at distance 587) -> 5832000587 (since 180^3 is again at distance 587) -> ... We see that in this sequence each term is one more than that of the preceding sequence, whence also a(2) = 587 = a(1)+1.
Starting with 8, we get 8 -> 80 (since the largest cube <= 8 is 8, at distance 0) -> 6416 (since the cube 64 is at distance 16, two less than in 1's orbit) -> 5832584 (since 5832 = 18^3 is at distance 584, again 2 less than in 1's orbit) -> 5832000584 (since 180^3 is again at distance 584) -> ... We see that in this sequence each term is 2 (resp. 8) less than the corresponding term of 1's (resp. 7's) orbit (with the initial term deleted). Hence also a(8) = 584 = a(7)-8 = a(1)-2. From here on subsequent terms will again increase by 1 up to n = 17.
Starting with 18, we get 18 -> 810 (since the largest cube <= 18 is 8, at distance 10) -> 72981 (since the cube 729 is at distance 81) -> 689214060 (since 68921 = 41^3 is at distance 4060) -> 688465387748673 (since 688465387 = 883^3 is at distance 748673), from where on the cube roots get multiplied by 10 and the distance from the cubes remains the same, a(18) = 748673.
For n = 64 -> 640 (= 8^3 + 128) -> 512128 = 80^3 + 128, we have a(n) = 128.
		

Crossrefs

Cf. A000578 (cubes), A048766 (cube root), A048762 (largest cube <= n), A055400 (cube excess), A055642 (length of n in base 10), A122840 (10-valuation of n).
Cf. A369860 (a-values)

Programs

  • PARI
    A369861(n)={until(, my(c=sqrtnint(n,3), v=valuation(c,10), L=logint(max(n-c^3,1),10)+1); L==v*3 && return(n-c^3); n += c^3*(10^L-1))}
    
  • Python
    import sympy
    def A369861(n: int):
        while True:
            C = sympy.integer_nthroot(n, 3)[0]**3; L = A055642(n-C)
            if sympy.multiplicity(10, C) == L: return n-C
            n += C * (10**L - 1)

A380891 If n mod 2 = 0 then a(n) = floor(n^(1/3)) else a(n) = floor(n^(4/3)).

Original entry on oeis.org

0, 1, 1, 4, 1, 8, 1, 13, 2, 18, 2, 24, 2, 30, 2, 36, 2, 43, 2, 50, 2, 57, 2, 65, 2, 73, 2, 81, 3, 89, 3, 97, 3, 105, 3, 114, 3, 123, 3, 132, 3, 141, 3, 150, 3, 160, 3, 169, 3, 179, 3, 189, 3, 199, 3, 209, 3, 219, 3, 229, 3, 240, 3, 250, 4, 261, 4, 272
Offset: 0

Views

Author

Vikram Prasad, Feb 08 2025

Keywords

Crossrefs

Interspersion of A048766 and A129011.

Programs

  • Mathematica
    a[n_]:=If[Mod[n,2]==0,Floor[n^(1/3)],Floor[n^(4/3)]]; (* James C. McMahon, Apr 11 2025 *)
  • Python
    import gmpy2
    def a(n): return int(gmpy2.iroot(n**4 if n&1 else n, 3)[0])

A382692 a(n) = floor of alternating sum of k-th roots of n, with k >= 2.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6
Offset: 0

Views

Author

Friedjof Tellkamp, Apr 05 2025

Keywords

Examples

			a(15) = floor(15^(1/2) - 15^(1/3) + 15^(1/4) - ...) = floor(1.9701...) = 1.
		

Crossrefs

Cf. A000196 (k=2), A048766 (k=3), A255270 (k=4), A178487 (k=5), A178489 (k=6).

Programs

  • Mathematica
    Floor@Table[NSum[n^(1/(2 k)) - n^(1/(2 k + 1)), {k, 1, Infinity}, WorkingPrecision -> 30], {n, 1, 100}]

Formula

a(n) = floor(Sum_{k>=2} (-1)^k * n^(1/k)) = floor(Sum_{k>=1} (n^(1/(2*k)) - n^(1/(2*k + 1)))).
a(n) ~ A381042(n).
Series expansion of Sum_{k>=2} (-1)^k * x^(1/k) at x=1: Sum_{i>=0} A(i) * (x-1)^i/i!, where A(i) = KroneckerDelta(i, 1) - Sum_{j=1..i} eta(j) * StirlingS1(i, j), with eta as the Dirichlet eta function.

A134919 Floor(n^(5/3)).

Original entry on oeis.org

1, 3, 6, 10, 14, 19, 25, 32, 38, 46, 54, 62, 71, 81, 91, 101, 112, 123, 135, 147, 159, 172, 186, 199, 213, 228, 243, 258, 273, 289, 305, 322, 339, 356, 374, 392, 410, 429, 448, 467, 487, 507, 527, 548, 569, 590, 612, 633, 656
Offset: 1

Views

Author

Mohammad K. Azarian, Nov 17 2007

Keywords

Crossrefs

Programs

A335836 a(1) = 1; for n>1, a(n) = floor(a(n-1)^(1/3)) if that number is not already in the sequence, otherwise a(n) = 2*a(n-1).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 3, 6, 12, 24, 48, 96, 192, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 13, 26, 52, 104, 208, 416, 7, 14, 28, 56, 112, 224, 448, 896, 9, 18, 36, 72, 144, 288, 576, 1152, 2304, 4608, 9216, 18432, 36864, 33, 66, 132, 264, 528, 1056, 2112
Offset: 1

Views

Author

Jinyuan Wang, Jun 27 2020

Keywords

Comments

If k is not in this sequence, then none of k^(3^t), k^(3^t)+1, ..., (k+1)^(3^t)-1 belong to the sequence. Because (k+1)^(3^k) > 2*k^(3^k), any m > k^(3^k) is not in the sequence, which is a contradiction to {a(n)} is not bounded above. Therefore, this sequence is a permutation of the natural numbers.

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, If[FreeQ[#1, #2], #2, 2 #1[[-1]] ]] & @@ {#, Floor[#[[-1]]^(1/3)]} &, {1}, 56] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    lista(nn) = {my(k, v=vector(nn)); v[1]=1; for(n=2, nn, if(vecsearch(vecsort(v), k=sqrtnint(v[n-1], 3)), v[n]=2*v[n-1], v[n]=k)); v; }

A079633 a(n) = floor(n/floor(n^(1/3))) - floor(n^(2/3)).

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 4, 0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 5, 5, 4, 5, 5, 5, 6, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Benoit Cloitre, Jan 30 2003

Keywords

Crossrefs

Programs

  • PARI
    a(n)=floor(n/sqrtnint(n,3))-sqrtnint(n^2,3)

Formula

For n > 4: Max_{k=1..n} a(k) = ceiling((n+2)^(1/3)) + 1.

A092282 Difference between largest square number and largest cube number less than n.

Original entry on oeis.org

0, 0, 0, 3, 3, 3, 3, -4, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 17, 17, -2, -2, -2, -2, -2, -2, -2, -2, -2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 36
Offset: 1

Views

Author

Felix Tubiana, Jan 27 2004

Keywords

Examples

			n = 10; largest square = 3^2 = 9; largest cube = 2^3 = 8; a(10) = 9 - 8 = 1.
		

Programs

  • PARI
    a(n) = sqrtint(n)^2 - sqrtnint(n, 3)^3; \\ Michel Marcus, Aug 26 2013
    
  • PARI
    a(n) = sqrtnint(n, 2)^2 - sqrtnint(n, 3)^3; \\ Michel Marcus, Aug 26 2013

Formula

a(n) = floor(n^(1/2))^2 - floor(n^(1/3))^3.
a(n) = A000196(n)^2 - A048766(n)^3. - Michel Marcus, Aug 27 2013

Extensions

a(64) corrected by Michel Marcus, Aug 26 2013
Previous Showing 41-48 of 48 results.