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.

Previous Showing 11-17 of 17 results.

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, ", ")))
    

A296187 Yarborough primes that remain Yarborough primes when each of their digits are replaced by their squares.

Original entry on oeis.org

73, 223, 233, 283, 337, 383, 523, 733, 773, 823, 2333, 2683, 2833, 2857, 3323, 3583, 3673, 3733, 3853, 5333, 6673, 6737, 6883, 7333, 7673, 7727, 7877, 8233, 8563, 8623, 22277, 22283, 22727, 23333, 23833, 25237, 25253, 25633, 26227, 26833, 27583, 27827, 27883, 32257
Offset: 1

Views

Author

K. D. Bajpai, Feb 14 2018

Keywords

Comments

A Yarborough prime is a prime that does not contain digits 0 or 1.
Terms t of A106116 such that A048385(t) is also a term of A106116. - Felix Fröhlich, Feb 14 2018

Examples

			a(1) = 73 is a prime, and replacing each of its digits by its square yields 499, which is also prime. Neither 73 nor 499 contains digits 0 or 1, so both are Yarborough primes.
a(10) = 823 is a prime, and replacing each of its digits by its square gives 6449, another prime. Neither 823 nor 6449 contains digits 0 or 1, so both are Yarborough primes.
		

Crossrefs

Cf. A106116 (Yarborough primes), A048385, A052034, A296563 (digits to cubes).

Programs

  • Mathematica
    k = 2; Select[Prime[Range[1000000]], Min[IntegerDigits[#]] > 1 &&  Min[IntegerDigits[Flatten[IntegerDigits[(IntegerDigits[#]^k)]]]] > 1 && PrimeQ[FromDigits[Flatten[IntegerDigits[(IntegerDigits[#]^k)]]]] &]
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    is_a106116(n) = ispseudoprime(n) && vecmin(digits(n)) > 1
    a048385(n) = my(d=digits(n), e=[]); for(k=1, #d, d[k]=d[k]^2); for(k=1, #d, my(dd=digits(d[k])); for(t=1, #dd, e=concat(e, dd[t]))); eva(e)
    is(n) = is_a106116(n) && is_a106116(a048385(n)) \\ Felix Fröhlich, Mar 26 2018

Formula

{A106116(k): A048385(A106116(k)) in A106116}. - Felix Fröhlich, Feb 14 2018

A381878 Prime numbers p such that the sum of the d_i-th prime numbers, where (d_i) are the nonzero digits of p, is also a prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 71, 103, 107, 181, 211, 223, 227, 229, 233, 239, 257, 277, 293, 347, 383, 389, 433, 443, 449, 467, 479, 487, 499, 523, 563, 569, 587, 647, 653, 659, 677, 683, 701, 727, 743, 769, 787, 811, 839, 857, 859, 863, 877, 883, 947, 967, 983
Offset: 1

Views

Author

Jean-Marc Rebert, Mar 09 2025

Keywords

Examples

			13 is a term, because prime(1) + prime(3) = 2 + 5 = 7 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[170]], PrimeQ[Total[Prime[DeleteCases[IntegerDigits[#],0]]]] &] (* Stefano Spezia, Mar 09 2025 *)
  • Python
    from sympy import isprime, prime
    def ok(p): return isprime(p) and isprime(sum(prime(di) for di in map(int, str(p)) if di))
    print([k for k in range(1, 999) if ok(k)]) # Michael S. Branicky, Mar 09 2025
Previous Showing 11-17 of 17 results.