A057609 Powers of a prime lucky number (A031157) but excluding lucky numbers (A000959).
27, 81, 243, 343, 1849, 2197, 2401, 4489, 5329, 6241, 6561, 16129, 16807, 19683, 22801, 26569, 28561, 37249, 44521, 49729, 58081, 59049, 79507, 80089, 94249, 109561, 117649, 134689, 177147, 177241, 187489, 214369, 237169, 361201, 371293, 375769, 383161, 389017
Offset: 1
Keywords
Examples
In the first 23 terms of A000959, {1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99}, 3 is a prime lucky number (A031157), and 3^2 is also a lucky number, but 3^3=27 and 3^4=81 are not lucky numbers, so they are terms of this sequence.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..825 (terms < 4*10^9)
Programs
-
Mathematica
lst = Range[1, 2*10^6, 2]; i = 2; While[i <= (len = Length[lst]) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++ ]; m = Last@ lst; Complement[ Reap[ Do[ If[x^2 > m, Break[]]; If[PrimeQ[x], y = x^2; While[y <= m, Sow@ y; y *= x]], {x, lst}]] [[2, 1]], lst] (* Robert G. Wilson v, May 12 2006, corrected by Giovanni Resta, May 10 2020 *)
Extensions
More terms from Robert G. Wilson v, May 12 2006
Data corrected and extended by Giovanni Resta, May 10 2020
Comments