A293425 Primes of the form 2^a * 3^b * 5^c - 1 for positive a, b, c.
29, 59, 89, 149, 179, 239, 269, 359, 449, 479, 599, 719, 809, 1439, 1499, 1619, 2399, 2699, 2879, 2999, 4049, 4799, 5399, 7499, 8999, 9719, 10799, 11519, 12149, 12959, 13499, 15359, 18749, 20249, 21599, 23039, 25919, 33749, 35999, 40499, 51839, 56249, 59999, 65609, 67499, 69119, 71999
Offset: 1
Keywords
Examples
a(1) = 29 = 2^1 * 3^1 * 5^1 - 1. a(2) = 59 = 2^2 * 3^1 * 5^1 - 1. a(3) = 89 = 2^1 * 3^2 * 5^1 - 1. a(4) = 149 = 2^1 * 3^1 * 5^2 - 1. a(5) = 179 = 2^2 * 3^2 * 5^1 - 1. list of (a, b, c): (1, 1, 1), (2, 1, 1), (1, 2, 1), (1, 1, 2), (2, 2, 1), (4, 1, 1), (1, 3, 1), (3, 2, 1), (1, 2, 2), (5, 1, 1), (3, 1, 2), (4, 2, 1), (1, 4, 1), (5, 2, 1), (2, 1, 3), (2, 4, 1), ...
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
GAP
K:=10^5+1;; # to get all terms <= K. A:=Filtered([1..K],IsPrime);; A293425:=List(Positions(List(A,i->Elements(Factors(i+1))),[2,3,5]),i->A[i]);
-
Maple
N:= 10^6: # to get all terms < N R:= {}: for c from 1 to floor(log[5]((N+1)/6)) do for b from 1 to floor(log[3]((N+1)/2/5^c)) do R:= R union select(isprime, {seq(2^a*3^b*5^c-1, a=1..ilog2((N+1)/(3^b*5^c)))}) od od: sort(convert(R,list)); # Robert Israel, Oct 15 2017
-
Mathematica
With[{n = 10^5}, Sort@ Select[Flatten@ Table[2^a*3^b*5^c - 1, {a, Log2@ n}, {b, Log[3, n/(2^a)]}, {c, Log[5, n/(2^a*3^b)]}], PrimeQ]] (* Michael De Vlieger, Oct 11 2017 *)
-
PARI
lista(nn) = {forprime(p=2,nn, f = factor(p+1); if ((vecmax(f[,1]) <= 5) && (#f~==3), print1(p, ", ")););} \\ Michel Marcus, Oct 09 2017
-
Python
from itertools import count, islice from sympy import integer_log, isprime def A293425_gen(): # generator of terms 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): c = x for i in range(1,integer_log(x,5)[0]+1): for j in range(1,integer_log(m:=x//5**i,3)[0]+1): c -= (m//3**j).bit_length()-1 return c yield from filter(isprime,(bisection(lambda k:n+f(k),n,n)-1 for n in count(1))) A293425_list = list(islice(A293425_gen(),30)) # Chai Wah Wu, Mar 31 2025
Comments