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

A252357 Numbers n of the form p^m where p is prime and m>0 such that the digit sum of n is p.

Original entry on oeis.org

2, 3, 5, 7, 2401, 4913, 27512614111, 271818611107, 1174711139837, 45848500718449031, 73742412689492826049, 21048519522998348950643, 146853371345156431381127623, 240984500018808097135911707, 283956682347124706942551243009, 2759031540715333904109053133443
Offset: 1

Views

Author

Michel Lagneau, Dec 17 2014

Keywords

Comments

Subsequence of A000961.
The corresponding values of the primes p are 2, 3, 5, 7, 7, 17, 31, 43, 53, 71, 97, 107, 103, 107, 127, 107, ... .
The corresponding values of the powers m are 1, 1, 1, 1, 4, 3, 7, 7, 7, 9, 10, 11, 13, 13, 14, 15, ... .

Examples

			2401 is in the sequence because 2401 = 7^4 and 2+4+0+1 = 7.
		

Crossrefs

Programs

  • Maple
    nn:=2000:
    for p from 1 to 15 do :
    for m from 1 to nn do:n:=ithprime(m)^p:
    y:=convert(n,base,10):n1:=nops(y):
    s1:=sum('y[i]', 'i'=1..n1):
    if s1=ithprime(m)
      then
       printf(`%d, `,n):
       else
       fi:
      od:
    od:
  • Mathematica
    a252357[n_Integer] :=
    Select[Range[n],
      PrimeQ[Plus @@ IntegerDigits[#]] &&
    IntegerQ[Log[Plus @@ IntegerDigits[#], #]] &]; a252357[10^5] (* Michael De Vlieger, Dec 17 2014 *)
Showing 1-1 of 1 results.