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

A366721 Number of digits left of the radix point of n when written in base Pi using a greedy algorithm representation.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5
Offset: 0

Views

Author

Paolo Xausa, Oct 17 2023

Keywords

Comments

More than the usual number of terms are shown to distinguish this sequence from A185679.

Examples

			a(10) = 3 because 10 in base Pi (100.01022...) has 3 digits before the radix point.
		

Crossrefs

Programs

  • Mathematica
    A366721[n_]:=Floor[Log[Pi,Max[n,1]]]+1;Array[A366721,200,0]

Formula

a(0) = 1; for n >= 1, a(n) = floor(log_Pi(n)) + 1.

A360803 Numbers whose squares have a digit average of 8 or more.

Original entry on oeis.org

3, 313, 94863, 298327, 987917, 3162083, 9893887, 29983327, 99477133, 99483667, 197483417, 282753937, 314623583, 315432874, 706399164, 773303937, 894303633, 947047833, 948675387, 989938887, 994927133, 994987437, 998398167, 2428989417, 2754991833, 2983284917, 2999833327
Offset: 1

Views

Author

Dmitry Kamenetsky, Feb 21 2023

Keywords

Comments

This sequence is infinite. For example, numbers floor(30*100^k - (5/3)*10^k) beginning with 2 followed by k 9s, followed by 8 and k 3s, have a square whose digit average converges to (but never equals) 8.25. [Corrected and formula added by M. F. Hasler, Apr 11 2023]
Only a few examples are known whose square has a digit average of 8.25 and above: 3^2 = 9, 707106074079263583^2 = 499998999999788997978888999589997889 (digit average 8.25), 94180040294109027313^2 = 8869879989799999999898984986998979999969 (digit average 8.275).
This is the union of A164772 (digit average = 8) and A164841 (digit average > 8). - M. F. Hasler, Apr 11 2023

Examples

			94863 is in the sequence, because 94863^2 = 8998988769, which has a digit average of 8.1 >= 8.
		

Crossrefs

Cf. A164772 (digit average = 8), A164841 (digit average > 8).

Programs

  • PARI
    isok(k) = my(d=digits(k^2)); vecsum(d)/#d >= 8; \\ Michel Marcus, Feb 22 2023
    
  • Python
    def ok(n): d = list(map(int, str(n**2))); return sum(d) >= 8*len(d)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Feb 22 2023

A185076 a(n) is the least number k such that (sum of digits of k^2) + (number of digits of k^2) = n, or 0 if no such k exists.

Original entry on oeis.org

0, 1, 0, 10, 2, 100, 11, 1000, 4, 3, 6, 8, 19, 35, 7, 16, 34, 106, 13, 41, 24, 17, 37, 107, 323, 43, 124, 317, 67, 113, 63, 114, 134, 343, 83, 133, 367, 1024, 167, 374, 264, 314, 386, 1043, 313, 583, 1303, 3283, 707, 1183, 3316, 836, 1333, 3286, 10133
Offset: 1

Views

Author

Carmine Suriano, Feb 23 2011

Keywords

Comments

a(n) < sqrt(10^(n-1)). 0 < a(2m) <= 10^(m-1) with the upper bound reached for 1<=m<=4. - Chai Wah Wu, Mar 15 2023

Examples

			a(7)=11 since 7 = sumdigits(121) + numberdigits(121) = 4 + 3.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1; While[d=IntegerDigits[k^2]; n>Length[d] && n != Total[d] + Length[d], k++]; If[Length[d] >= n, k=0]; k, {n, 50}]
  • Python
    from itertools import count
    def A185076(n):
        for k in count(1):
            if n == (t:=len(s:=str(k**2)))+sum(map(int,s)):
                return k
            if t >= n:
                return 0 # Chai Wah Wu, Mar 15 2023

Formula

n = A004159(a(n)) + A185679(a(n)).

A309432 Number of distinct digits in decimal representation of n^2.

Original entry on oeis.org

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

Views

Author

Hauke Löffler, Aug 01 2019

Keywords

Examples

			a(0) = 1 because 0^2 = 0 has 1 distinct digit (0).
a(5) = 2 because 5^2 = 25 has 2 distinct digits (2, 5).
a(10) = 2 because 10^2 = 100 has 2 distinct digits (0, 1).
		

Crossrefs

Programs

Showing 1-4 of 4 results.