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-50 of 65 results. Next

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")

A346630 Smallest number which reaches the narcissistic number 153 after n steps when repeatedly summing the cubes of its digits.

Original entry on oeis.org

153, 135, 18, 3, 9, 12, 33, 114, 78, 126, 6, 117, 669, 177, 12558, 44499999999999999999
Offset: 0

Views

Author

Jörg Zurkirchen, Jul 25 2021

Keywords

Comments

All the terms a(n) as well as the intermediate results will be multiples of 3:
x^3 mod 3 = x mod 3 [0^3 = 0; 1^3 = 1; (-1)^3 = -1].
Therefore (sum of cubes of digits) mod 3 = (sum of digits) mod 3.
Because the only multiple of 3 in A046197 is 153, every number which is a multiple of 3 will end up at 153.
Some other terms (not dealt with here) may reach a cycle of length > 1:
Elizabeth Todd has shown that only numbers (1 mod 3) and (2 mod 3) may reach a cycle, and the only possible cycles are {55, 230, 130}, {136, 244}, {160, 217, 352}, {919, 1459}. That means that numbers (0 mod 3) never reach a cycle but just a single number, namely 153.
Shyam Sunder Gupta tested all the multiples of 3 less than 10^5. He found that they all reach 153, in accordance with the above statements.
The values a(n) for n>15 are really too big to be fully written out (and so are missing in the list), as Jon E. Schoenfield calculated for n=16 and n=17:
a(16) = 3.777999...999*10^61042524005486970; it has one 3, three 7's, and 61042524005486967 9's, so the sum of the cubes of its digits is 1*3^3 + 3*7^3 + 61042524005486967*9^3 = 44499999999999999999 = a(15).
a(17) consists of the digit string 45888 followed by a very, very long string of 9's. The number of 9's in that string is (a(16) - 1725)/729, which is a 61042524005486968-digit number consisting of the digit 5 followed by 753611407475147 copies of the 81-digit string 182441700960219478737997256515775034293552812071330589849108367626886145404663923 followed by a single instance of the 60-digit string 182441700960219478737997256515775034293552812071330589849106.

Examples

			a(3) = 3, for 3^3 = 27, 2^3 + 7^3 = 351, 3^3 + 5^3 + 1^3 = 153.
a(13) = 177, for 177 -> 687 -> 1071 -> 345 -> 216 -> 225 -> 141 -> 66 -> 432 -> 99 -> 1458 -> 702 -> 351 -> 153 (13 = longest chain for numbers up to 10^4).
The process ends because 153 = 1^3 + 5^3 + 3^3.
		

Crossrefs

Cf. A055012 (sum of cubes of digits), A182111 (number of steps to a cycle), A165330 (cycle end), A046156.
Cf. A046197 (proving that {0, 1, 153, 370, 371, 407} are the only possible fixed points for all numbers of any size when repeatedly summing the cubes of its digits).
Cf. A346789 (concluding the number from the sum of the cubes of its digits).

Programs

  • Mathematica
    Table[k=0;While[Last[s=NestList[Total[IntegerDigits@#^3]&,k,n]]!=153||Count[s,153]!=1,k=k+3];k,{n,0,14}] (* Giorgos Kalogeropoulos, Jul 30 2021 *)

A346789 a(n) is the smallest integer m, such that for every sufficiently large integer k, A165370(729*k+n) can be written as m followed by zero or more 9's.

Original entry on oeis.org

0, 1, 11, 111, 1111, 2666888, 26688, 268, 2, 12, 112, 3377, 13377, 358888, 3788888, 2268, 22, 122, 1122, 4567, 46778, 477, 1477, 11477, 222, 36688, 368, 3, 13, 113, 1113, 5566888, 55688, 558, 5788, 23, 123, 44788, 144788, 57777, 777778, 2558, 25788, 223, 5666
Offset: 0

Views

Author

Jon E. Schoenfield, Aug 03 2021

Keywords

Comments

This sequence was motivated by the problem of finding large terms in A346630.
The sequence has 9^3 = 729 terms. As it turns out, "sufficiently large" is >= 4609; 4609 mod 729 = 235, and a(235) = 1888888888 is both the largest term and the term having the largest sum of cubes of digits.

Examples

			Let f(j) be the sum of the cubes of the digits of j, and let g(k) be the smallest number such that f(g(k)) = k.
g(4609) is the concatenation of a(4609 mod 729) and 0 9's: a(4609 mod 729) = a(235) = 1888888888, and f(1888888888) = 4609.
This sequence can be applied to the problem of extending A346630. With a suitable computer program, it can be determined in a small fraction of a second that the four smallest numbers requiring 14 steps of summing the cubes of digits to reach the narcissistic number 153 are 12558 (which is A346630(14)) and its three smallest anagrams, 12585, 12855, and 15258. Then, given the terms of this sequence, it can immediately be shown that --
-- g(12558) is the concatenation of a(12558 mod 729) and 13 9's: a(12558 mod 729) = a(165) = 12888888, and 12558 - f(12888888) = 12558 - 3081 = 9477 = 13 * 9^3, so g(12558) is the concatenation 12888888//9999999999999 (a 21-digit number)
-- g(12585) is the concatenation of a(12585 mod 729) and 17 9's; 12585 mod 729 = 192, a(192) = 444, so g(12585) is the 20-digit number 44499999999999999999
-- g(12855) is the concatenation of a(12855 mod 729) = a(462) = 13347 and 17 9's (thus, a 22-digit number)
-- g(15258), since 15258/9^3 > 20, must have more than 20 digits, and so must g(k) for all k > 15258
-- consequently, the 20-digit number 44499999999999999999 is the smallest number j such that f(j) is one of {12558, 12585, 12855}, and thus the smallest number requiring 15 steps to reach 153; i.e., 44499999999999999999 = A346630(15).
Going one step further, since 44499999999999999999 mod 729 = 327, a(327) = 3777, and f(3777) = 1056, the concatenation of 3777 and (44499999999999999999 - 1056)/9^3 = 61042524005486967 9's, i.e., the 61042524005486971-digit number 3777999...9 (let's call this huge number "H"), is the smallest j such that f(j) = 44499999999999999999. And since the 2nd-smallest number requiring 15 steps to reach 153 is 44949999999999999999 (the smallest anagram of A346630(15)), and since dividing it by 9^3 yields 61659807956104252.39..., which clearly exceeds the number of digits in H, it follows that H = A346630(16).
		

Crossrefs

Programs

Formula

a(n) = A165370(729*7+n) minus the trailing 9's. - Ondrej Kutal, Oct 06 2024

Extensions

Name revised by Ondrej Kutal, Oct 25 2024

A351985 If n = abcd... in decimal, a(n) = |a^3 - b^3 + c^3 - d^3 + ...|.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 0, 7, 26, 63, 124, 215, 342, 511, 728, 8, 7, 0, 19, 56, 117, 208, 335, 504, 721, 27, 26, 19, 0, 37, 98, 189, 316, 485, 702, 64, 63, 56, 37, 0, 61, 152, 279, 448, 665, 125, 124, 117, 98, 61, 0, 91, 218, 387, 604, 216, 215, 208, 189, 152
Offset: 0

Views

Author

Luca Onnis, Feb 27 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (l-> abs(add(l[i]^3*(-1)^i, i=1..nops(l))))(convert(n, base, 10)):
    seq(a(n), n=0..64);  # Alois P. Heinz, Mar 24 2022
  • Mathematica
    Table[Abs[Sum[(-1)^(k + 1)*Part[IntegerDigits[n]^3, k], {k, 1, Length[IntegerDigits[n]]}]], {n, 0, 100}]
  • PARI
    a(n) = my(d=digits(n)); abs(sum(k=1, #d, (-1)^k*d[k]^3)) \\ Michel Marcus, Feb 27 2022
    
  • Python
    def A351985(n): return abs(sum((-1 if a%2 else 1)*int(b)**3 for a, b in enumerate(str(n)))) # Chai Wah Wu, Mar 09 2022

A003620 Number of iterations until 3n reaches 153 under x goes to sum of cubes of digits map.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) = A165331(A008585(n)). [From Reinhard Zumkeller, Nov 21 2009]

References

  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 13.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A055012. [From Reinhard Zumkeller, Nov 21 2009]

Programs

  • Mathematica
    Table[Length[NestWhileList[Total[IntegerDigits[#]^3]&,3n,#!=153&]]-1,{n,80}] (* Harvey P. Dale, Dec 19 2011 *)

A055207 Sum of n-th powers of digits of n.

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 1, 2, 4097, 1594324, 268435457, 30517578126, 2821109907457, 232630513987208, 18014398509481985, 1350851717672992090, 1048576, 2097153, 8388608, 94151567435, 281474993487872, 298023223910507557
Offset: 0

Views

Author

Henry Bottomley, Jun 19 2000

Keywords

Examples

			a(12) = 1^12 + 2^12 = 1 + 4096 = 4097.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(i^n, i=convert(n, base, 10)):
    seq(a(n), n=0..29);  # Alois P. Heinz, Dec 18 2022
  • Mathematica
    Join[{1},Table[Total[IntegerDigits[n]^n],{n,25}]] (* Harvey P. Dale, Jul 16 2011 *)

A165332 Duplicate of A031179.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 50, 51, 53, 54, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 17 2009

Keywords

Comments

Original title: Numbers that eventually reach a fixed point under "x -> sum of cubes of digits of x" (see A055012, A046197).

A169664 Numbers k divisible respectively by the sum of digits, the sum of the squares and the sum of the cubes of digits in base 10 of k.

Original entry on oeis.org

1, 10, 100, 110, 111, 200, 500, 1000, 1010, 1011, 1100, 1101, 1110, 2000, 2352, 5000, 5500, 10000, 10010, 10011, 10100, 10101, 10110, 11000, 11001, 11010, 11100, 11112, 20000, 22000, 22200, 23520, 25032, 25110, 30100, 40000, 41013, 44160, 50000
Offset: 1

Views

Author

Michel Lagneau, Apr 05 2010

Keywords

Examples

			For k = 174192, 1^3 + 7^3 + 4^3 + 1^3 + 9^3 + 2^3 = 1146, and 174192 = 152*1146; 1^2 + 7^2 + 4^2 + 1^2 + 9^2 + 2^2 = 152, and 174192 = 152*1146; 1 + 7 + 4 + 1 + 9 + 2 = 24, and 174192 = 24*7258.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 200000 do:l:=evalf(floor(ilog10(n))+1) : n0:=n:s1:=0:s2:=0: s3:=0:for m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s1:=s1+u:s2:=s2+u^2:s3:=s3+u^3:od:if irem(n,s1)=0 and irem(n,s2)=0 and irem(n,s3)=0 then print(n):else fi:od:
  • Mathematica
    dsQ[n_]:=Module[{idn=IntegerDigits[n]}, Divisible[n,Total[idn]] && Divisible[n,Total[idn^2]] && Divisible[n,Total[idn^3]]]; Select[Range[50000],dsQ]  (* Harvey P. Dale, Feb 24 2011 *)

Formula

A007953(k)|k and A003132(k)|k and A055012(k)| k.
Previous Showing 41-50 of 65 results. Next