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 11-20 of 508 results. Next

A224927 Denominator of lexicographically least fraction f satisfying floor(f*10^A055642(n)) = n.

Original entry on oeis.org

6, 4, 3, 5, 2, 3, 4, 5, 10, 10, 9, 8, 15, 7, 13, 6, 17, 11, 21, 5, 14, 9, 13, 25, 4, 15, 11, 7, 17, 10, 16, 25, 3, 23, 14, 11, 8, 13, 23, 5, 12, 7, 16, 9, 11, 13, 17, 25, 51, 2, 27, 17, 13, 11, 9, 16, 7, 12, 22, 5, 13, 8, 11, 14, 20, 3, 28, 16, 13, 10, 7, 11, 15
Offset: 1

Views

Author

Paul Tek, Apr 20 2013

Keywords

Comments

1 < a(n) <= 10^A055642(n).
For any reduced fraction u/v in the interval [1/10..1[, a(floor(u/v*10^k))=v for k sufficiently large.

Examples

			The fractions f satisfying floor(f*100)=42, are, in lexicographical order: 3/7, 6/14, 8/19, 9/21, 11/26, 12/28, 14/33, 15/35, 16/38, 17/40, 18/42, 19/45, 20/47, 21/49...
Hence, a(42)=denominator(3/7)=7.
		

Crossrefs

Cf. A224926 (numerators), A055642, A002487.

Programs

  • PARI
    a224927(n) =\
    local(a=0, b=1, c, d, e=1, f=0, x=1); \
    while(x<=n, x=x*10); \
    while(1, c=a+e; d=b+f; \
    if(c/d < n/x, a=c; b=d, \
    if(c/d >= (n+1)/x, e=c; f=d, \
    return(d))))

A308314 Decimal expansion of Sum_{k>=1} (1/A055642(k)^A055642(k)) where A055642(k) is the number of digits of the integer k.

Original entry on oeis.org

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

Views

Author

Bernard Schott, May 19 2019

Keywords

Comments

With summation by parts to obtain 1st formula:
Sum_{k>=1} (1/length(k)^length(k)) =
Sum_{m=1..9} (1/1^1) + Sum_{m=10..99} (1/2^2) + Sum_{m=100...999} (1/3^3) + Sum_{m=1000...9999} (1/4^4) + ... =
9*(1/1^1) + 90*(1/2^2) + 900*(1/3^3) + 9000*(1/4^4) + 90000*(1/5^5) + ... =
9 ( 1/1^1 + 10^1/2^2 + 10^2/3^3 + 10^3/4^4 + 10^4/5^5 + ... =
(9/10) * (10^1/1^1 + 10^2/2^2 + 10^3/3^3 + 10^4/4^4 + 10^5/5^5 + ... =
(9/10) * ( (10/1)^1 + (10/2)^2 + (10/3)^3 + (10/4)^4 + (10/5)^5 + ... =
(9/10) * Sum_{m>=1} (10/m)^m.

Examples

			168.05245375262168949085673320556724...
		

References

  • Xavier Merlin, Methodix Analyse, Ellipses, 1997, Exercice 22 p. 120.
  • J.-M. Monier, Analyse, Tome 3, 2ème année, MP.PSI.PC.PT, Dunod, 1997, Exercice 3.2.1.h" p. 248.

Crossrefs

Programs

  • Maple
    evalf((9/10) * Sum((10/n)^n, n=1..infinity), 100);
  • PARI
    (9/10) * suminf(k=1, (10/k)^k) \\ Michel Marcus, Jun 08 2019

Formula

Equals (9/10) * Sum_{k>=1} (10/k)^k.
Equals Sum_{n>=1} (1/A138908(n)).

A330814 a(1) = 1; a(n+1) = Sum_{k=1..n} {q(a(k)): q(a(k)) = q(a(n))}, where q(n) = A007953(n) + A055642(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 14, 21, 10, 9, 20, 8, 18, 11, 12, 15, 16, 27, 22, 12, 20, 16, 36, 33, 24, 32, 28, 12, 25, 45, 44, 30, 30, 35, 40, 18, 55, 24, 40, 24, 48, 14, 35, 50, 42, 56, 13, 30, 40, 36, 66, 28, 36, 77, 16, 54
Offset: 1

Views

Author

David James Sycamore, Jan 01 2020

Keywords

Comments

a(n+1) = k(n)*q(a(n)), where k(n) is the number of times (up to and including a(n)) that a term having the same q-value as a(n) has occurred in the sequence so far.

Examples

			a(2) is q(a(1))=a(1)=2; a(10)=q(10)=3, and 3=q(a(2)) has been seen once before, so a(11)=3+3=6.
		

Crossrefs

Programs

  • Magma
    q:=func; a:=[1,2]; for n in [3..70] do Append( ~a,&+[ q(a[k-1]):k in [2..n]| q(a[k-1]) eq q(a[n-1])]); end for; a; // Marius A. Burtea, Jan 02 2020
  • Mathematica
    s[n_] := Plus @@(d = IntegerDigits[n]) + Length[d]; a[1] = 1; a[n_] := a[n] = (s1 = s[a[n - 1]])*(1 + Sum[Boole[s[a[k]] == s1], {k, 1, n - 2}]); Array[a, 100] (* Amiram Eldar, Jan 01 2020 *)

A345672 a(n) is the least m such that the decimal expansion of n appears in the concatenation of m, ..., m+k for some k >= 0 and Sum_{i = m..m+k-1} A055642(i) < A055642(n) <= Sum_{i = m..m+k} A055642(i).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 13, 14, 15, 16, 17, 18, 19, 20, 12, 22, 2, 24, 25, 26, 27, 28, 29, 30, 13, 23, 33, 3, 35, 36, 37, 38, 39, 40, 14, 24, 34, 44, 4, 46, 47, 48, 49, 50, 15, 25, 35, 45, 55, 5, 57, 58, 59, 60, 16, 26, 36, 46, 56, 66, 6, 68
Offset: 0

Views

Author

Rémy Sigrist, Jun 22 2021

Keywords

Comments

This sequence is similar to A055642; here we consider decimal expansions, there binary expansions.

Examples

			For n = 21:
- the decimal expansion of 21 first appears in the concatenation of 12 and 13,
- so a(21) = 12.
		

Crossrefs

Cf. A007376, A055642, A083653 (binary analog), A252043.

Programs

  • PARI
    See Links section.

Formula

a(n) <= n.
a(n) = 1 iff n belongs to A252043.

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)

A373205 Numbers m such that m^m == m (mod 10^(len(m) + 1)), where len(m) is the number of digits of m (A055642).

Original entry on oeis.org

1, 51, 57, 101, 151, 176, 201, 301, 351, 401, 501, 551, 576, 601, 625, 701, 751, 801, 901, 951, 976, 1001, 1376, 2001, 2057, 2751, 3001, 4001, 4193, 4751, 5001, 5376, 6001, 6249, 6751, 7001, 8001, 8751, 9001, 9375, 9376, 10001, 10751, 11001, 12001, 13001
Offset: 1

Views

Author

Marco Ripà, May 27 2024

Keywords

Comments

By definition, the present sequence is a subsequence of A082576.
For each integer r >= 2 this sequence contains 10^r + 1.
All terms > 1 end in 01, 25, 49, 51, 57, 75, 76, or 93.

Examples

			51 is a term since 51 is a 2-digit number and 51^51 == 5051 (mod 10^4) and thus 51^51 == 51 (mod 10^(2 + 1)).
		

Crossrefs

Programs

  • PARI
    for (len_m = 1, 5, for (m = 10^(len_m - 1), 10^len_m - 1, if (m == Mod(m, 10^(len_m + 1))^m, print1(m, ", "))))
    
  • Python
    from itertools import count
    def A373205_gen(): # generator of terms
        for i in count(0,100):
            for j in (1, 25, 49, 51, 57, 75, 76, 93):
                m = i+j
                if pow(m,m,10*10**(len(str(m)))) == m:
                    yield m
    A373205_list = list(islice(A373205_gen(),20)) # Chai Wah Wu, Jun 02 2024

A087095 a(n) = A077503(n) - n*10^d, where d = n-A055642(n), A055642(n) = number of digits in n.

Original entry on oeis.org

0, 5, 24, 96, 176, 625, 1316, 13025, 0, 14129, 24161, 580921, 1310976, 4588964, 7007601, 0, 233634401, 244436761, 2180575376, 3762025, 23492302009, 71829444801, 293908889924, 357018382249, 2562501107225, 2194311769649
Offset: 1

Views

Author

Ray Chandler, Aug 11 2003

Keywords

Examples

			a(7) = 7001316 - 7000000 = 1316.
		

Crossrefs

Programs

  • Mathematica
    ceil[n_]:=Module[{d=n-IntegerLength[n],c},c=n*10^d;Ceiling[Sqrt[c]]^2-c]; Array[ceil,30] (* Harvey P. Dale, Sep 03 2018 *)

Formula

a(n) = ceiling(sqrt(n*10^d))^2 - n*10^d, where d = n-digit(n), digit(n) = number of digits in n.

Extensions

Edited by Charles R Greathouse IV, Aug 03 2010

A100470 n appears A055642(n) times (appearances equal number of decimal digits).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41
Offset: 0

Views

Author

Rick L. Shepherd, Nov 21 2004

Keywords

Comments

Lexicographically smallest nondecreasing left inverse to A117804: a(A117804(n)) = n. Gives the number to which belongs the digit A007376(n). - M. F. Hasler, Oct 23 2019

Crossrefs

Cf. A055642, A030530 (n's appearances equal its number of bits).

A270142 a(n) = product of first k composites, with the i-th composite raised to the d-th power, where k = A055642(n) and d is the i-th digit of n.

Original entry on oeis.org

4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 4, 24, 144, 864, 5184, 31104, 186624, 1119744, 6718464, 40310784, 16, 96, 576, 3456, 20736, 124416, 746496, 4478976, 26873856, 161243136, 64, 384, 2304, 13824, 82944, 497664, 2985984, 17915904, 107495424
Offset: 1

Views

Author

Felix Fröhlich, Mar 12 2016

Keywords

Comments

All terms are multiples of 4, since A002808(1) = 4 and the most significant digit of n is always nonzero.
Does a term exist such that a(n) = n? Such a number would be the analog of a Meertens number when raising composites to the powers of the digits of n instead of raising primes to the powers of the digits.
From Chai Wah Wu, Dec 15 2022: (Start)
If a(n) is defined using digits of n in base b, then there are bases b and numbers n such that a(n) = n. For instance:
base b n
------------------------------------------------
2 4, 24, 36, 24192000, 85155840
3 2592
4 4, 103680
6 20736
8 16, 256, 13824
12 1327104
16 21233664
23 24
24 746496
(End)

Examples

			a(12) = 144, since A002808(1) = 4, A002808(2) = 6 and 4^1 * 6^2 = 144.
		

Crossrefs

Programs

  • PARI
    composite(n) = my(i=0, c=2); while(1, if(!ispseudoprime(c), i++); if(i==n, return(c)); c++)
    compopowerprod(n) = my(d=digits(n)); for(k=1, #d, p=prod(i=1, #d, composite(i)^d[i])); p
    a(n) = compopowerprod(n)
    
  • Python
    from math import prod
    from sympy import composite
    def A270142(n): return prod(composite(i)**int(d) for i, d in enumerate(str(n),1)) # Chai Wah Wu, Dec 09 2022

A270542 Numbers of the form (pq)^2, where p is the number of digits of n (A055642) and q is the sum of the digits of n (A007953).

Original entry on oeis.org

0, 1, 2704, 5184, 7744
Offset: 1

Views

Author

Keywords

Examples

			2704 is a term because 2704 = [4*(2+7+0+4)]^2;
5184 is a term because 5184 = [4*(5+1+8+4)]^2.
		

Crossrefs

Programs

  • Mathematica
    Position[ Table[ IntegerLength[k] Sum[( Floor[k/10^n] - 10 Floor[k/10^(n + 1)]), {n, 0, IntegerLength@ k^2}] - k, {k, 1, 10^6}], 0] // Flatten = {1, 1232, 4100, 268542}
    Select[Range[10^3]^2,With[{id=IntegerDigits[#]},#==(Length[id]*Plus@@id)^2]&] (* Ray Chandler, Apr 01 2016 *)
  • PARI
    isok(n) = d = digits(n); (#d*vecsum(d))^2 == n; \\ Michel Marcus, Mar 26 2016
Previous Showing 11-20 of 508 results. Next