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.

A030087 Primes such that digits of p do not appear in p^3.

Original entry on oeis.org

2, 3, 7, 43, 47, 53, 157, 223, 263, 487, 577, 587, 823, 4657, 5657, 6653, 7177, 8287, 9343, 26777, 36293, 46477, 58787, 72727, 75707, 176777, 363313, 530353, 566653, 959953, 1771787, 2525557, 2555353, 2626277, 3656363, 4414447, 7110707, 8448343, 20700077, 54475457, 71117177, 72722977, 135135113, 393321293, 457887457, 505053053, 672722627
Offset: 1

Views

Author

Patrick De Geest, Dec 11 1999

Keywords

Comments

Primes of sequence A029785. - Michel Marcus, Jan 04 2015

Examples

			2 and 2^3=8 have no digits in common, hence 2 is in the sequence.
		

Crossrefs

Cf. A029785 (digits of n are not present in n^3), A030086 (similar, with p^2), A253574 (similar, with p^4).

Programs

  • Mathematica
    Select[Prime[Range[1500000]], Intersection[IntegerDigits[#], IntegerDigits[#^3]]=={} &] (* Vincenzo Librandi, Jan 04 2015 *)
  • PARI
    lista(nn) = {forprime (n=1, nn, if (#setintersect(Set(vecsort(digits(n^3))), Set(vecsort(digits(n)))) == 0, print1(n, ", ")); ); } \\ Michel Marcus, Jan 04 2015
    
  • Python
    from sympy import isprime
    A030087_list = [n for n in range(1,10**6) if set(str(n)) & set(str(n**3)) == set() and isprime(n)]
    # Chai Wah Wu, Jan 05 2015

Extensions

Changed offset from 0 to 1 and more terms from Vincenzo Librandi, Jan 04 2015
a(40)-a(47) from Chai Wah Wu, Jan 05 2015