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.

A139749 Numbers n such that d_1^r + ... + d_r^1 is a prime number, where d_i are the digits of n (n = d_1, ..., d_r).

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 14, 16, 21, 23, 27, 29, 32, 34, 38, 41, 43, 47, 54, 56, 61, 65, 67, 74, 83, 87, 89, 92, 98, 101, 102, 104, 106, 110, 111, 113, 115, 119, 120, 122, 126, 128, 131, 133, 137, 139, 140, 142, 146, 153, 155, 160, 164, 166, 173, 179, 182, 186, 188, 191
Offset: 1

Views

Author

Ctibor O. Zizka, May 19 2008

Keywords

Examples

			1^3 + 3^2 + 7^1 = 17 is prime. Thus 137 is a member of this sequence. - _Derek Orr_, Jul 13 2014
		

Crossrefs

Cf. A139751.

Programs

  • Mathematica
    Select[Range[200],PrimeQ[Total[IntegerDigits[#]^Range[IntegerLength[#],1,-1]]]&] (* Harvey P. Dale, Aug 14 2019 *)
  • PARI
    for(n=1,10^3,d=digits(n);s=sum(i=1,#d,d[i]^(#d-i+1));if(isprime(s),print1(n,", "))) \\ Derek Orr, Jul 13 2014

Extensions

Edited and extended by Klaus Brockhaus, May 21 2008