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

A210767 Numbers whose digit sum as well as sum of the 4th powers of the digits is a prime.

Original entry on oeis.org

11, 12, 14, 16, 21, 23, 25, 29, 32, 34, 38, 41, 43, 47, 52, 58, 61, 67, 74, 76, 83, 85, 89, 92, 98, 101, 102, 104, 106, 110, 111, 113, 119, 120, 131, 133, 140, 146, 160, 164, 166, 179, 191, 197, 201, 203, 205, 209, 210, 223, 230, 232, 250, 269, 290, 296, 302
Offset: 1

Views

Author

Jonathan Vos Post, May 10 2012

Keywords

Comments

This is to the exponent 4 as A182404 is to the exponent 2.

Examples

			21 is in the sequence because sum of digits 2+1= 3 is prime, and sum of the 4th powers of the digits 2^4+1^4=17 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[350],AllTrue[{Total[IntegerDigits[#]],Total[ IntegerDigits[ #]^4]},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 01 2019 *)
  • PARI
    dspow(n,b,k)=my(s);while(n,s+=(n%b)^k;n\=b);s
    select(n->isprime(sumdigits(n))&&isprime(dspow(n,10,4)), vector(10^3, i, i)) \\ Charles R Greathouse IV, May 11 2012

Formula

{n such that A055013(n) and A007953(n) are both primes}.

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,", ")))
Showing 1-2 of 2 results.