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.

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

This page as a plain text file.
%I A245475 #19 Dec 04 2024 19:15:19
%S A245475 11,101,110,111,113,131,146,164,166,199,223,232,289,298,311,322,335,
%T A245475 337,346,353,355,364,373,388,416,436,449,461,463,494,533,535,553,566,
%U A245475 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
%N A245475 Numbers n such that the sum of digits, sum of squares of digits, and sum of cubes of digits are all prime.
%C A245475 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).
%H A245475 Robert Israel, <a href="/A245475/b245475.txt">Table of n, a(n) for n = 1..10000</a>
%e A245475 1^1 + 4^1 + 6^1 = 11 is prime.
%e A245475 1^2 + 4^2 + 6^2 = 53 is prime.
%e A245475 1^3 + 4^3 + 6^3 = 281 is prime.
%e A245475 Thus 146, 164, 416, 461, 641, and 614 are members of this sequence.
%p A245475 filter:= proc(n) local L;
%p A245475   L:= convert(n,base,10);
%p A245475   isprime(convert(L,`+`)) and
%p A245475   isprime(convert(map(`^`,L,2),`+`)) and
%p A245475   isprime(convert(map(`^`,L,3),`+`))
%p A245475 end proc:
%p A245475 select(filter, [$1..2000]); # _Robert Israel_, Dec 04 2024
%t A245475 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 *)
%o A245475 (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,", ")))
%Y A245475 Cf. A182404, A225534, A108662.
%K A245475 nonn,base
%O A245475 1,1
%A A245475 _Derek Orr_, Jul 23 2014