A182318 List of positive integers whose prime tower factorization, as defined in comments, does not contain the prime 2.
1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 33, 35, 37, 39, 41, 43, 47, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 149
Offset: 1
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Patrick Devlin and Edinah Gnang, Primes Appearing in Prime Tower Factorization, arXiv:1204.5251 [math.NT], 2012-2014.
Crossrefs
A276378 is a subsequence.
Programs
-
Maple
# The integer n is in this sequence if and only if # containsPrimeInTower(2, n) returns false containsPrimeInTower:=proc(q, n) local i, L, currentExponent; option remember; if n <= 1 then return false: end if; if type(n/q, integer) then return true: end if; L := ifactors(n)[2]; for i to nops(L) do currentExponent := L[i][2]; if containsPrimeInTower(q, currentExponent) then return true: end if end do; return false: end proc:
-
Mathematica
Select[Range[150], ! MemberQ[Flatten@ FixedPoint[Map[If[PrimeQ@ Last@ # || Last@ # == 1, #, {First@ #, FactorInteger@ Last@ #}] &, #, {Depth@ # - 2}] &, FactorInteger@ #], 2] &] (* Michael De Vlieger, Feb 17 2017 *) containsPrimeInTower[q_, n_] := containsPrimeInTower[q, n] = Module[{i, L, currentExponent}, If[n <= 1, Return[False]]; If[IntegerQ[n/q], Return[True] ]; L = FactorInteger[n]; For[i = 1, i <= Length[L], i++, currentExponent = L[[i, 2]]; If[containsPrimeInTower[q, currentExponent], Return[True]]]; Return[False]]; Select[Range[150], !containsPrimeInTower[2, #]&] (* Jean-François Alcover, Jan 22 2019, translated from Maple *)
-
PARI
is(n)=if(n<4, return(n!=2)); if(n%2==0, return(0)); my(f=factor(n)[,2]); for(i=1,#f, if(!is(f[i]), return(0))); 1 \\ Charles R Greathouse IV, May 16 2024
Extensions
Typo in Maple program corrected by Rémy Sigrist, Dec 13 2016
Comments