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

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

A245475 Numbers n such that the sum of digits, sum of squares of digits, and sum of cubes of digits are all prime.

Original entry on oeis.org

11, 101, 110, 111, 113, 131, 146, 164, 166, 199, 223, 232, 289, 298, 311, 322, 335, 337, 346, 353, 355, 364, 373, 388, 416, 436, 449, 461, 463, 494, 533, 535, 553, 566, 614, 616, 634, 641, 643, 656, 661, 665, 733, 829, 838, 883, 892, 919, 928, 944, 982, 991, 1001, 1010, 1011, 1013, 1031, 1046, 1064, 1066, 1099
Offset: 1

Views

Author

Derek Orr, Jul 23 2014

Keywords

Comments

There are infinitely many numbers in this sequence; 0's can be added to any number any number of times in any logical order (i.e., the number doesn't start with a zero).

Examples

			1^1 + 4^1 + 6^1 = 11 is prime.
1^2 + 4^2 + 6^2 = 53 is prime.
1^3 + 4^3 + 6^3 = 281 is prime.
Thus 146, 164, 416, 461, 641, and 614 are members of this sequence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      L:= convert(n,base,10);
      isprime(convert(L,`+`)) and
      isprime(convert(map(`^`,L,2),`+`)) and
      isprime(convert(map(`^`,L,3),`+`))
    end proc:
    select(filter, [$1..2000]); # Robert Israel, Dec 04 2024
  • Mathematica
    sdpQ[n_]:=Module[{idn=IntegerDigits[n]},AllTrue[{Total[idn], Total[ idn^2], Total[ idn^3]}, PrimeQ]]; Select[Range[1100],sdpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 06 2018 *)
  • PARI
    for(n=1,10^3,d=digits(n);s1=sum(i=1,#d,d[i]);s2=sum(j=1,#d,d[j]^2);s3=sum(k=1,#d,d[k]^3);if(isprime(s1)&&isprime(s2)&&isprime(s3),print1(n,", ")))

A345072 Numbers k such that the sum of cubes of digits of both k and k-2 are primes.

Original entry on oeis.org

113, 115, 124, 148, 166, 184, 214, 223, 238, 256, 265, 283, 289, 298, 328, 337, 355, 364, 418, 463, 487, 496, 526, 535, 553, 568, 577, 586, 616, 625, 634, 643, 658, 694, 757, 784, 814, 823, 829, 847, 856, 874, 889, 928, 946, 964, 997, 1013, 1015, 1024, 1048, 1066
Offset: 1

Views

Author

Charles U. Lonappan, Jun 07 2021

Keywords

Comments

Numbers k such that k and k-2 appear in A225534.

Crossrefs

Cf. A225534.

Programs

  • Mathematica
    q[n_] := PrimeQ[Plus @@ (IntegerDigits[n]^3)]; Select[Range[3, 1000], q[#-2] && q[#] &] (* Amiram Eldar, Jun 07 2021 *)

A359449 Positive integers in which the sum of the k-th powers of their digits is a prime number for k = 1, 2, 3, 4, 5, and 6 but not for k=7.

Original entry on oeis.org

223, 232, 322, 1349, 1394, 1439, 1493, 1934, 1943, 2023, 2032, 2203, 2230, 2302, 2320, 3022, 3149, 3194, 3202, 3220, 3419, 3491, 3914, 3941, 4139, 4193, 4319, 4391, 4913, 4931, 9134, 9143, 9314, 9341, 9413, 9431, 10349, 10394, 10439, 10493, 10934, 10943, 13049, 13094, 13409, 13490, 13904, 13940
Offset: 1

Views

Author

José Hernández, Jan 02 2023

Keywords

Examples

			223 belongs to this sequence because 2+2+3=7, 2^2+2^2+3^2=17, 2^3+2^3+3^3=43, 2^4+2^4+3^4=113, 2^5+2^5+3^5=307, and 2^6+2^6+3^6=857 are prime numbers whereas 2^7+2^7+3^7 is a composite number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,t,k;
      L:= convert(n,base,10);
      andmap(isprime, [seq(add(t^k,t=L),k=1..6)]) and not isprime(add(t^7,t=L))
    end proc:
    select(filter, [$1..20000]); # Robert Israel, Jan 03 2023
  • Mathematica
    For[a = 0, a <= 9, a++,
     For[b = 0, b <= 9, b++,
     For[c = 0, c <= 9, c++,
     For[d = 0, d <= 9, d++,
       If[PrimeQ[a + b + c + d] == True &&
          PrimeQ[a^2 + b^2 + c^2 + d^2] == True &&
          PrimeQ[a^3 + b^3 + c^3 + d^3] == True &&
          PrimeQ[a^4 + b^4 + c^4 + d^4] == True &&
          PrimeQ[a^5 + b^5 + c^5 + d^5] == True &&
          PrimeQ[a^6 + b^6 + c^6 + d^6] == True &&
          PrimeQ[a^7 + b^7 + c^7 + d^7] == False, Print[a, b, c, d]]]]]]
    (* This code outputs all the terms of the sequence in the interval [1,10^4]. *)
  • PARI
    isok(n) = my(d=digits(n)); for (i=1, 6, if (!isprime(sum(k=1,#d, d[k]^i)), return(0))); !isprime(sum(k=1,#d, d[k]^7)); \\ Michel Marcus, Jan 02 2023

A359610 Numbers k such that the sum of the 5th powers of the digits of k is prime.

Original entry on oeis.org

11, 101, 110, 111, 119, 128, 133, 182, 188, 191, 218, 223, 227, 229, 232, 247, 272, 274, 281, 292, 313, 322, 331, 337, 346, 359, 364, 368, 373, 377, 379, 386, 395, 397, 427, 436, 463, 472, 478, 487, 539, 557, 568, 575, 577, 586, 593, 634, 638, 643, 658, 667
Offset: 1

Views

Author

José Hernández, Jan 06 2023

Keywords

Comments

It is easy to establish that the sequence is infinite: if x is in the sequence, so is 10*x.
Alternatively: the sequence is infinite as the sequence contains all numbers consisting of a prime number of 1s and an arbitrary number of 0s. - Charles R Greathouse IV, Jan 06 2023

Examples

			11 is a term since 1^5 + 1^5 = 2 is prime.
		

Crossrefs

A031974 is a subsequence.
Cf. A055014 (sum of the 5th powers of digits).

Programs

  • Mathematica
    top = 999; (* Find all terms <= top *)
    For[t = 11, t <= top, t++, k = IntegerLength[t]; sum = 0;
       For[e = 0, e <= k - 1, e++, sum = sum + NumberDigit[t, e]^5];
          If[PrimeQ[sum] == True, Print[t]]]
    Select[Range[670],PrimeQ[Total[IntegerDigits[#]^5]] &] (* Stefano Spezia, Jan 08 2023 *)
  • PARI
    isok(k) = isprime(vecsum(apply(x->x^5, digits(k)))); \\ Michel Marcus, Jan 07 2023
Showing 1-5 of 5 results.