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

A226087 Number of values k in base n for which the sum of digits of k = sqrt(k).

Original entry on oeis.org

1, 4, 2, 3, 3, 6, 2, 2, 2, 5, 2, 6, 2, 5, 5, 2, 2, 4, 2, 6, 6, 4, 2, 5, 2, 4, 2, 6, 2, 11, 2, 2, 6, 4, 5, 6, 2, 4, 6, 5, 2, 11, 2, 6, 5, 4, 2, 6, 2, 4, 6, 5, 2, 4, 5, 5, 6, 4, 2, 13, 2, 4, 4, 2, 5, 11, 2, 5, 6, 11, 2, 5, 2, 4, 6, 6, 6, 11, 2, 5, 2, 4, 2, 12, 5
Offset: 2

Views

Author

Keywords

Comments

Values of k in base n have at most 3 digits. Proof: Because sqrt(k) increases faster than the digit sum of k, only numbers with d digits meeting the condition d*(n-1) >= n^(d/2) are candidate fixed points. d < 3 for n > 6, and since there are no fixed points of four or more digits in bases 2 through 5, there are no fixed points in any base with more than 3 digits.
From the above, it can be shown that for three-digit fixed points of the form xyz, x <= 6; also x <= 4 for n > 846. These theoretical upper limits are statistically unlikely, and in fact of the 86356 solutions in bases 2 to 10000, only 6.5% of them begin with 2, and none begin with 3 through 6.

Examples

			For a(16)=5 the solutions are the square numbers {1, 36, 100, 225, 441} because in base 16 they are written as {1, 24, 64, E1, 1B9} and
  sqrt(1) = 1
  sqrt(36) = 6 = 2+4
  sqrt(100) = 10 = 6+4
  sqrt(225) = 15 = 14+1, and
  sqrt(441) = 21 = 1+11+9.
		

Crossrefs

Cf. A226224.
Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    sapply(2:16,function(n) sum(sapply((1:(n^ifelse(n>6,1.5,2)))^2, function(x) sum(inbase(x,n))==sqrt(x))))

A226352 Number of integers k in base n whose squared digits sum to sqrt(k).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Any d-digit number in base n meeting the criterion must also meet the condition d*(n-1)^2 < n^(d/2). Numerically, it can be shown this limits the candidate values to squares < 22*n^4. The larger values are statistically unlikely, and in fact the largest value of k in the first 1000 bases is ~9.96*n^4 in base 775.

Examples

			In base 8, the four solutions are the values {1,16,256,2601}, which are written as {1,20,400,5051} in base 8 and
sqrt(1)    =  1 = 1^2;
sqrt(16)   =  4 = 2^2 + 0^2;
sqrt(256)  = 16 = 4^2 + 0^2 + 0^2;
sqrt(2601) = 51 = 5^2 + 0^2 + 5^2 + 1^2,
		

Crossrefs

Cf. A226353.
Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    inbase=function(n, b) { x=c(); while(n>=b) { x=c(n%%b, x); n=floor(n/b) }; c(n, x) }
    for(n in 2:50) cat("Base", n, ":", which(sapply((1:(4.7*n^2))^2, function(x) sum(inbase(x, n)^2)==sqrt(x)))^2, "\n")

A226353 Largest integer k in base n whose squared digits sum to sqrt(k).

Original entry on oeis.org

1, 49, 169, 36, 1, 1, 2601, 1089, 1, 8836, 33489, 44100, 1, 149769, 128164, 96721, 1, 156816, 1225, 40804, 12321, 831744, 839056, 1149184, 1737124, 3655744, 407044, 1890625, 2208196, 1089, 1, 1466521, 6125625, 2235025, 2832489, 1, 3759721, 6885376, 8844676
Offset: 2

Views

Author

Keywords

Comments

Any d-digit number in base n meeting the criterion must also meet the condition d*(n-1)^2 < n^(d/2). Numerically, it can be shown this limits the candidate values to squares < 22*n^4. The larger values are statistically unlikely, and in fact the largest value of k in the first 1000 bases is ~9.96*n^4 in base 775.
a(n)=1 iff A226352(n)=1.

Examples

			In base 8, the four solutions are the values {1,16,256,2601}, which are written as {1,20,400,5051} in base 8 and
sqrt(1)   = 1  = 1^2
sqrt(16)  = 4  = 2^2+0^2
sqrt(256) = 16 = 4^2+0^2+0^2
sqrt(2601)= 51 = 5^2+0^2+5^2+1^2
		

Crossrefs

Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    inbase=function(n,b) { x=c(); while(n>=b) { x=c(n%%b,x); n=floor(n/b) }; c(n,x) }
    for(n in 2:50) cat("Base",n,":",which(sapply((1:(4.7*n^2))^2,function(x) sum(inbase(x,n)^2)==sqrt(x)))^2,"\n")
Showing 1-3 of 3 results.