%I #13 Jun 19 2021 03:36:38
%S 496,946,1378,2485,7381,7750,8128,10011,11935,12880,13366,13861,14365,
%T 15931,19900,31375,33670,34453,35245,36046,38503,41905,43660,44551,
%U 45451,46360,48205,49141,50086,58996,65341,66430,73153,103285,104653,111628,114481,124750
%N Triangular numbers such that the sum of cubes of their digits is prime.
%C The cubes of the digits of 496 are 64, 729, and 216. They sum up to a prime number 1009. Thus, 496 is in the sequence.
%t Select[Table[n (n + 1)/2, {n, 500}], PrimeQ[Total[IntegerDigits[#]^3]] &]
%o (Python)
%o from sympy import isprime
%o def A000217(n): return n*(n+1)//2
%o def A055012(n): return sum(int(d)**3 for d in str(n))
%o def ok(tri): return isprime(A055012(tri))
%o print(list(filter(ok, (A000217(n) for n in range(500))))) # _Michael S. Branicky_, Jun 15 2021
%Y Cf. A000217.
%K nonn,base,less
%O 1,1
%A _Tanya Khovanova_, Jun 15 2021
|