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

A180407 Primes from sequence A091367 whose reverse is still a prime.

Original entry on oeis.org

113, 131, 179, 191, 199, 311, 313, 337, 353, 373, 733, 739, 797, 919, 937, 971, 991, 1031, 1033, 1091, 1097, 1103, 1109, 1181, 1301, 1439, 1471, 1499, 1741, 1811, 1901, 1949, 3011, 3169, 3301, 3343, 3347, 3389, 3433, 3583, 3853, 7187, 7433, 7457, 7547
Offset: 1

Views

Author

Carmine Suriano, Sep 02 2010

Keywords

Examples

			a(5)=199 since 1^2+9^2+9^2=1+81+81=163 is a prime and reverse(199)=911 has the same property.
		

Crossrefs

A052034 Primes such that the sum of the squares of their digits is also a prime.

Original entry on oeis.org

11, 23, 41, 61, 83, 101, 113, 131, 137, 173, 179, 191, 197, 199, 223, 229, 311, 313, 317, 331, 337, 353, 373, 379, 397, 401, 409, 443, 449, 461, 463, 467, 601, 641, 643, 647, 661, 683, 719, 733, 739, 773, 797, 829, 863, 883, 911, 919, 937, 971, 977, 991, 997, 1013
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1999

Keywords

Comments

Primes p such that the sum of the squared digits of p is a prime q. For the values of q see A109181.

Examples

			p = 23 is in the sequence because q = 2^2 + 3^2 = 13 is a prime.
9431 -> 9^2 + 4^2 + 3^2 + 1^2 = 107 (which is prime).
		

References

  • Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Inc., 2005, p. 89.
  • Charles W. Trigg, Journal of Recreational Mathematics, Vol. 20(2), 1988.

Crossrefs

Programs

  • Maple
    a:=proc(n) local nn, L: nn:=convert(n,base,10): L:=nops(nn): if isprime(n)= true and isprime(add(nn[j]^2,j=1..L))=true then n else end if end proc: seq(a(n),n=1..1000); # Emeric Deutsch, Jan 08 2008
  • Mathematica
    Select[Prime[Range[250]],PrimeQ[Total[IntegerDigits[#]^2]]&]  (* Harvey P. Dale, Dec 19 2010 *)
  • Python
    from sympy import isprime, primerange
    def ok(p): return isprime(sum(int(d)**2 for d in str(p)))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(1013)) # Michael S. Branicky, Nov 23 2021

Extensions

Edited by N. J. A. Sloane, Dec 15 2007 and again on Dec 05 2008 at the suggestion of Zak Seidov

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

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.
Showing 1-4 of 4 results.