login
A175964
Primes p such that each of the decimal numbers p^k for k=1..5 has exactly two 1s.
2
1217, 14591, 20611, 21481, 41941, 60161, 81371, 110533, 112223, 115099, 115237, 117053, 124133, 131939, 135841, 140551, 144139, 159013, 170123, 176819, 195731, 218521, 241051, 246511, 301241, 421241, 461561, 513001, 517261, 614143, 627511, 716819, 786151, 810149
OFFSET
1,1
COMMENTS
Number of terms < 10^n: 0, 0, 0, 1, 7, 38, 266, ..., . - Robert G. Wilson v, Nov 05 2010
EXAMPLE
1217^k with k=1..5: 1217, 1481089, 1802485313, 2193624625921, 2669641169745857.
MATHEMATICA
fQ[n_] := DigitCount[{n, n^2, n^3, n^4, n^5}, 10, 1] == {2, 2, 2, 2, 2}; Select[ Prime@ Range@ 57800, fQ] (* Robert G. Wilson v, Nov 05 2010 *)
Select[Prime[Range[52000]], Union[DigitCount[#^Range[5], 10, 1]]=={2}&] (* Harvey P. Dale, Feb 18 2015 *)
PROG
(Python)
from somewhere import primegen
for p in primegen():
if all(str(p**k).count('1') == 2 for k in range(1, 6)):
print(p) # Lucas A. Brown, Mar 23 2024
CROSSREFS
Sequence in context: A225759 A059669 A032628 * A300408 A252600 A293479
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Oct 31 2010
EXTENSIONS
More terms from Robert G. Wilson v, Nov 05 2010
a(32)-a(34) from Lucas A. Brown, Mar 23 2024
Definition clarified by N. J. A. Sloane, Mar 23 2024
STATUS
approved