login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030482 Primes with property that when cubed all even digits occur together and all odd digits occur together. 1
2, 3, 11, 13, 17, 19, 31, 59, 71, 131, 137, 173, 179, 211, 293, 359, 431, 439, 587, 659, 1277, 4057, 6379, 13093, 13537, 15877, 25799, 28753, 29173, 36493, 39293, 39719, 40013, 60919, 66071, 69491, 73681, 87491, 126011, 137507, 138599, 189491, 199831, 201673 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..107 (first 71 terms from Harvey P. Dale, terms <= 10^9)
EXAMPLE
17 is a term as 17^3 = 4913 which has even digits on one end and odd digits at the other. - David A. Corneth, Mar 27 2021
MAPLE
q:= n-> (l-> add(irem(l[i]+l[i-1], 2), i=2..nops(l))<2)(convert(n^3, base, 10)):
select(q, [ithprime(n)$n=1..20000])[]; # Alois P. Heinz, Mar 27 2021
MATHEMATICA
Select[Prime[Range[13000]], Length[Split[If[OddQ[#], 1, 0]&/@ IntegerDigits[ #^3]]]<3&] (* Harvey P. Dale, Dec 31 2013 *)
PROG
(Python)
from sympy import primerange
from itertools import groupby
def ok(n): return len([k for k, g in groupby([int(d in "13579") for d in str(n)])]) <= 2
def aupto(limit): return [p for p in primerange(2, limit+1) if ok(p**3)]
print(aupto(201673)) # Michael S. Branicky, Mar 27 2021
CROSSREFS
Sequence in context: A020610 A351682 A257529 * A019366 A045334 A244392
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Offset changed to 1 by David A. Corneth, Mar 27 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:16 EDT 2024. Contains 371905 sequences. (Running on oeis4.)