login
Powers of a prime lucky number (A031157) but excluding lucky numbers (A000959).
1

%I #15 May 10 2020 19:29:55

%S 27,81,243,343,1849,2197,2401,4489,5329,6241,6561,16129,16807,19683,

%T 22801,26569,28561,37249,44521,49729,58081,59049,79507,80089,94249,

%U 109561,117649,134689,177147,177241,187489,214369,237169,361201,371293,375769,383161,389017

%N Powers of a prime lucky number (A031157) but excluding lucky numbers (A000959).

%C Up to 10^7, terms are 3^3, 3^4, 3^5, 3^8, 3^9, 3^10, 3^11, 3^12, 3^13, 7^3, 7^4, 7^5, 7^6, 13^3, 13^4, 13^5, 13^6, 31^4, 43^2, 43^3, 43^4, 67^2, ..., . - Robert G. Wilson v, May 12 2006

%H Giovanni Resta, <a href="/A057609/b057609.txt">Table of n, a(n) for n = 1..825</a> (terms < 4*10^9)

%e 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.

%t 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 *)

%Y Cf. A031157, A000959.

%K nonn

%O 1,1

%A _Naohiro Nomoto_, Oct 09 2000

%E More terms from _Robert G. Wilson v_, May 12 2006

%E Data corrected and extended by _Giovanni Resta_, May 10 2020