A376699
Positions of primes in the sequence of numbers of the form 2^i * 3^j - 1 (A069353).
Original entry on oeis.org
3, 4, 5, 6, 8, 10, 11, 13, 15, 16, 18, 21, 22, 25, 31, 32, 36, 39, 40, 42, 51, 57, 61, 63, 65, 66, 71, 73, 79, 82, 94, 97, 106, 107, 110, 120, 121, 127, 128, 129, 130, 138, 142, 144, 161, 192, 204, 205, 212, 216, 232, 234, 244, 259, 264, 265, 308, 329, 346, 348
Offset: 1
-
With[{lim = 10^10}, Position[Sort@ Flatten@ Table[2^i*3^j - 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], _?PrimeQ] // Flatten]
-
lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j - 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(i, ", ")));}
-
from itertools import count, islice
from sympy import isprime, integer_log
def A069353(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+1)//3**i).bit_length() for i in range(integer_log(x+1,3)[0]+1))
return bisection(f,n-1,n-1)
def A376699_gen(): # generator of terms
return filter(lambda n:isprime(A069353(n)), count(1))
A376699_list = list(islice(A376699_gen(),30)) # Chai Wah Wu, Mar 31 2025
A005105
Class 1+ primes: primes of the form 2^i*3^j - 1 with i, j >= 0.
Original entry on oeis.org
2, 3, 5, 7, 11, 17, 23, 31, 47, 53, 71, 107, 127, 191, 383, 431, 647, 863, 971, 1151, 2591, 4373, 6143, 6911, 8191, 8747, 13121, 15551, 23327, 27647, 62207, 73727, 131071, 139967, 165887, 294911, 314927, 442367, 472391, 497663, 524287, 786431, 995327
Offset: 1
23 is in the sequence since 23 is prime and 23 + 1 = 24 = 2^3 * 3 has all prime factors less than or equal to 3.
- R. K. Guy, Unsolved Problems in Number Theory, A18.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Ray Chandler, Table of n, a(n) for n = 1..7170 (terms < 10^1000; terms 1..691 from T. D. Noe, terms 692..5000 from Charles R Greathouse IV)
- C. K. Caldwell, The Prime Pages.
- G. Everest, P. Rogers and T. Ward, A higher-rank Mersenne problem, pp. 95-107 of ANTS 2002, Lect. Notes Computer Sci. 2369 (2002).
- R. J. Mathar, Maple programs to generate b-files for b005105 to b005108, b081633 etc.
- Index entries for sequences related to the Erdos-Selfridge classification
-
A:=Filtered([1..10^7],IsPrime);; I:=[3];;
B:=List(A,i->Elements(Factors(i+1)));;
C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
A005105:=Concatenation([2],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i])); # Muniru A Asiru, Sep 28 2017
-
[p: p in PrimesUpTo(6*10^6) | forall{d: d in PrimeDivisors(p+1) | d le 3}]; // Bruno Berselli, Sep 24 2012
-
For Maple program see Mathar link.
# Alternative:
N:= 10^6: # to get all terms <= N
select(isprime,{seq(seq(2^i*3^j-1, i=0..ilog2(N/3^j)), j=0..floor(log[3](N)))});
# if using Maple 11 or earlier, uncomment the following line
# sort(convert(%,list)); # Robert Israel, Sep 28 2014
-
mx = 10^6; Select[ Sort@ Flatten@ Table[2^i*3^j - 1, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}], PrimeQ] (* or *)
Prime[ Select[ Range[78200], Mod[ Prime[ # ] + 1, EulerPhi[ Prime[ # ] + 1]] == 0 &]] (* or *)
PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; f[n_Integer] := Block[{m = n}, If[m == 0, m = 1, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; Apply[Times, PrimeFactors[m] + 1]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[3, 78200], ClassPlusNbr[ Prime[ # ]] == 1 &]]
-
list(lim)=my(v=List(), N); lim=1+lim\1; for(n=0, logint(lim,3), N=3^n; while(N<=lim, if(ispseudoprime(N-1),listput(v, N-1)); N<<=1)); Set(v) \\ Charles R Greathouse IV, Jul 15 2011; corrected Sep 22 2015
-
from itertools import count, islice
from sympy import integer_log, isprime
def A069353(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+1)//3**i).bit_length() for i in range(integer_log(x+1,3)[0]+1))
return bisection(f,n-1,n-1)
def A005105_gen(): # generator of terms
return filter(lambda n:isprime(n), map(A069353,count(1)))
A005105_list = list(islice(A005105_gen(),30)) # Chai Wah Wu, Mar 31 2025
A190803
Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x-1 and 3x-1 are in a.
Original entry on oeis.org
1, 2, 3, 5, 8, 9, 14, 15, 17, 23, 26, 27, 29, 33, 41, 44, 45, 50, 51, 53, 57, 65, 68, 77, 80, 81, 86, 87, 89, 98, 99, 101, 105, 113, 122, 129, 131, 134, 135, 149, 152, 153, 158, 159, 161, 170, 171, 173, 177, 194, 195, 197, 201, 203, 209, 225, 230, 239, 242
Offset: 1
1 -> 2 -> 3,5 -> 8,9,14 -> 15,17,23,26,27,41 -> ...
-
import Data.Set (singleton, deleteFindMin, insert)
a190803 n = a190803_list !! (n-1)
a190803_list = 1 : f (singleton 2)
where f s = m : (f $ insert (2*m-1) $ insert (3*m-1) s')
where (m, s') = deleteFindMin s
-- Reinhard Zumkeller, Jun 01 2011
-
h = 2; i = -1; j = 3; k = -1; f = 1; g = 10;
a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* A190803 *)
b = (a + 1)/2; c = (a + 1)/3; r = Range[1, 300];
d = Intersection[b, r] (* A190841 *)
e = Intersection[c, r] (* A190842 *)
(* Regarding this program - useful for many choices of h,i,j,k,f,g - the depth g must be chosen with care - that is, large enough. Assuming that h<=j, the least new terms in successive nests a are typically iterates of hx+i, starting from x=1. If, for example, h=2 and i=0, the least terms are 2,4,8,...,2^g, so that g>=9 ensures inclusion of all the desired terms <=256. *)
A069355
Numbers of form 2^i*3^j - (i+j) with i, j >= 0.
Original entry on oeis.org
1, 2, 4, 5, 7, 9, 12, 15, 20, 24, 27, 32, 43, 50, 58, 67, 77, 90, 103, 121, 138, 157, 185, 210, 238, 248, 281, 318, 376, 425, 480, 503, 568, 641, 723, 759, 856, 965, 1014, 1143, 1288, 1451, 1526, 1719, 1936, 2037, 2180, 2294, 2583, 2908, 3061, 3446, 3879, 4084
Offset: 1
1 is a term because 2^0*3^0 - (0+0) = 2^1*3^0 - (1+0) = 1.
2 is a term because 2^2*3^0 - (2+0) = 2^0*3^1 - (0+1) = 2.
4 is a term because 2^1*3^1 - (1+1) = 4.
-
With[{nn=20},Take[Flatten[Table[2^i 3^j-i-j,{i,0,nn},{j,0,nn}]]//Union,60]] (* Harvey P. Dale, Aug 29 2022 *)
Duplicated term 2 and incorrect formula removed by
Altug Alkan, Apr 09 2018
A190812
Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x+1 and 3x+2 are in a.
Original entry on oeis.org
1, 3, 5, 7, 11, 15, 17, 23, 31, 35, 47, 53, 63, 71, 95, 107, 127, 143, 161, 191, 215, 255, 287, 323, 383, 431, 485, 511, 575, 647, 767, 863, 971, 1023, 1151, 1295, 1457, 1535, 1727, 1943, 2047, 2303, 2591, 2915, 3071, 3455, 3887, 4095, 4373, 4607, 5183, 5831, 6143, 6911, 7775, 8191, 8747, 9215, 10367, 11663
Offset: 1
-
import Data.Set (singleton, deleteFindMin, insert)
a190812 n = a190812_list !! (n-1)
a190812_list = f $ singleton 1
where f s = m : (f $ insert (2*m+1) $ insert (3*m+2) s')
where (m, s') = deleteFindMin s
-- Reinhard Zumkeller, Jun 01 2011
-
h = 2; i = 1; j = 3; k = 2; f = 1; g = 20 ;
a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* A190812 *)
b = (a - 1)/2; c = (a - 2)/3; r = Range[1, 30000];
d = Intersection[b, r] (* A069353 *)
e = Intersection[c, r] (* A190812 conjectured *)
A264164
3-smooth numbers whose number of divisors is not 3-smooth.
Original entry on oeis.org
16, 48, 64, 81, 144, 162, 192, 324, 432, 512, 576, 648, 729, 1024, 1296, 1458, 1536, 1728, 2592, 2916, 3072, 3888, 4096, 4608, 5184, 5832, 8192, 9216, 10368, 11664, 12288, 13824, 15552, 16384, 19683, 20736, 23328, 24576, 27648, 34992, 36864, 39366, 41472
Offset: 1
a(12) = 648 = 2^3*3^4 = A003586(36) and A000005(648) = 20 = 2^2*5.
a(13) = 729 = 3^6 = A003586(37) and A000005(729) = 7.
A003586(38) = 768 = 2^8*3 is not a term, as A000005(768) = 18 = 2*3^2.
-
a264164 n = a264164_list !! (n-1)
a264164_list = filter ((== 0) . a065333 . a000005') a003586_list
-
smQ[n_] := n == Times @@ ({2, 3}^IntegerExponent[n, {2, 3}]);
seq[max_] := Sort@ Flatten@ Table[If[smQ[i + 1] && smQ[j + 1], Nothing, 2^i * 3^j], {i, 0 , Log2[max]}, {j, 0, Log[3, max/2^i]}]; seq[42000] (* Amiram Eldar, Sep 03 2023 *)
A264165
3-smooth numbers whose number of divisors is 3-smooth.
Original entry on oeis.org
1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 27, 32, 36, 54, 72, 96, 108, 128, 216, 243, 256, 288, 384, 486, 768, 864, 972, 1152, 1944, 2048, 2187, 2304, 3456, 4374, 6144, 6561, 6912, 7776, 8748, 13122, 17496, 18432, 26244, 31104, 32768, 52488, 55296, 62208, 69984
Offset: 1
a(25) = 768 = 2^8*3 = A003586(38) and A000005(768) = 18 = 2*3^2;
a(26) = 864 = 2^5*3^3 = A003586(39) and A000005(864) = 24 = 2^3*3;
a(27) = 972 = 2^2*3^5 = A003586(40) and A000005(972) = 18 = 2*3^2;
but A003586(41) = 1024 = 2^10 is not a term, as A000005(1024) = 11.
-
a264165 n = a264165_list !! (n-1)
a264165_list = filter ((== 1) . a065333 . a000005') a003586_list
-
smQ[n_] := n == Times @@ ({2, 3}^IntegerExponent[n, {2, 3}]);
seq[max_] := Sort@ Flatten@ Table[2^i * 3^j, {i, Select[Range[0, Floor[Log2[max]]], smQ[# + 1] &]}, {j, Select[Range[0, Floor[Log[3, max/2^i]]], smQ[# + 1] &]}]; seq[70000] (* Amiram Eldar, Sep 03 2023 *)
A327315
Irregular triangular array read by rows: row n shows the coefficients of this polynomial of degree n: (1/n!)*(numerator of n-th derivative of (x-2)/(x^2-x+1)).
Original entry on oeis.org
-2, 1, -1, 4, -1, 1, 3, -6, 1, 2, -4, -6, 8, -1, 1, -10, 10, 10, -10, 1, -1, -6, 30, -20, -15, 12, -1, -2, 7, 21, -70, 35, 21, -14, 1, -1, 16, -28, -56, 140, -56, -28, 16, -1, 1, 9, -72, 84, 126, -252, 84, 36, -18, 1, 2, -10, -45, 240, -210, -252, 420, -120
Offset: 0
First eight rows:
-2, 1;
-1, 4, -1;
1, 3, -6, 1;
2, -4, -6, 8, -1;
1, -10, 10, 10, -10, 1;
-1, -6, 30, -20, -15, 12, -1;
-2, 7, 21, -70, 35, 21, -14, 1;
-1, 16, -28, -56, 140, -56, -28, 16, -1;
First eight polynomials:
-2 + x
-1 + 4 x - x^2
1 + 3 x - 6 x^2 + x^3
2 - 4 x - 6 x^2 + 8 x^3 - x^4
(1 + x) (1 - 11 x + 21 x^2 - 11 x^3 + x^4)
-1 - 6 x + 30 x^2 - 20 x^3 - 15 x^4 + 12 x^5 - x^6
(-2 + x) (1 - 3 x - 12 x^2 + 29 x^3 - 3 x^4 - 12 x^5 + x^6)
-1 + 16 x - 28 x^2 - 56 x^3 + 140 x^4 - 56 x^5 - 28 x^6 + 16 x^7 - x^8
-
g[x_, n_] := Numerator[ Factor[D[(x - 2)/(x^2 - x + 1), {x, n}]]]
Column[Expand[Table[g[x, n]/n!, {n, 0, 12}]]] (* A327315 polynomials *)
h[n_] := CoefficientList[g[x, n]/n!, x];
Table[h[n], {n, 0, 10}] (* A327315 sequence *)
Column[%] (* A327315 array *)
Showing 1-8 of 8 results.
Comments