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

A034088 Numbers divisible by the sum of the cubes of their digits.

Original entry on oeis.org

1, 10, 100, 110, 111, 153, 200, 221, 370, 371, 407, 500, 702, 1000, 1010, 1011, 1040, 1100, 1101, 1110, 1120, 1210, 1215, 1232, 1323, 1530, 1728, 2000, 2030, 2080, 2110, 2210, 2240, 2331, 2352, 2376, 2464, 2580, 3212, 3213, 3304, 3456, 3520, 3700, 3710
Offset: 1

Views

Author

Keywords

Comments

Ratio between original number and a(n) = 1 for n = 1, 6, 9, 10, 11, ... a(n)= 1, 153, 370, 371, 407,... - Carmine Suriano, May 04 2013

Examples

			12672 is a term since 1^3+2^3+6^3+7^3+2^3 = 576 divides 12672. - _Carmine Suriano_, May 04 2013
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4000], Divisible[#, Plus @@ (IntegerDigits[#]^3)] &] (* Amiram Eldar, Jan 31 2021 *)

Extensions

Offset corrected by Amiram Eldar, Jan 31 2021

A225534 Numbers whose sum of cubed digits is prime.

Original entry on oeis.org

11, 101, 110, 111, 113, 115, 122, 124, 128, 131, 139, 142, 146, 148, 151, 155, 164, 166, 182, 184, 193, 199, 212, 214, 218, 221, 223, 227, 232, 236, 238, 241, 245, 254, 256, 263, 265, 269, 272, 278, 281, 283, 287, 289, 296, 298, 311, 319, 322, 326, 328, 335
Offset: 1

Views

Author

Keywords

Comments

Note that 11 is the only two-digit number in the sequence.
a(n) ~ n. For 414 < n < 10000, 6.38*n - 528 provides an estimate of a(n) to within 6%.

Examples

			139 is in the sequence because 1^3 + 3^3 + 9^3 = 757, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[350],PrimeQ[Total[IntegerDigits[#]^3]]&] (* Harvey P. Dale, Mar 16 2016 *)
  • R
    digcubesum<-function(x) sum(as.numeric(strsplit(as.character(x),split="")[[1]])^3); library(gmp);
    which(sapply(1:1000,function(x) isprime(digcubesum(x))>0))

A154820 Numbers whose trajectory under iteration of sum of cubes of digits eventually turns out to follow the cyclic iteration of 133, 55, 250.

Original entry on oeis.org

4, 13, 25, 28, 31, 40, 46, 52, 55, 64, 82, 103, 130, 133, 205, 208, 250, 256, 265, 280, 289, 298, 301, 310, 313, 331, 349, 394, 400, 406, 439, 448, 460, 484, 493, 502, 505, 520, 526, 550, 562, 589, 598, 604, 625, 640, 652, 679, 697, 769, 796, 802, 820, 829
Offset: 1

Views

Author

Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 15 2009

Keywords

Comments

All the numbers are of the form 3n+1.
Subsequence of A165336. - Reinhard Zumkeller, Sep 17 2009

Examples

			Taking 40 for example,
  4^3 + 0^3 = 64;
  6^3 + 4^3 = 280;
  2^3 + 8^3 + 0^3 = 520;
  5^3 + 2^3 + 0^3 = 133;
  1^3 + 3^3 + 3^3 = 55;
  5^3 + 5^3 = 250.
		

Crossrefs

Programs

  • Maple
    A055012 := proc(n) local a,d ; a := 0 ; for d in convert(n,base,10) do a := a+d^3; od; a ; end: isA154820 := proc(n) local traj,t ; t := n ; traj := {} ; while true do if t in traj then if t in {133,55,250} then RETURN(true) ; else RETURN(false) ; fi; else traj := traj union {t} ; t := A055012(t) ; fi; od: end: for n from 1 to 1000 do if isA154820(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Jan 18 2009

Extensions

Extended by R. J. Mathar, Jan 18 2009
Edited by Charles R Greathouse IV, Aug 02 2010

A165340 Triangle read by rows: T(n,0) = smallest number m such that A165331(m)=n and A165330(m)=153; T(n,k+1) = sum of cubes of digits of T(n,k), 0<=k

Original entry on oeis.org

153, 135, 153, 18, 513, 153, 3, 27, 351, 153, 9, 729, 1080, 513, 153, 12, 9, 729, 1080, 513, 153, 33, 54, 189, 1242, 81, 513, 153, 114, 66, 432, 99, 1458, 702, 351, 153, 78, 855, 762, 567, 684, 792, 1080, 513, 153, 126, 225, 141, 66, 432, 99, 1458, 702, 351
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 17 2009

Keywords

Comments

T(n,k+1) = A055012(T(n,k)), 0 <= k < n;
A165331(T(n,k)) = n - k;
A165330(T(n,k)) = 153; T(n,n) = 153;
10^10 < T(15,0) <= 22222599999999999999999,
T(14,0) = 12558 = A055012(22222599999999999999999).

Examples

			The triangle begins:
n=0: 153,
n=1: 135 -> 1+3^3+5^3=153,
n=2: 18 -> 1+8^3=513 -> 5^3+1+3^3=153,
n=3: 3 -> 3^3=27 -> 2^3+7^3=351 -> 3^3+5^3+1=153,
n=4: 9 -> 9^3=729 -> 7^3+2^3+9^3=1080 -> 1+0+8^3+0=513 -> 5^3+1+3^3=153,
n=5: 12 -> 1+2^3=9 -> 9^3=729 -> 7^3+2^3+9^3=1080 -> 1+0+8^3+0=513 -> 5^3+1+3^3=153,
n=6: 33 -> 2*3^3=54 -> 5^3+4^3=189 -> 1+8^3+9^3=1242 -> 1+2^3+4^3+2^3=81 -> 8^3+1=513 -> 5^3+1+3^3=153.
		

Crossrefs

A202279 Numbers k such that the sum of digits^3 of k equals Sum_{d|k, 1

Original entry on oeis.org

142, 160, 1375, 6127, 12643, 51703, 86833, 103039, 104647, 112093, 137317, 218269, 261883, 266923, 449881, 505891, 617569, 907873
Offset: 1

Views

Author

Michel Lagneau, Dec 15 2011

Keywords

Comments

The sequence is finite because the restricted sum of divisors of n, for n composite, is at least sqrt(n), while the sum of the cubes of the digits of n is at most 9^3*log_10(n+1). - Giovanni Resta, Oct 05 2018

Examples

			160 is in the sequence because 1^3 + 6^3 + 0^3 = 217, and the sum of the divisors 1< d<160 is 2 + 4 + 5 + 8 + 10 + 16 + 20 + 32 + 40 + 80 = 217.
		

Crossrefs

Programs

  • Maple
    A055012 := proc(n)
            add(d^3,d=convert(n,base,10)) ;
    end proc:
    A048050 := proc(n)
            if n > 1 then
            numtheory[sigma](n)-1-n ;
            else
                    0;
            end if;
    end proc:
    isA202279 := proc(n)
            A055012(n) = A048050(n) ;
    end proc:
    for n from 1 do
            if isA202279(n) then
                    printf("%d,\n",n);
            end if;
    end do; # R. J. Mathar, Dec 15 2011
  • Mathematica
    Q[n_]:=Module[{a=Total[Rest[Most[Divisors[n]]]]}, a == Total[IntegerDigits[n]^3]]; Select[Range[2, 5*10^7], Q]
    Select[Range[1000000],DivisorSigma[1,#]-#-1==Total[IntegerDigits[#]^3]&] (* Harvey P. Dale, Jul 19 2014 *)

Formula

{n: A055012(n) = A048050(n)}. - R. J. Mathar, Dec 15 2011

A226224 The largest value of k in base n for which the sum of digits of k = sqrt(k).

Original entry on oeis.org

1, 25, 9, 64, 100, 144, 49, 64, 81, 225, 121, 441, 169, 441, 441, 256, 289, 324, 361, 1296, 1296, 484, 529, 1089, 625, 676, 729, 2401, 841, 2601, 961, 1024, 3025, 1156, 2500, 4096, 1369, 1444, 4356, 3136, 1681, 4900, 1849, 5929, 3025, 2116, 2209, 6561, 2401
Offset: 2

Views

Author

Keywords

Comments

There are no values of k in base n with more than 3 digits. Proof: such a value with d digits would need to meet the criterion d*(n-1)>=sqrt(n)^d which establishes an upper limit of 4 digits for 2<=n<=6 and 3 for n>6. Because there are no four digit values of k in bases 2 through 6, k has a maximum of three digits in all bases.
Because k must be a square, there are only sqrt(n)^3 possible values in any base.
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.
a(n)=1 iff A226087(n)=1. Conjecture: this occurs exactly once -- in base 2.

Examples

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

Crossrefs

Programs

  • R
    for(n in 2:500) cat("Base",n,":",which(sapply((1:(ifelse(n>6,7,1)*n^ifelse(n>6,1,2)))^2, function(x) sum(inbase(x,n))==sqrt(x)))^2, "\n")

A123253 Sum of 7th powers of digits of n.

Original entry on oeis.org

0, 1, 128, 2187, 16384, 78125, 279936, 823543, 2097152, 4782969, 1, 2, 129, 2188, 16385, 78126, 279937, 823544, 2097153, 4782970, 128, 129, 256, 2315, 16512, 78253, 280064, 823671, 2097280, 4783097, 2187, 2188, 2315, 4374, 18571, 80312, 282123
Offset: 0

Views

Author

Zerinvary Lajos, Nov 06 2006

Keywords

Comments

Fixed points are listed in A124068 = row n=7 of A252648. - M. F. Hasler, Apr 12 2015

Crossrefs

Programs

  • Magma
    [0] cat [&+[d^7: d in Intseq(n)]: n in [1..40]]; // Bruno Berselli, Feb 01 2013
    
  • Maple
    A123253 := proc(n)
            add(d^7,d=convert(n,base,10)) ;
    end proc: # R. J. Mathar, Jan 16 2013
  • Mathematica
    Table[Sum[DigitCount[n][[i]] i^7, {i, 9}], {n, 0, 40}] (* Bruno Berselli, Feb 01 2013 *)
  • PARI
    A123253(n)=sum(i=1,#n=digits(n),n[i]^7) \\ M. F. Hasler, Apr 12 2015

A165370 Smallest number whose sum of cubes of digits is n.

Original entry on oeis.org

0, 1, 11, 111, 1111, 11111, 111111, 1111111, 2, 12, 112, 1112, 11112, 111112, 1111112, 11111112, 22, 122, 1122, 11122, 111122, 1111122, 11111122, 111111122, 222, 1222, 11222, 3, 13, 113, 1113, 11113, 2222, 12222, 112222, 23, 123, 1123, 11123
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 17 2009

Keywords

Comments

A055012(a(n)) = n and A055012(m) <> n for m < a(n).
For all terms the digits are in nondecreasing order.
From Ondrej Kutal, Oct 06 2024: (Start)
a(n) can be formulated as a solution to an integer linear programming problem: Let c_i be the number of occurrences of digit i in the number (1 <= i <= 9). We want to minimize c_1 + c_2 + ... + c_9 (total number of digits) subject to the constraints c_1 + 8*c_2 + 27*c_3 + ... + 729*c_9 = n and c_i >= 0 for all i. To get the smallest solution among all with this number of digits, we further maximize the number of 1s (c_1), then the number of 2s (c_2), and so on up to 9s (c_9). This approach ensures we find the lexicographically smallest number with the minimum number of digits whose sum of cubes equals n.
a(n) can be computed by selecting a digit d (1 <= d <= 9) that minimizes the result of concatenating d with a(n-d^3), where n-d^3 >= 0. This can be done efficiently using dynamic programming.
As it turns out, the sequence is periodic (up to the trailing 9s) for n >= 4609, with a period of 729. Therefore, only a finite amount of values need to be computed; the rest can be derived by appending the appropriate number of 9s.
(End)

Crossrefs

Programs

  • PARI
    a(n) = my(k=1); while(vecsum(apply(x->(x^3), digits(k))) != n, k++); k; \\ Michel Marcus, Sep 08 2019
    
  • Python
    # using dynamic programming
    def A165370(n):
        # caching numbers,their tenth power (for fast concatenation) and cube sum
        cache = [(None, None, None)] * (n + 1)
        cache[0] = (0, 1, 0)
        cubes = [i**3 for i in range(10)]
        for i in range(1, min(n + 1, 5832)):
            for d in range(1, 10):
                if i - cubes[d] >= 0:
                    sub_result, tenthpower, cubesum = cache[i - cubes[d]]
                    if sub_result is not None:
                        current = d * tenthpower + sub_result
                        if cache[i][0] is None or current < cache[i][0]:
                            cache[i] = (current, 10 * tenthpower, cubesum + cubes[d])
        if n < 5832:
            return cache[n][0]
        sub_result, _, cubesum = cache[5103 + n % 729]
        nines = (n - cubesum) // 729
        return (sub_result + 1) * (10 ** nines) - 1 # Ondrej Kutal, Oct 06 2024

A225535 Numbers whose cubed digits sum to a cube, and have more than one nonzero digit.

Original entry on oeis.org

168, 186, 345, 354, 435, 453, 534, 543, 618, 681, 816, 861, 1068, 1086, 1156, 1165, 1516, 1561, 1608, 1615, 1651, 1680, 1806, 1860, 3045, 3054, 3405, 3450, 3504, 3540, 4035, 4053, 4305, 4350, 4503, 4530, 5034, 5043, 5116, 5161, 5304, 5340, 5403, 5430, 5611
Offset: 1

Views

Author

Keywords

Examples

			5^3 + 6^3 + 1^3 + 1^3 = 343, which is 7^3.
		

Crossrefs

Cf. A225534 (cubed digits sum to a prime), A197039 (square), A046459. A055012.
Cf. A165330 (cube cycle), A046197 (cubic fixed points), A000578 (cubes).
Cf. A052034 (squared digits sum to a prime), A028839, A117685.
Cf. A164882 (n such that sum of the cubes of the digits of n^3 is perfect cube). - Zak Seidov, May 21 2013

Programs

  • Mathematica
    fQ[n_] := Module[{d = IntegerDigits[n]}, Count[d, 0] + 1 < Length[d] && IntegerQ[Total[d^3]^(1/3)]]; Select[Range[5611], fQ] (* T. D. Noe, May 19 2013 *)
  • R
    y=rep(0,10000); len=0; x=0; library(gmp);
    digcubesum<-function(x) sum(as.numeric(unlist(strsplit(as.character(as.bigz(x)),split="")))^3);
    iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0));
    nonzerodig<-function(x) sum(strsplit(as.character(x),split="")[[1]]!="0");
    which(sapply(1:6000,function(x) nonzerodig(x)>1 & iscube(digcubesum(x))))

A225567 Primes with nonzero digits such that sum of cubes of digits equal to square of sums.

Original entry on oeis.org

1423, 2143, 2341, 4231, 12253, 21523, 22153, 22531, 23251, 25321, 32251, 35221, 36343, 36433, 43633, 52321, 64333, 114451, 144511, 224461, 244261, 246241, 365557, 415141, 424261, 426421, 446221, 446461, 451411, 462421, 466441, 541141, 555637, 556537, 556573
Offset: 1

Views

Author

Balarka Sen, Jul 26 2013

Keywords

Comments

Largest term of this sequence is the 20-digit prime 99151111111111111111.
The Pagni article mentioned below has no bearing on this problem because it deals with the well-known identity sum_{i=1..n} i^3 = (sum_{i=1..n} i)^2. However, the article is interesting. - T. D. Noe, Jul 26 2013
This sequence has exactly 14068465 provable primes. This result required about one hour of Mathematica on fairly fast computer having 16 GB of memory. - T. D. Noe, Jul 30 2013

Examples

			a(5) = 12253 since 1^3 + 2^3 + 2^3 + 5^3 + 3^3 = (1 + 2 + 2 + 5 + 3)^2.
		

Crossrefs

Cf. A055012 (sum of cubes of digits), A118881 (square of sum of the digits).

Programs

  • Mathematica
    (* let tz[[i]] be numbers computed in A227073 *) Select[tz, PrimeQ] (* T. D. Noe, Jul 30 2013 *)
    pQ[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,0]&&Total[idn^3] == Total[ idn]^2]; Select[Prime[Range[50000]],pQ] (* Harvey P. Dale, Sep 17 2013 *)
  • PARI
    forprime(n=1, 10^7, v=digits(n); if(sum(i=1, length(v), v[i]^3)==sum(i=1, length(v), v[i])^2 & setsearch(Set(v),0)!=1, print1(n", ")))

Extensions

Corrected by T. D. Noe, Jul 26 2013
Previous Showing 21-30 of 65 results. Next