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

A091366 Primes p such that the sum of the cubes of the digits of p is prime.

Original entry on oeis.org

11, 101, 113, 131, 139, 151, 193, 199, 223, 227, 241, 263, 269, 281, 283, 311, 337, 353, 359, 373, 421, 449, 461, 463, 487, 557, 577, 593, 599, 641, 643, 661, 733, 757, 821, 823, 827, 829, 883, 887, 919, 953, 991, 997, 1013, 1031, 1039, 1051, 1093, 1103, 1123
Offset: 1

Views

Author

Chuck Seggelin, Jan 03 2004

Keywords

Comments

Apparently, in most cases the sum of the digits of such primes is also prime, see A091365 for the exceptions.
I conjecture the contrary: the relative density of numbers in this sequence with prime digit sum is 0. - Charles R Greathouse IV, Sep 08 2010

Examples

			a(1)=11 because 1^3 + 1^3 = 2 which is prime. a(10)=227 because 2^3 + 2^3 + 7^3 = 359 which is prime.
		

Crossrefs

Cf. A046704 (primes whose digits sum to a prime) A052034 (primes whose digits squared sum to a prime) A091365 (primes whose digits cubed sum to a prime but whose digits do not sum to a prime).

Programs

  • Mathematica
    Select[Prime[Range[2, 200]], PrimeQ[Total[IntegerDigits[#]^3]]&] (* Vincenzo Librandi, Apr 13 2013 *)
  • PARI
    is(n)=my(v);if(!isprime(n),return(0));v=eval(Vec(Str(n)));isprime(sum(i=1,#v,v[i]^3)) \\ Charles R Greathouse IV, Sep 08 2010

Extensions

a(44) = 997 inserted by Charles R Greathouse IV, Sep 08 2010

A176179 Primes such that the sum of digits, the sum of the squares of digits and the sum of 3rd powers of their digits is also a prime.

Original entry on oeis.org

11, 101, 113, 131, 199, 223, 311, 337, 353, 373, 449, 461, 463, 641, 643, 661, 733, 829, 883, 919, 991, 1013, 1031, 1103, 1301, 1439, 1451, 1471, 1493, 1499, 1697, 1741, 1949, 2089, 2111, 2203, 2333, 2441, 2557, 3011, 3037, 3307, 3323, 3347, 3491, 3583, 3637, 3659, 3673, 3853, 4049, 4111, 4139, 4241, 4337, 4373, 4391, 4409
Offset: 1

Views

Author

Michel Lagneau, Apr 10 2010

Keywords

Comments

See A091365 for the exceptions for the case where the sum of the digits of p is not prime, but the sum of the cubes of the digits of p is prime.

Examples

			For the prime number n =5693 we obtain :
5 + 6 + 9 + 3 = 23 ;
5^2 + 6^2 + 9^2 + 3^2 = 151 ;
5^3 + 6^3 + 9^3 + 3^3 = 1097.
		

References

  • Charles W. Trigg, Journal of Recreational Mathematics, Vol. 20(2), 1988.

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 2 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 type(n,prime)=true and type(s1,prime)=true and type(s2,prime)=true and type(s3,prime)=true then print(n):else fi:od:
  • Mathematica
    okQ[n_]:=Module[{idn=IntegerDigits[n]}, And@@PrimeQ[Total/@{idn,idn^2,idn^3}]]; Select[Prime[Range[600]],okQ]  (* Harvey P. Dale, Jan 18 2011 *)
  • Python
    from sympy import isprime, primerange
    def ok(p):
        return all(isprime(sum(int(d)**k for d in str(p))) for k in [1, 2, 3])
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(4409)) # Michael S. Branicky, Nov 23 2021

Extensions

Corrected and extended by Harvey P. Dale, Jan 18 2011

A259418 Primes p such that p plus the cube of sum of digits of p is a perfect square.

Original entry on oeis.org

17, 131, 863, 1031, 1481, 3011, 3449, 3881, 3923, 5903, 16649, 17921, 22643, 26249, 26687, 30113, 30809, 33629, 48473, 56009, 58049, 60623, 70163, 71933, 75521, 94109, 109331, 129209, 134129, 155387, 179909, 193601, 194003, 195401, 219647, 239807, 258233, 263411
Offset: 1

Views

Author

K. D. Bajpai, Jun 26 2015

Keywords

Comments

All the terms are congruent to 2 (mod 3).

Examples

			a(2) = 131 is prime: 131 + (1 + 3 + 1)^3 = 256 = 16^2.
a(3) = 863 is prime: 863 + (8 + 6 + 3)^3 = 5776 = 76^2.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^6) |  IsSquare(&+Intseq(p)^3 + p)] ;
  • Mathematica
    Select[Prime[Range[100000]], IntegerQ[Sqrt[# + Plus @@ (IntegerDigits[#])^3]] &]
  • PARI
    forprime(p=1, 10^6, if(issquare(sumdigits(p)^3 + p), print1(p, ", ")))
    

A091368 Primes p such that the sum of the digits of p is not prime, but the sum of each digit raised to the 4th power is prime.

Original entry on oeis.org

1699, 2689, 6199, 6829, 6991, 7477, 8089, 8269, 8629, 9619, 12589, 15289, 19069, 19609, 20599, 20959, 21589, 21859, 23857, 25189, 25819, 25873, 25981, 27259, 27529, 27583, 28069, 28537, 28573, 28591, 28753, 29059, 29527, 29581, 29851
Offset: 1

Views

Author

Chuck Seggelin, Jan 03 2004

Keywords

Comments

Apparently, for primes such that each digit raised to the 4th power sum to a prime, it is more likely that the digits themselves also sum to a prime. In the first 10,000 primes there are 760 primes whose digits raised to the 4th power sum to a prime. Of these, only 106 are such that the sums of the digits are not prime. Interestingly, all of these primes have a digit sum of 25 or 35. Essentially this sequence is the terms of A091367 (primes whose digits raised to the 4th power sum to a prime) that do not also appear in A046704 (primes whose digits sum to a prime).

Examples

			a(1)=1699 because 1+6+9+9 = 25 which is not prime, but 1^4 + 6^4 + 9^4 + 9^4 = 14419 which is prime.
		

Crossrefs

Cf. A046704 (primes whose digits sum to a prime) A091367 (primes whose digits raised to the 4th power sum to a prime) A052034 and A091362 (same observation for digits squared) A091366 and A091365 (same observation for digits cubed).

Programs

  • Mathematica
    pnpQ[n_]:=Module[{idn=IntegerDigits[n]},!PrimeQ[Total[idn]]&&PrimeQ[ Total[ idn^4]]]; Select[Prime[Range[4000]],pnpQ] (* Harvey P. Dale, Apr 26 2018 *)

A259489 Numbers n such that n plus the cube of sum of digits of n is a perfect square.

Original entry on oeis.org

17, 38, 131, 171, 360, 392, 500, 512, 605, 729, 863, 1031, 1035, 1481, 1737, 1994, 2156, 2268, 2483, 2513, 2520, 2732, 2817, 3011, 3240, 3384, 3449, 3710, 3881, 3923, 4032, 4100, 4112, 4145, 4572, 5193, 5456, 5598, 5720, 5832, 5903, 5924, 7164, 7388, 7625, 7631
Offset: 1

Views

Author

K. D. Bajpai, Jun 28 2015

Keywords

Comments

All the terms are congruent to 2 or 0 (mod 3).

Examples

			a(3) = 131: 131 + (1 + 3 + 1)^3 = 256 = 16^2.
a(4) = 171: 171 + (1 + 7 + 1)^3 = 900 = 30^2.
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..10^4] |  IsSquare(&+Intseq(n)^3 + n) ] ;
  • Mathematica
    Select[Range[50000], IntegerQ[Sqrt[# +Plus@@(IntegerDigits[#])^3]]&]
  • PARI
    for(n = 1, 10^5, if(issquare(sumdigits(n)^3 + n), print1(n, ", ")))
    

A121642 Numbers with composite sum of digits and prime sum of cubes of digits.

Original entry on oeis.org

799, 889, 898, 979, 988, 997, 2779, 2797, 2977, 3499, 3949, 3994, 4399, 4588, 4777, 4858, 4885, 4939, 4993, 5488, 5668, 5686, 5848, 5866, 5884, 6568, 6586, 6658, 6667, 6676, 6685, 6766, 6856, 6865, 7099, 7279, 7297, 7477, 7666, 7729, 7747, 7774, 7792
Offset: 1

Views

Author

Tanya Khovanova, Sep 08 2006

Keywords

Examples

			For example the sum of digits of 799 is 25 which is composite; the sum of the cubes of its digits is 343 + 729 + 729 = 1801, which is prime.
		

Crossrefs

Cf. A091365 (Primes p such that the sum of the digits of p is not prime, but the sum of the cubes of the digits of p is prime.) is a subsequence of this sequence.

Programs

  • Mathematica
    sod[k_, m_] := Plus @@ (IntegerDigits[k]^m); Select[ Table[n, {n, 10000}], (! PrimeQ[sod[ #, 1]] && PrimeQ[sod[ #, 3]]) &]
Showing 1-6 of 6 results.