Original entry on oeis.org
2, 5, 11, 23, 47, 97, 103, 197, 379, 419, 691, 761, 1427, 1543, 2557, 2789, 4637, 5039, 5519, 9049, 9851, 16103, 17609, 19289, 28687, 31319, 34123, 55381, 60167, 65687, 97499, 106243, 115757, 171529, 186437, 202987, 220861, 326537, 354979, 386501, 570643, 620201, 674837
Offset: 1
A051037
5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405
Offset: 1
From _Gus Wiseman_, May 21 2021: (Start)
The sequence of terms together with their prime indices begins:
1: {} 25: {3,3}
2: {1} 27: {2,2,2}
3: {2} 30: {1,2,3}
4: {1,1} 32: {1,1,1,1,1}
5: {3} 36: {1,1,2,2}
6: {1,2} 40: {1,1,1,3}
8: {1,1,1} 45: {2,2,3}
9: {2,2} 48: {1,1,1,1,2}
10: {1,3} 50: {1,3,3}
12: {1,1,2} 54: {1,2,2,2}
15: {2,3} 60: {1,1,2,3}
16: {1,1,1,1} 64: {1,1,1,1,1,1}
18: {1,2,2} 72: {1,1,1,2,2}
20: {1,1,3} 75: {2,3,3}
24: {1,1,1,2} 80: {1,1,1,1,3}
(End)
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Benoit Cloitre, Plot of abs(f(n)-s(n)) vs its mean values (blue) and vs loglog(n) (red).
- M. J. Dominus, Infinite Lists in Perl.
- Deborah Howard and Malcolm Longair, Harmonic Proportion and Palladio's "Quattro Libri", Journal of the Society of Architectural Historians (1982) 41 (2): 116-143.
- Vaclav Kotesovec, Plot of a(n) / (exp((6*log(2)*log(3)*log(5)*n)^(1/3))/sqrt(30)) for n = 1..1200000
- Rosetta Code, A collection of computer codes to compute 5-smooth numbers.
- Raphael Schumacher, The Formula for the Distribution of the 3-Smooth Numbers, 5-Smooth, 7-Smooth and all other Smooth Numbers, arXiv:1608.06928 [math.NT], 2016.
- Sci.math, Ugly numbers.
- Carl Veller, Martin A. Nowak and Charles C. Davis, Extended flowering intervals of bamboos evolved by discrete multiplication, Ecology Letters, 18 (2015), 653-659.
- Eric Weisstein's World of Mathematics, Smooth Number.
- Wikipedia, Regular number.
- Wikipedia, Talk:Regular number. Includes a discussion of the name.
- Wikipedia, Størmer's theorem.
The partitions with these Heinz numbers are counted by
A001399.
Requiring the sum of prime indices to be even gives
A344297.
-
import Data.Set (singleton, deleteFindMin, insert)
a051037 n = a051037_list !! (n-1)
a051037_list = f $ singleton 1 where
f s = y : f (insert (5 * y) $ insert (3 * y) $ insert (2 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
-
[n: n in [1..500] | PrimeDivisors(n) subset [2,3,5]]; // Bruno Berselli, Sep 24 2012
-
A051037 := proc(n)
option remember;
local a;
if n = 1 then
1;
else
for a from procname(n-1)+1 do
numtheory[factorset](a) minus {2, 3,5 } ;
if % = {} then
return a;
end if;
end do:
end if;
end proc:
seq(A051037(n),n=1..100) ; # R. J. Mathar, Nov 05 2017
-
mx = 405; Sort@ Flatten@ Table[ 2^a*3^b*5^c, {a, 0, Log[2, mx]}, {b, 0, Log[3, mx/2^a]}, {c, 0, Log[5, mx/(2^a*3^b)]}] (* Or *)
Select[ Range@ 405, Last@ Map[First, FactorInteger@ #] < 7 &] (* Robert G. Wilson v *)
With[{nn=10},Select[Union[Times@@@Flatten[Table[Tuples[{2,3,5},n],{n,0,nn}],1]],#<=2^nn&]] (* Harvey P. Dale, Feb 28 2022 *)
-
test(n)= {m=n; forprime(p=2,5, while(m%p==0,m=m/p)); return(m==1)}
for(n=1,500,if(test(n),print1(n",")))
-
a(n)=local(m); if(n<1,0,n=a(n-1); until(if(m=n, forprime(p=2,5, while(m%p==0,m/=p)); m==1),n++); n)
-
list(lim)=my(v=List(),s,t); for(i=0,logint(lim\=1,5), t=5^i; for(j=0,logint(lim\t,3), s=t*3^j; while(s<=lim, listput(v,s); s<<=1))); Set(v) \\ Charles R Greathouse IV, Sep 21 2011; updated Sep 19 2016
-
smooth(P:vec,lim)={ my(v=List([1]),nxt=vector(#P,i,1),indx,t);
while(1, t=vecmin(vector(#P,i,v[nxt[i]]*P[i]),&indx);
if(t>lim,break); if(t>v[#v],listput(v,t)); nxt[indx]++);
Vec(v)
};
smooth([2,3,5], 1e4) \\ Charles R Greathouse IV, Dec 03 2013
-
is_A051037(n)=n<7||vecmax(factor(n,6)[, 1])<7 \\ M. F. Hasler, Jan 16 2015
-
def isok(n):
while n & 1 == 0: n >>= 1
while n % 3 == 0: n //= 3
while n % 5 == 0: n //= 5
return n == 1 # Darío Clavijo, Dec 30 2022
-
from sympy import integer_log
def A051037(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x):
c = n+x
for i in range(integer_log(x,5)[0]+1):
for j in range(integer_log(y:=x//5**i,3)[0]+1):
c -= (y//3**j).bit_length()
return c
return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024
-
# faster for initial segment of sequence
import heapq
from itertools import islice
def A051037gen(): # generator of terms
v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
while True:
v = heapq.heappop(h)
if v != oldv:
yield v
oldv = v
for p in psmooth_primes:
heapq.heappush(h, v*p)
print(list(islice(A051037gen(), 65))) # Michael S. Branicky, Sep 17 2024
A003592
Numbers of the form 2^i*5^j with i, j >= 0.
Original entry on oeis.org
1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 128, 160, 200, 250, 256, 320, 400, 500, 512, 625, 640, 800, 1000, 1024, 1250, 1280, 1600, 2000, 2048, 2500, 2560, 3125, 3200, 4000, 4096, 5000, 5120, 6250, 6400, 8000, 8192, 10000, 10240, 12500, 12800
Offset: 1
- Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 73.
Cf.
A164768 (difference between consecutive terms)
-
Filtered([1..10000],n->PowerMod(10,n,n)=0); # Muniru A Asiru, Mar 19 2019
-
import Data.Set (singleton, deleteFindMin, insert)
a003592 n = a003592_list !! (n-1)
a003592_list = f $ singleton 1 where
f s = y : f (insert (2 * y) $ insert (5 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
-
[n: n in [1..10000] | PrimeDivisors(n) subset [2,5]]; // Bruno Berselli, Sep 24 2012
-
isA003592 := proc(n)
if n = 1 then
true;
else
return (numtheory[factorset](n) minus {2,5} = {} );
end if;
end proc:
A003592 := proc(n)
option remember;
if n = 1 then
1;
else
for a from procname(n-1)+1 do
if isA003592(a) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, Jul 16 2012
-
twoFiveableQ[n_] := PowerMod[10, n, n] == 0; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Jan 12 2012 *)
twoFiveableQ[n_] := Union[ MemberQ[{1, 3, 7, 9}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 10]] == {False}; twoFiveableQ[1] = True; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Oct 26 2010 *)
maxExpo = 14; Sort@ Flatten@ Table[2^i * 5^j, {i, 0, maxExpo}, {j, 0, Log[5, 2^(maxExpo - i)]}] (* Or *)
Union@ Flatten@ NestList[{2#, 4#, 5#} &, 1, 7] (* Robert G. Wilson v, Apr 16 2011 *)
-
list(lim)=my(v=List(),N);for(n=0,log(lim+.5)\log(5),N=5^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
-
# A003592.py
from heapq import heappush, heappop
def A003592():
pq = [1]
seen = set(pq)
while True:
value = heappop(pq)
yield value
seen.remove(value)
for x in 2*value, 5*value:
if x not in seen:
heappush(pq, x)
seen.add(x)
sequence = A003592()
A003592_list = [next(sequence) for _ in range(100)]
-
from sympy import integer_log
def A003592(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))
return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025
-
def isA003592(n) :
return not any(d != 2 and d != 5 for d in prime_divisors(n))
@CachedFunction
def A003592(n) :
if n == 1 : return 1
k = A003592(n-1) + 1
while not isA003592(k) : k += 1
return k
[A003592(n) for n in (1..48)] # Peter Luschny, Jul 20 2012
A036561
Nicomachus triangle read by rows, T(n, k) = 2^(n - k)*3^k, for 0 <= k <= n.
Original entry on oeis.org
1, 2, 3, 4, 6, 9, 8, 12, 18, 27, 16, 24, 36, 54, 81, 32, 48, 72, 108, 162, 243, 64, 96, 144, 216, 324, 486, 729, 128, 192, 288, 432, 648, 972, 1458, 2187, 256, 384, 576, 864, 1296, 1944, 2916, 4374, 6561, 512, 768, 1152, 1728, 2592, 3888, 5832, 8748, 13122, 19683
Offset: 0
The start of the sequence as a triangular array read by rows:
1
2 3
4 6 9
8 12 18 27
16 24 36 54 81
32 48 72 108 162 243
...
The start of the sequence as a table T(n,k) n, k > 0:
1 2 4 8 16 32 ...
3 6 12 24 48 96 ...
9 18 36 72 144 288 ...
27 54 108 216 432 864 ...
81 162 324 648 1296 2592 ...
243 486 972 1944 3888 7776 ...
...
- _Boris Putievskiy_, Jan 08 2013
- Jay Kappraff, Beyond Measure, World Scientific, 2002, p. 148.
- Flora R. Levin, The Manual of Harmonics of Nicomachus the Pythagorean, Phanes Press, 1994, p. 114.
- Reinhard Zumkeller and Matthew House, Rows n = 0..300 of triangle, flattened [Rows 0 through 120 were computed by Reinhard Zumkeller; rows 121 through 300 by Matthew House, Jul 09 2015]
- Fred Daniel Kline, How do I convert this Nicomachus' Triangle to one with edges?
- Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
- Pierre de la Ramée (Petrus Ramus), P. Rami Arithmeticae (anno 1569) Liber 2, Cap. XVI "De inventione continue proportionalium" p.46 (leaf 0055) describes this integer triangle in a layout close to the current OEIS 'tabl' layout.
- Marko Riedel, Proof of identity by Egorychev method.
- Thomas Scheuerle, Version of this triangle from Boethius (480-524), Anicius Manlius Severinus Boethius, De institutione arithmetica, Medeltidshandskrift 1 (Mh 1), Lund University Library, early 10th century, page 4r.
- Robert Sedgewick, Analysis of shellsort and related algorithms, Fourth European Symposium on Algorithms, Barcelona, September, 1996.
Triangle sums (see the comments):
A001047 (Row1);
A015441 (Row2);
A005061 (Kn1, Kn4);
A016133 (Kn2, Kn3);
A016153 (Fi1, Fi2);
A016140 (Ca1, Ca4);
A180844 (Ca2, Ca3);
A180845 (Gi1, Gi4);
A180846 (Gi2, Gi3);
A180847 (Ze1, Ze4);
A016185 (Ze2, Ze3). -
Johannes W. Meijer, Sep 22 2010, Sep 10 2011
Antidiagonal cumulative sum:
A000392; square arrays cumulative sum:
A160869. Antidiagonal products: 6^
A000217; antidiagonal cumulative products: 6^
A000292; square arrays products: 6^
A005449; square array cumulative products: 6^
A006002.
-
a036561 n k = a036561_tabf !! n !! k
a036561_row n = a036561_tabf !! n
a036561_tabf = iterate (\xs@(x:_) -> x * 2 : map (* 3) xs) [1]
-- Reinhard Zumkeller, Jun 08 2013
-
/* As triangle: */ [[(2^(i-j)*3^j)/3: j in [1..i]]: i in [1..10]]; // Vincenzo Librandi, Oct 17 2014
-
A036561 := proc(n,k): 2^(n-k)*3^k end:
seq(seq(A036561(n,k),k=0..n),n=0..9);
T := proc(n,k) option remember: if k=0 then 2^n elif k>=1 then procname(n,k-1) + procname(n-1,k-1) fi: end: seq(seq(T(n,k),k=0..n),n=0..9);
# Johannes W. Meijer, Sep 22 2010, Sep 10 2011
-
Flatten[Table[ 2^(i-j) 3^j, {i, 0, 12}, {j, 0, i} ]] (* Flatten added by Harvey P. Dale, Jun 07 2011 *)
-
for(i=0,9,for(j=0,i,print1(3^j<<(i-j)", "))) \\ Charles R Greathouse IV, Dec 22 2011
-
{T(n, k) = if( k<0 || k>n, 0, 2^(n - k) * 3^k)} /* Michael Somos, May 28 2012 */
A003591
Numbers of form 2^i*7^j, with i, j >= 0.
Original entry on oeis.org
1, 2, 4, 7, 8, 14, 16, 28, 32, 49, 56, 64, 98, 112, 128, 196, 224, 256, 343, 392, 448, 512, 686, 784, 896, 1024, 1372, 1568, 1792, 2048, 2401, 2744, 3136, 3584, 4096, 4802, 5488, 6272, 7168, 8192, 9604, 10976, 12544, 14336, 16384, 16807, 19208, 21952, 25088
Offset: 1
-
Filtered([1..30000],n->PowerMod(14,n,n)=0); # Muniru A Asiru, Mar 19 2019
-
import Data.Set (singleton, deleteFindMin, insert)
a003591 n = a003591_list !! (n-1)
a003591_list = f $ singleton 1 where
f s = y : f (insert (2 * y) $ insert (7 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
-
[n: n in [1..26000] | PrimeDivisors(n) subset [2,7]]; // Bruno Berselli, Sep 24 2012
-
fQ[n_] := PowerMod[14,n,n]==0; Select[Range[30000], fQ] (* Vincenzo Librandi, Feb 04 2012 *)
-
list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
-
isA003591(n)=n>>=valuation(n,2);ispower(n,,&n);n==1||n==7 \\ Charles R Greathouse IV, Jun 28 2011
-
from sympy import integer_log
def A003591(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum((x//7**i).bit_length() for i in range(integer_log(x,7)[0]+1))
return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024
A033849
Numbers whose prime factors are 3 and 5.
Original entry on oeis.org
15, 45, 75, 135, 225, 375, 405, 675, 1125, 1215, 1875, 2025, 3375, 3645, 5625, 6075, 9375, 10125, 10935, 16875, 18225, 28125, 30375, 32805, 46875, 50625, 54675, 84375, 91125, 98415, 140625, 151875, 164025, 234375, 253125, 273375, 295245
Offset: 1
-
import Data.Set (singleton, deleteFindMin, insert)
a033849 n = a033849_list !! (n-1)
a033849_list = f (singleton (3*5)) where
f s = m : f (insert (3*m) $ insert (5*m) s') where
(m,s') = deleteFindMin s
-- Reinhard Zumkeller, Sep 13 2011
-
Sort[Flatten[Table[Table[3^j*5^k, {j, 1, 10}], {k, 1, 10}]]] (* Geoffrey Critzer, Dec 07 2014 *)
Select[Range[300000],FactorInteger[#][[All,1]]=={3,5}&] (* Harvey P. Dale, Oct 19 2022 *)
-
from sympy import integer_log
def A033849(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(integer_log(x//5**i,3)[0]+1 for i in range(integer_log(x,5)[0]+1))
return 15*bisection(f,n,n) # Chai Wah Wu, Oct 22 2024
A003594
Numbers of the form 3^i*7^j with i, j >= 0.
Original entry on oeis.org
1, 3, 7, 9, 21, 27, 49, 63, 81, 147, 189, 243, 343, 441, 567, 729, 1029, 1323, 1701, 2187, 2401, 3087, 3969, 5103, 6561, 7203, 9261, 11907, 15309, 16807, 19683, 21609, 27783, 35721, 45927, 50421, 59049, 64827, 83349, 107163, 117649
Offset: 1
-
Filtered([1..120000],n->PowerMod(21,n,n)=0); # Muniru A Asiru, Mar 19 2019
-
import Data.Set (singleton, deleteFindMin, insert)
a003594 n = a003594_list !! (n-1)
a003594_list = f $ singleton 1 where
f s = y : f (insert (3 * y) $ insert (7 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
-
[n: n in [1..120000] | PrimeDivisors(n) subset [3,7]]; // Bruno Berselli, Sep 24 2012
-
f[upto_]:=Sort[Select[Flatten[3^First[#] 7^Last[#] & /@ Tuples[{Range[0, Floor[Log[3, upto]]], Range[0, Floor[Log[7, upto]]]}]], # <= upto &]]; f[120000] (* Harvey P. Dale, Mar 04 2011 *)
fQ[n_] := PowerMod[21, n, n] == 0; Select[Range[120000], fQ] (* Bruno Berselli, Sep 24 2012 *)
-
list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N*=3));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
-
from sympy import integer_log
def A003594(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(integer_log(x//7**i,3)[0]+1 for i in range(integer_log(x,7)[0]+1))
return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024
A003595
Numbers of the form 5^i*7^j with i, j >= 0.
Original entry on oeis.org
1, 5, 7, 25, 35, 49, 125, 175, 245, 343, 625, 875, 1225, 1715, 2401, 3125, 4375, 6125, 8575, 12005, 15625, 16807, 21875, 30625, 42875, 60025, 78125, 84035, 109375, 117649, 153125, 214375, 300125, 390625, 420175, 546875, 588245, 765625, 823543, 1071875, 1500625
Offset: 1
-
import Data.Set (singleton, deleteFindMin, insert)
a003595 n = a003595_list !! (n-1)
a003595_list = f $ singleton 1 where
f s = y : f (insert (5 * y) $ insert (7 * y) s')
where (y, s') = deleteFindMin s
-- Reinhard Zumkeller, May 16 2015
-
[n: n in [1..600000] | PrimeDivisors(n) subset [5,7]]; // Bruno Berselli, Sep 24 2012
-
a = {}; Do[If[EulerPhi[35 k] == 24 k, AppendTo[a, k]], {k, 1, 10000}]; a (* Artur Jasinski, Nov 09 2008 *)
fQ[n_] := PowerMod[35, n, n] == 0; Select[Range[600000], fQ] (* Bruno Berselli, Sep 24 2012 *)
-
list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N*=5));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
-
from sympy import integer_log
def A003595(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(integer_log(x//7**i,5)[0]+1 for i in range(integer_log(x,7)[0]+1))
return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024
A108090
Numbers of the form (11^i)*(13^j).
Original entry on oeis.org
1, 11, 13, 121, 143, 169, 1331, 1573, 1859, 2197, 14641, 17303, 20449, 24167, 28561, 161051, 190333, 224939, 265837, 314171, 371293, 1771561, 2093663, 2474329, 2924207, 3455881, 4084223, 4826809, 19487171, 23030293, 27217619
Offset: 1
Douglas Winston (douglas.winston(AT)srupc.com), Jun 03 2005
Cf.
A003586,
A003592,
A003593,
A003591,
A003594,
A003595,
A003596,
A003597,
A003598,
A003599,
A107326,
A107364,
A107466,
A108056.
-
import Data.Set (singleton, deleteFindMin, insert)
a108090 n = a108090_list !! (n-1)
a108090_list = f $ singleton (1,0,0) where
f s = y : f (insert (11 * y, i + 1, j) $ insert (13 * y, i, j + 1) s')
where ((y, i, j), s') = deleteFindMin s
-- Reinhard Zumkeller, May 15 2015
-
[n: n in [1..10^7] | PrimeDivisors(n) subset [11, 13]]; // Vincenzo Librandi, Jun 27 2016
-
mx = 3*10^7; Sort@ Flatten@ Table[ 11^i*13^j, {i, 0, Log[11, mx]}, {j, 0, Log[13, mx/11^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
fQ[n_]:=PowerMod[143, n, n] == 0; Select[Range[2 10^7], fQ] (* Vincenzo Librandi, Jun 27 2016 *)
-
list(lim)=my(v=List(),t); for(j=0,logint(lim\=1,13), t=13^j; while(t<=lim, listput(v,t); t*=11)); Set(v) \\ Charles R Greathouse IV, Aug 29 2016
-
from sympy import integer_log
def A108090(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(integer_log(x//13**i,11)[0]+1 for i in range(integer_log(x,13)[0]+1))
return bisection(f,n,n) # Chai Wah Wu, Mar 25 2025
A107326
Numbers of the form (2^i)*(13^j).
Original entry on oeis.org
1, 2, 4, 8, 13, 16, 26, 32, 52, 64, 104, 128, 169, 208, 256, 338, 416, 512, 676, 832, 1024, 1352, 1664, 2048, 2197, 2704, 3328, 4096, 4394, 5408, 6656, 8192, 8788, 10816, 13312, 16384, 17576, 21632, 26624, 28561, 32768, 35152, 43264, 53248, 57122
Offset: 1
Douglas Winston (douglas.winston(AT)srupc.com), May 21 2005
-
fQ[n_] := PowerMod[26,n,n]==0; Select[Range[60000],fQ] (* Vincenzo Librandi, Feb 04 2012 *)
mx = 60000; Sort@ Flatten@ Table[2^i*13^j, {i, 0, Log[2, mx]}, {j, 0, Log[13, mx/2^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
-
list(lim)=my(v=List(),N); for(n=0,log(lim)\log(13),N=13^n; while(N<=lim,listput(v,N);N<<=1)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
Showing 1-10 of 44 results.
Comments