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

A180421 Members p of A091366 such that digit-reverse(p) is also in A091366.

Original entry on oeis.org

11, 101, 113, 131, 151, 199, 311, 337, 353, 359, 373, 733, 757, 919, 953, 991, 1031, 1103, 1213, 1217, 1231, 1237, 1259, 1301, 1321, 1381, 1439, 1471, 1499, 1619, 1723, 1741, 1831, 1949, 3011, 3019, 3109, 3121, 3163, 3257, 3271, 3299, 3347, 3527, 3583, 3613, 3767
Offset: 1

Views

Author

Carmine Suriano, Sep 03 2010

Keywords

Examples

			a(10) = A091366(19) = 359 and reverse(359) = 953 = A091366(42) is again in A091366.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local i,L,d,y;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      d:= nops(L);
      isprime(add(L[i]^3,i=1..d)) and isprime(add(L[-i]*10^(i-1),i=1..d))
    end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Apr 06 2021

Formula

Extensions

Keyword:base added and definition shortened by R. J. Mathar, Sep 23 2010

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.

Original entry on oeis.org

997, 2797, 3499, 4993, 7297, 7477, 7927, 8089, 8999, 9277, 9349, 9439, 9907, 11689, 12697, 12967, 14479, 14767, 14929, 14947, 16189, 16477, 16729, 16747, 16927, 16981, 17449, 17467, 18169, 18691, 19249, 19267, 19429, 19447, 19681, 19861
Offset: 1

Views

Author

Chuck Seggelin, Jan 03 2004

Keywords

Comments

Apparently if the cubes of the digits of a prime 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 1969 primes p such that the cubes of the digits of p sum to a prime. Of these, only 358 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 A091366 (primes whose digits cubed sum to a prime) that do not also appear in A046704 (primes whose digits sum to a prime).

Examples

			a(1)=997 because 9+9+7 = 25 which is not prime, but 9^3+9^3+7^3 = 1801 which is prime.
		

Crossrefs

Cf. A046704 (primes whose digits sum to a prime) A091366 (primes whose digits squared sum to a prime).

Programs

  • Mathematica
    ssdQ[n_]:= Module[{idn = IntegerDigits[n]}, !PrimeQ[Total[idn]]&&PrimeQ[Total[idn^3]]]; Select[Prime[Range[4000]], ssdQ] (* Vincenzo Librandi, Apr 17 2013 *)

A091367 Primes p such that the sum of the digits raised to the 4th power is prime.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 113, 131, 179, 191, 197, 223, 269, 311, 313, 331, 353, 379, 397, 401, 443, 461, 601, 607, 641, 661, 719, 739, 809, 883, 911, 937, 971, 1013, 1019, 1031, 1033, 1091, 1097, 1103, 1109, 1181, 1301, 1303, 1367, 1433
Offset: 1

Views

Author

Chuck Seggelin, Jan 03 2004

Keywords

Examples

			a(1) = 11 because 1^4 + 1^4 = 2 which is prime.
a(10) = 89 because 8^4 + 9^4 = 10657 which is prime.
		

Crossrefs

Cf. A046704 (primes whose digits sum to a prime), A052034 (primes whose digits squared sum to a prime), A091366 (primes whose digits cubed sum to a prime).

Programs

  • Mathematica
    upto=500;Select[Prime[Range[upto]],PrimeQ[Total[IntegerDigits[#]^4]]&] (* Paolo Xausa, Nov 23 2021 *)
  • Python
    from sympy import isprime, primerange
    def ok(p): return isprime(sum(int(d)**4 for d in str(p)))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(1433)) # Michael S. Branicky, Nov 23 2021

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

A176196 Primes such that the sum of k-th powers of digits, for each of k = 1, 2, 3, and 4, is also a prime.

Original entry on oeis.org

11, 101, 113, 131, 223, 311, 353, 461, 641, 661, 883, 1013, 1031, 1103, 1301, 1439, 1451, 1471, 1493, 1697, 1741, 2111, 2203, 3011, 3347, 3491, 3659, 4139, 4337, 4373, 4391, 4733, 4931, 5303, 5639, 5693, 6197, 6359, 6719, 6791, 6917, 6971, 7411, 7433
Offset: 1

Views

Author

Michel Lagneau, Apr 11 2010

Keywords

Comments

For k = 1, 2, and 3 see A176179

Examples

			For the prime number n=14549 we obtain :
1 + 4 + 5 + 4 + 9 = 23 ;
1^2 +4^2 + 5^2 +4^2 + 9^2 = 139 ;
1^3 +4^3 + 5^3 +4^3 + 9^3 = 983 ;
1^4 +4^4 + 5^4 +4^4 + 9^4 = 7699 ;
		

References

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

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 2 to 20000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:s3:=0:s4:=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:s4:=s4+u^4:od:if type(n,prime)=true and type(s1,prime)=true and type(s2,prime)=true and type(s3,prime)=true and type(s4,prime)=true then print(n):else fi:od:
  • Mathematica
    Select[Prime[Range[1000]],And@@PrimeQ[Total/@Table[IntegerDigits[#]^n,{n,4}]]&] (* Harvey P. Dale, Jun 16 2013 *)
  • Python
    from sympy import isprime, primerange
    def ok(p):
        return all(isprime(sum(int(d)**k for d in str(p))) for k in range(1, 5))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(7443)) # Michael S. Branicky, Nov 23 2021

A180404 Primes p such that the sum of fifth power of their digits is a prime.

Original entry on oeis.org

11, 101, 191, 223, 227, 229, 281, 313, 331, 337, 359, 373, 379, 397, 463, 487, 557, 577, 593, 643, 683, 733, 739, 757, 773, 821, 863, 881, 911, 937, 953, 1019, 1033, 1091, 1109, 1123, 1129, 1181, 1213, 1231, 1259, 1277, 1291, 1303, 1321, 1381, 1433, 1439
Offset: 1

Views

Author

Carmine Suriano, Sep 02 2010

Keywords

Examples

			a(5) = 227 since 2^5+2^5+7^5 = 32+32+16807 = 16871 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[Total[IntegerDigits[#]^5]]&] (* Harvey P. Dale, May 25 2011 *)

Formula

If a prime p = abcdef... (each letter being a single digit) then sum = a^5+b^5+... belongs to this sequence if sum is a prime.

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