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.

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

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

A197129 Numbers such that the sum, sum of the squares, and sum of the cubes of the decimal digits are each a perfect square.

Original entry on oeis.org

1, 4, 9, 10, 40, 90, 100, 400, 900, 1000, 1111, 1224, 1242, 1339, 1393, 1422, 1933, 2124, 2142, 2214, 2241, 2412, 2421, 3139, 3193, 3319, 3391, 3913, 3931, 4000, 4122, 4212, 4221, 4444, 4669, 4696, 4966, 6469, 6496, 6649, 6694, 6946, 6964, 9000, 9133, 9313
Offset: 1

Views

Author

Michel Lagneau, Oct 10 2011

Keywords

Comments

Each number > 90 contains at least two identical digits because the sequence A197125 contains a subset of numbers all of whose digits are distinct and are all the permutations of 1567890. But 1^3 + 5^3 + 6^3 + 7^3 + 8^3 + 9^3 = 1926 is not square. Consequently, it is impossible to find numbers > 90 with distinct digits in this sequence.

Examples

			4669 is in the sequence because:
4   + 6   + 6   + 9   = 25   = 5^2;
4^2 + 6^2 + 6^2 + 9^2 = 169  = 13^2;
4^3 + 6^3 + 6^3 + 9^3 = 1225 = 35^2.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10000 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 sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) and sqrt(s3)=floor(sqrt(s3))then printf(`%d, `, n): else fi:od:
  • Mathematica
    sdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]&&IntegerQ[Sqrt[Total[idn^3]]]]; Select[ Range[ 10000],sdQ] (* Harvey P. Dale, Oct 25 2011 *)
    psQ[n_]:=With[{idn=IntegerDigits[n]},AllTrue[{Sqrt[Total[idn]],Sqrt[Total[idn^2]],Sqrt[Total[idn^3]]},IntegerQ]]; Select[Range[10000],psQ] (* Harvey P. Dale, Nov 17 2024 *)
  • PARI
    is(n)=my(v=eval(Vec(Str(n))));issquare(sum(i=1,#v,v[i]))&&issquare(sum(i=1,#v,v[i]^2))&&issquare(sum(i=1,#v,v[i]^3)) \\ Charles R Greathouse IV, Oct 10 2011

Formula

A028839 INTERSECT A175396 INTERSECT A197039.
Showing 1-3 of 3 results.